Skip to content

Commit 0896920

Browse files
committed
feat(jvm/JDK-8176425): Add radix indication in NumberFormatException message
1 parent b6ea27c commit 0896920

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

framework/src/test/java/org/tron/core/jsonrpc/JsonrpcServiceTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,8 @@ public void testGetByJsonBlockId() {
434434
getByJsonBlockId("0xxabc", wallet);
435435
Assert.fail("Expected to be thrown");
436436
} catch (Exception e) {
437-
Assert.assertEquals("For input string: \"xabc\"", e.getMessage());
437+
// https://bugs.openjdk.org/browse/JDK-8176425, from JDK 12, the exception message is changed
438+
Assert.assertTrue(e.getMessage().startsWith("For input string: \"xabc\""));
438439
}
439440
}
440441

0 commit comments

Comments
 (0)