Skip to content

Commit e8c6cfb

Browse files
committed
Fix testDecodeStringTooLarge so it doesn't allocate a max int sized buffer
1 parent b008178 commit e8c6cfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/java/com/maxmind/db/MultiBufferTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ public void testDecodeString() throws CharacterCodingException {
321321

322322
@Test
323323
public void testDecodeStringTooLarge() {
324-
MultiBuffer buffer = new MultiBuffer((long) Integer.MAX_VALUE + 1);
324+
MultiBuffer buffer = new MultiBuffer((long) Integer.MAX_VALUE + 1, 1024);
325325
assertThrows(IllegalStateException.class, () ->
326326
buffer.decode(StandardCharsets.UTF_8.newDecoder()));
327327
}

0 commit comments

Comments
 (0)