File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/test/java/org/cryptomator/cryptolib/v3 Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1616import java .io .ByteArrayInputStream ;
1717import java .io .ByteArrayOutputStream ;
1818import java .io .IOException ;
19- import java .io .UncheckedIOException ;
2019import java .nio .ByteBuffer ;
2120import java .nio .channels .Channels ;
2221import java .nio .charset .StandardCharsets ;
@@ -151,11 +150,11 @@ public void testCreateReferenceDirStructure(@TempDir Path vaultDir) throws IOExc
151150 }
152151
153152 private static byte [] encryptFile (ByteBuffer cleartext , Cryptor cryptor ) throws IOException {
154- try ( ByteArrayOutputStream baos = new ByteArrayOutputStream ();
155- EncryptingWritableByteChannel ch = new EncryptingWritableByteChannel (Channels .newChannel (baos ), cryptor )) {
153+ ByteArrayOutputStream baos = new ByteArrayOutputStream ();
154+ try ( EncryptingWritableByteChannel ch = new EncryptingWritableByteChannel (Channels .newChannel (baos ), cryptor )) {
156155 ch .write (cleartext );
157- return baos .toByteArray ();
158156 }
157+ return baos .toByteArray ();
159158 }
160159
161160 private static byte [] decryptFile (ByteBuffer ciphertext , Cryptor cryptor ) throws IOException {
You can’t perform that action at this time.
0 commit comments