refactor: Replace to nio & apply CS inspection skips (#3055)

This commit is contained in:
sv99
2023-05-13 13:12:22 +03:00
committed by GitHub
parent 8d222d7f58
commit 48b71b34b1
14 changed files with 60 additions and 26 deletions

View File

@ -127,7 +127,7 @@ public abstract class TestUtils {
public static byte[] readHeaderOfFile(File file, int size) throws IOException {
byte[] buffer = new byte[size];
InputStream inputStream = new FileInputStream(file);
InputStream inputStream = Files.newInputStream(file.toPath());
if (inputStream.read(buffer) != buffer.length) {
throw new IOException("File size too small for buffer length: " + size);
}