@@ -34,14 +34,14 @@ public class TestSerializedMetadata {
34
34
private final Random random = new Random (872591 );
35
35
36
36
@ Test
37
+ @ SuppressWarnings ("checkstyle:AssertThatThrownByWithMessageCheck" )
37
38
public void testEmptyVariantMetadata () {
38
39
SerializedMetadata metadata = SerializedMetadata .EMPTY_V1_METADATA ;
39
40
40
41
assertThat (metadata .isSorted ()).isFalse ();
41
42
assertThat (metadata .dictionarySize ()).isEqualTo (0 );
42
- assertThatThrownBy (() -> metadata .get (0 ))
43
- .isInstanceOf (ArrayIndexOutOfBoundsException .class )
44
- .hasMessageContaining ("out of bounds" );
43
+ // no check on the underlying error msg as it might be missing based on the JDK version
44
+ assertThatThrownBy (() -> metadata .get (0 )).isInstanceOf (ArrayIndexOutOfBoundsException .class );
45
45
}
46
46
47
47
@ Test
@@ -99,6 +99,7 @@ public void testHeaderOffsetSize() {
99
99
}
100
100
101
101
@ Test
102
+ @ SuppressWarnings ("checkstyle:AssertThatThrownByWithMessageCheck" )
102
103
public void testReadString () {
103
104
SerializedMetadata metadata =
104
105
SerializedMetadata .from (
@@ -111,12 +112,12 @@ public void testReadString() {
111
112
assertThat (metadata .get (2 )).isEqualTo ("c" );
112
113
assertThat (metadata .get (3 )).isEqualTo ("d" );
113
114
assertThat (metadata .get (4 )).isEqualTo ("e" );
114
- assertThatThrownBy (() -> metadata .get (5 ))
115
- .isInstanceOf (ArrayIndexOutOfBoundsException .class )
116
- .hasMessageContaining ("out of bounds" );
115
+ // no check on the underlying error msg as it might be missing based on the JDK version
116
+ assertThatThrownBy (() -> metadata .get (5 )).isInstanceOf (ArrayIndexOutOfBoundsException .class );
117
117
}
118
118
119
119
@ Test
120
+ @ SuppressWarnings ("checkstyle:AssertThatThrownByWithMessageCheck" )
120
121
public void testMultibyteString () {
121
122
SerializedMetadata metadata =
122
123
SerializedMetadata .from (
@@ -129,12 +130,12 @@ public void testMultibyteString() {
129
130
assertThat (metadata .get (2 )).isEqualTo ("xyz" );
130
131
assertThat (metadata .get (3 )).isEqualTo ("d" );
131
132
assertThat (metadata .get (4 )).isEqualTo ("e" );
132
- assertThatThrownBy (() -> metadata .get (5 ))
133
- .isInstanceOf (ArrayIndexOutOfBoundsException .class )
134
- .hasMessageContaining ("out of bounds" );
133
+ // no check on the underlying error msg as it might be missing based on the JDK version
134
+ assertThatThrownBy (() -> metadata .get (5 )).isInstanceOf (ArrayIndexOutOfBoundsException .class );
135
135
}
136
136
137
137
@ Test
138
+ @ SuppressWarnings ("checkstyle:AssertThatThrownByWithMessageCheck" )
138
139
public void testTwoByteOffsets () {
139
140
SerializedMetadata metadata =
140
141
SerializedMetadata .from (
@@ -148,9 +149,8 @@ public void testTwoByteOffsets() {
148
149
assertThat (metadata .get (2 )).isEqualTo ("xyz" );
149
150
assertThat (metadata .get (3 )).isEqualTo ("d" );
150
151
assertThat (metadata .get (4 )).isEqualTo ("e" );
151
- assertThatThrownBy (() -> metadata .get (5 ))
152
- .isInstanceOf (ArrayIndexOutOfBoundsException .class )
153
- .hasMessageContaining ("out of bounds" );
152
+ // no check on the underlying error msg as it might be missing based on the JDK version
153
+ assertThatThrownBy (() -> metadata .get (5 )).isInstanceOf (ArrayIndexOutOfBoundsException .class );
154
154
}
155
155
156
156
@ Test
0 commit comments