Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
2.5.3
-
None
-
None
Description
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?
Attachments
Issue Links
- duplicates
-
JAVA-672 JSON.parse should throw an exception if the input string is not fully consumed
-
- Closed
-