gra-m / DBServer

Database server project
0 stars 0 forks source link

SpotBugs02: Not ignoring but testing results of inputStream.read() #50

Closed gra-m closed 2 years ago

gra-m commented 2 years ago

image

gra-m commented 2 years ago

fixing with GeneralUtil method that tests result against original byte array length:

dbFile.seek(rowsBytePosition + BOOLEAN_LENGTH_IN_BYTES + BOOLEAN_LENGTH_IN_BYTES + INTEGER_LENGTH_IN_BYTES); // 6 bytes boolean + int
                data = new byte[recordLength];
                int readLength = this.dbFile.read(data);
                GeneralUtils.testInputStreamReadLength("@BFH/readRawRecord", readLength, recordLength);