We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ed0e2b commit a03f434Copy full SHA for a03f434
solid/src/test/java/com/inrupt/client/solid/SolidClientTest.java
@@ -455,13 +455,12 @@ <T extends SolidClientException> void testRfc9457Exceptions(
455
.apply(new Response<byte[]>() {
456
@Override
457
public byte[] body() {
458
- final ByteArrayOutputStream bos = new ByteArrayOutputStream();
459
- try {
+ try (ByteArrayOutputStream bos = new ByteArrayOutputStream()){
460
jsonService.toJson(problemDetails, bos);
+ return bos.toByteArray();
461
} catch (IOException e) {
462
throw new RuntimeException(e);
463
}
464
- return bos.toByteArray();
465
466
467
0 commit comments