@@ -53,7 +53,7 @@ void testReadByte() throws IOException
5353 assertEquals (-7 , dataInput .readByte ());
5454 dataInput .setPosition (dataInput .length () - 1 );
5555 assertEquals (-9 , dataInput .readByte ());
56- assertThrows (IOException .class , () -> dataInput . readByte () );
56+ assertThrows (IOException .class , dataInput :: readByte );
5757 }
5858
5959 @ Test
@@ -68,7 +68,7 @@ void testReadUnsignedByte() throws IOException
6868 assertEquals (249 , dataInput .readUnsignedByte ());
6969 dataInput .setPosition (dataInput .length () - 1 );
7070 assertEquals (247 , dataInput .readUnsignedByte ());
71- assertThrows (IOException .class , () -> dataInput . readUnsignedByte () );
71+ assertThrows (IOException .class , dataInput :: readUnsignedByte );
7272 }
7373
7474 @ Test
@@ -103,7 +103,7 @@ void testReadShort() throws IOException
103103 assertEquals ((short ) 0x000F , dataInput .readShort ());
104104 assertEquals ((short ) 0xAA00 , dataInput .readShort ());
105105 assertEquals ((short ) 0xFEFF , dataInput .readShort ());
106- assertThrows (IOException .class , () -> dataInput . readShort () );
106+ assertThrows (IOException .class , dataInput :: readShort );
107107 }
108108
109109 @ Test
@@ -114,11 +114,11 @@ void testReadUnsignedShort() throws IOException
114114 assertEquals (0x000F , dataInput .readUnsignedShort ());
115115 assertEquals (0xAA00 , dataInput .readUnsignedShort ());
116116 assertEquals (0xFEFF , dataInput .readUnsignedShort ());
117- assertThrows (IOException .class , () -> dataInput . readUnsignedShort () );
117+ assertThrows (IOException .class , dataInput :: readUnsignedShort );
118118
119119 byte [] data2 = { 0x00 };
120120 DataInput dataInput2 = new DataInputRandomAccessRead (new RandomAccessReadBuffer (data2 ));
121- assertThrows (IOException .class , () -> dataInput2 . readUnsignedShort () );
121+ assertThrows (IOException .class , dataInput2 :: readUnsignedShort );
122122 }
123123
124124 @ Test
@@ -129,11 +129,11 @@ void testReadInt() throws IOException
129129 DataInput dataInput = new DataInputRandomAccessRead (new RandomAccessReadBuffer (data ));
130130 assertEquals (0x000FAA00 , dataInput .readInt ());
131131 assertEquals (0xFEFF3050 , dataInput .readInt ());
132- assertThrows (IOException .class , () -> dataInput . readInt () );
132+ assertThrows (IOException .class , dataInput :: readInt );
133133
134134 byte [] data2 = { 0x00 , 0x0F , (byte ) 0xAA };
135135 DataInput dataInput2 = new DataInputRandomAccessRead (new RandomAccessReadBuffer (data2 ));
136- assertThrows (IOException .class , () -> dataInput2 . readInt () );
136+ assertThrows (IOException .class , dataInput2 :: readInt );
137137
138138 }
139139}
0 commit comments