@@ -71,7 +71,7 @@ public void init() {
7171
7272 @Test
7373 public void checkSkip() throws IOException {
74- try (DataHandle<? extends Location> handle = createHandle()) {
74+ try (final DataHandle<? extends Location> handle = createHandle()) {
7575 handle.seek(0);
7676 handle.skip(10);
7777 assertEquals(10, handle.offset());
@@ -83,7 +83,7 @@ public void checkSkip() throws IOException {
8383 @Test
8484 public void testEndianesSettings() throws IOException {
8585
86- try (DataHandle<? extends Location> handle = createHandle()) {
86+ try (final DataHandle<? extends Location> handle = createHandle()) {
8787 final ByteOrder original = handle.getOrder();
8888
8989 handle.setOrder(ByteOrder.BIG_ENDIAN);
@@ -120,7 +120,7 @@ public void testReading() throws IOException {
120120
121121 @Test
122122 public void testWriting() throws IOException {
123- try (DataHandle<? extends Location> handle = createHandle()) {
123+ try (final DataHandle<? extends Location> handle = createHandle()) {
124124 checkBasicWriteMethods(handle);
125125 final Location loc = createLocation();
126126 checkWriteEndianes(() -> dataHandleService.create(loc),
@@ -405,28 +405,28 @@ public <L extends Location> void checkAdvancedStringWriting(
405405 {
406406 // test writeUTF() / readUTF()
407407 final String utfTestString = "abcäúöäéëåáðßø¶🤓🍕😋";
408- try (DataHandle<L> writeHandle = writeHandleCreator.get()) {
408+ try (final DataHandle<L> writeHandle = writeHandleCreator.get()) {
409409 writeHandle.writeUTF(utfTestString);
410410 }
411- try (DataHandle<L> readHandle = readHandleCreator.get()) {
411+ try (final DataHandle<L> readHandle = readHandleCreator.get()) {
412412 assertEquals(utfTestString, readHandle.readUTF());
413413 }
414414
415415 // test writeLine()
416416 final String testString = "The quick brown fox jumps over the lazy dog.";
417- try (DataHandle<L> writeHandle = writeHandleCreator.get()) {
417+ try (final DataHandle<L> writeHandle = writeHandleCreator.get()) {
418418 writeHandle.writeLine(testString);
419419 }
420- try (DataHandle<L> readHandle = readHandleCreator.get()) {
420+ try (final DataHandle<L> readHandle = readHandleCreator.get()) {
421421 assertEquals(testString, readHandle.readLine());
422422 }
423423
424424 // test writeChars / findString
425425 final String testString2 = "The five boxing wizards jump quickly.";
426- try (DataHandle<L> writeHandle = writeHandleCreator.get()) {
426+ try (final DataHandle<L> writeHandle = writeHandleCreator.get()) {
427427 writeHandle.writeChars(testString2);
428428 }
429- try (DataHandle<L> readHandle = readHandleCreator.get()) {
429+ try (final DataHandle<L> readHandle = readHandleCreator.get()) {
430430 for (int i = 0; i < testString2.length(); i++) {
431431 assertEquals(testString2.charAt(i), readHandle.readChar());
432432 }
@@ -459,14 +459,14 @@ public <L extends Location> void checkWriteEndianes(
459459 final boolean little = order == ByteOrder.LITTLE_ENDIAN;
460460
461461 // test writeChar()
462- try (DataHandle<L> writeHandle = writeHandleCreator.get()) {
462+ try (final DataHandle<L> writeHandle = writeHandleCreator.get()) {
463463 writeHandle.setOrder(order);
464464 for (int i = 0; i < BYTES.length / 2; i += 2) {
465465 writeHandle.writeChar(Bytes.toInt(BYTES, i, 2, little));
466466 }
467467 }
468468
469- try (DataHandle<L> readHandle = readHandleCreator.get()) {
469+ try (final DataHandle<L> readHandle = readHandleCreator.get()) {
470470 readHandle.setOrder(order);
471471 for (int i = 0; i < BYTES.length / 2; i += 2) {
472472 assertEquals(msg(i), Bytes.toShort(BYTES, i, little), readHandle
@@ -475,14 +475,14 @@ public <L extends Location> void checkWriteEndianes(
475475 }
476476
477477 // test writeShort()
478- try (DataHandle<L> writeHandle = writeHandleCreator.get()) {
478+ try (final DataHandle<L> writeHandle = writeHandleCreator.get()) {
479479 writeHandle.setOrder(order);
480480 for (int i = 0; i < BYTES.length / 2; i += 2) {
481481 writeHandle.writeShort(Bytes.toShort(BYTES, i, little));
482482 }
483483 }
484484
485- try (DataHandle<L> readHandle = readHandleCreator.get()) {
485+ try (final DataHandle<L> readHandle = readHandleCreator.get()) {
486486 readHandle.setOrder(order);
487487 for (int i = 0; i < BYTES.length / 2; i += 2) {
488488 assertEquals(msg(i), Bytes.toShort(BYTES, i, little), readHandle
@@ -491,13 +491,13 @@ public <L extends Location> void checkWriteEndianes(
491491 }
492492
493493 // test writeInt()
494- try (DataHandle<L> writeHandle = writeHandleCreator.get()) {
494+ try (final DataHandle<L> writeHandle = writeHandleCreator.get()) {
495495 writeHandle.setOrder(order);
496496 for (int i = 0; i < BYTES.length / 4; i += 4) {
497497 writeHandle.writeInt(Bytes.toInt(BYTES, i, little));
498498 }
499499 }
500- try (DataHandle<L> readHandle = readHandleCreator.get()) {
500+ try (final DataHandle<L> readHandle = readHandleCreator.get()) {
501501 readHandle.setOrder(order);
502502 for (int i = 0; i < BYTES.length / 4; i += 4) {
503503 assertEquals(msg(i), Bytes.toInt(BYTES, i, little), readHandle
@@ -506,13 +506,13 @@ public <L extends Location> void checkWriteEndianes(
506506 }
507507
508508 // test writeLong()
509- try (DataHandle<L> writeHandle = writeHandleCreator.get()) {
509+ try (final DataHandle<L> writeHandle = writeHandleCreator.get()) {
510510 writeHandle.setOrder(order);
511511 for (int i = 0; i < BYTES.length / 8; i += 8) {
512512 writeHandle.writeLong(Bytes.toLong(BYTES, i, little));
513513 }
514514 }
515- try (DataHandle<L> readHandle = readHandleCreator.get()) {
515+ try (final DataHandle<L> readHandle = readHandleCreator.get()) {
516516 readHandle.setOrder(order);
517517 for (int i = 0; i < BYTES.length / 8; i += 8) {
518518 assertEquals(msg(i), Bytes.toLong(BYTES, i, little), readHandle
@@ -521,13 +521,13 @@ public <L extends Location> void checkWriteEndianes(
521521 }
522522
523523 // test writeFloat()
524- try (DataHandle<L> writeHandle = writeHandleCreator.get()) {
524+ try (final DataHandle<L> writeHandle = writeHandleCreator.get()) {
525525 writeHandle.setOrder(order);
526526 for (int i = 0; i < BYTES.length / 4; i += 4) {
527527 writeHandle.writeFloat(Bytes.toFloat(BYTES, i, little));
528528 }
529529 }
530- try (DataHandle<L> readHandle = readHandleCreator.get()) {
530+ try (final DataHandle<L> readHandle = readHandleCreator.get()) {
531531 readHandle.setOrder(order);
532532 for (int i = 0; i < BYTES.length / 4; i += 4) {
533533 assertEquals(msg(i), Bytes.toFloat(BYTES, i, little), readHandle
@@ -536,13 +536,13 @@ public <L extends Location> void checkWriteEndianes(
536536 }
537537
538538 // test writeDouble()
539- try (DataHandle<L> writeHandle = writeHandleCreator.get()) {
539+ try (final DataHandle<L> writeHandle = writeHandleCreator.get()) {
540540 writeHandle.setOrder(order);
541541 for (int i = 0; i < BYTES.length / 8; i += 8) {
542542 writeHandle.writeDouble(Bytes.toDouble(BYTES, i, little));
543543 }
544544 }
545- try (DataHandle<L> readHandle = readHandleCreator.get()) {
545+ try (final DataHandle<L> readHandle = readHandleCreator.get()) {
546546 readHandle.setOrder(order);
547547 for (int i = 0; i < BYTES.length / 8; i += 8) {
548548 assertEquals(msg(i), Bytes.toDouble(BYTES, i, little), readHandle
0 commit comments