V6043. Consider inspecting the 'for' operator. Initial and final values of the iterator are the same.
V6043 Consider inspecting the 'for' operator. Initial and final values of the iterator are the same. TestTFile.java(235)
private int readPrepWithUnknownLength(Scanner scanner, int start, int n)
throws IOException {
for (int i = start; i < start; i++) {
String key = String.format(localFormatter, i);
byte[] read = readKey(scanner);
assertTrue("keys not equal", Arrays.equals(key.getBytes(), read));
try {
read = readValue(scanner);
assertTrue(false);
}
catch (IOException ie) {
// should have thrown exception
}
String value = "value" + key;
read = readLongValue(scanner, value.getBytes().length);
assertTrue("values nto equal", Arrays.equals(read, value.getBytes()));
scanner.advance();
}
return (start + n);
}
If you feel like the New Year just came, and you missed the first half of January, then all this ...