public void testVersionChange() throws IOException {
fCheckpointCollection.setIndexComplete();
fCheckpointCollection.dispose();
- RandomAccessFile f = new RandomAccessFile(fFile, "rw");
- f.writeInt(-1);
- f.close();
+ try (RandomAccessFile f = new RandomAccessFile(fFile, "rw");) {
+ f.writeInt(-1);
+ }
fCheckpointCollection = createCollection();
assertTrue(fCheckpointCollection.isCreatedFromScratch());
}
boolean random = true;
- ArrayList<Integer> list = new ArrayList<Integer>();
+ ArrayList<Integer> list = new ArrayList<>();
for (int i = 0; i < CHECKPOINTS_INSERT_NUM; i++) {
if (random) {
Random rand = new Random();
}
boolean random = true;
- ArrayList<Integer> list = new ArrayList<Integer>();
+ ArrayList<Integer> list = new ArrayList<>();
for (int i = 0; i < CHECKPOINTS_INSERT_NUM; i++) {
if (random) {
Random rand = new Random();