At the moment, users of DataBufferUtils.outputStreamPublisher are forced to catch and re-throw IOException whenever they actually write to the OutputStream.
Example:
DataBufferUtils.outputStreamPublisher(
outputStream -> {
try {
outputStream.write(1);
...
} catch (IOException e) {
throw new RuntimeException(e);
}
},
new DefaultDataBufferFactory(),
Runnable::run)
This PR aims to allow users to write cleaner code, example:
DataBufferUtils.outputStreamPublisher(
outputStream -> {
outputStream.write(1);
...
},
new DefaultDataBufferFactory(),
Runnable::run)
As exceptions are already handled nicely under the hoods.
Same concept for BodyInserters.
Comment From: pivotal-cla
@fedpet Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Comment From: pivotal-cla
@fedpet Thank you for signing the Contributor License Agreement!