-
Bug
-
Resolution: Done
-
Major
-
3.3.x-prod-ip6.0, 3.8.0.Final, 4.0.0.Beta2
-
None
-
None
When a string comes from a JSON document containing an escaped u character, the JsonReader class incorrectly expects (always) a Unicode escape character. This is an incorrect assumption.
For example, the following is a legal path on Windows:
"url" : "jdbc:h2:file:path\\upstream.jboss-integration.modeshape\\modeshape-jcr\\target/db/h2/modeshape;DB_CLOSE_DELAY=-1"
while the JsonReader expects after \u a series of numbers, raising the following exception:
java.lang.NumberFormatException: For input string: "pstr" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:492) at org.infinispan.schematic.internal.document.JsonReader$DateValueMatcher.unescapeValue(JsonReader.java:986) at org.infinispan.schematic.internal.document.JsonReader$DateValueMatcher.parseValue(JsonReader.java:950) at org.infinispan.schematic.internal.document.JsonReader$Parser.parseValue(JsonReader.java:517) at org.infinispan.schematic.internal.document.JsonReader$Parser.parseDocument(JsonReader.java:420) at org.infinispan.schematic.internal.document.JsonReader$Parser.parseValue(JsonReader.java:505) at org.infinispan.schematic.internal.document.JsonReader$Parser.parseDocument(JsonReader.java:420) at org.infinispan.schematic.internal.document.JsonReader$Parser.parseValue(JsonReader.java:505) at org.infinispan.schematic.internal.document.JsonReader$Parser.parseDocument(JsonReader.java:420) at org.infinispan.schematic.internal.document.JsonReader$Parser.parseDocument(JsonReader.java:364) at org.infinispan.schematic.internal.document.JsonReader.read(JsonReader.java:211) at org.infinispan.schematic.internal.document.JsonReader.read(JsonReader.java:196) at org.infinispan.schematic.internal.document.JsonReader.read(JsonReader.java:180) at org.infinispan.schematic.internal.document.JsonReader.read(JsonReader.java:115) at org.infinispan.schematic.document.Json.read(Json.java:198)