Skip to content

Commit b6ed0d4

Browse files
author
John J. Aylward
committed
fix failing test case in Java1.7
1 parent 75f656f commit b6ed0d4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/java/org/json/junit/JSONObjectTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ public void stringToValueNumbersTest() {
946946
assertTrue( "Integer.MAX_VALUE should still be an Integer!",
947947
JSONObject.stringToValue( new Integer( Integer.MAX_VALUE ).toString() ) instanceof Integer );
948948
assertTrue( "Large integers should be a Long!",
949-
JSONObject.stringToValue( new Long( Long.sum( Integer.MAX_VALUE, 1 ) ).toString() ) instanceof Long );
949+
JSONObject.stringToValue( Long.valueOf(((long)Integer.MAX_VALUE) + 1 ) .toString() ) instanceof Long );
950950
assertTrue( "Long.MAX_VALUE should still be an Integer!",
951951
JSONObject.stringToValue( new Long( Long.MAX_VALUE ).toString() ) instanceof Long );
952952

0 commit comments

Comments
 (0)