-
Type: Bug
-
Resolution: Duplicate
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.5.3
-
Component/s: None
-
Labels:None
It seems strange that this test passes, but it does:
@org.junit.Test public void testJSONParseOfPartialLong() { Object obj = com.mongodb.util.JSON.parse("666 is the devil"); Assert.assertEquals(Long.valueOf(666), obj); }
We happen to be using that method to parse a query parameter to one of our REST endpoints, and it bit us. Should it not throw a JSONParseException instead of swallowing " is the devil" silently?
- duplicates
-
JAVA-672 JSON.parse should throw an exception if the input string is not fully consumed
- Closed