bbenet / json-path

Automatically exported from code.google.com/p/json-path
0 stars 0 forks source link

StringIndexOutOfBoundsException when compiling path #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
json path 1.1.0

Very easy to reproduce:

 JsonPath.compile("$.");

throws 

Caused by: java.lang.StringIndexOutOfBoundsException: String index out of 
range: 2
    at java.lang.String.charAt(String.java:658)
    at com.jayway.jsonpath.internal.PathCompiler.compile(PathCompiler.java:110)
    at com.jayway.jsonpath.JsonPath.<init>(JsonPath.java:98)
    at com.jayway.jsonpath.JsonPath.compile(JsonPath.java:374)

Used to work in json path 0.9

Original issue reported on code.google.com by martin.a...@gmail.com on 23 Oct 2014 at 8:30

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Should throw InvalidPathException.

Original comment by kalle.st...@gmail.com on 31 Oct 2014 at 12:10

GoogleCodeExporter commented 8 years ago
So should $.results[?

Original comment by foober...@gmail.com on 20 Jan 2015 at 2:21

GoogleCodeExporter commented 8 years ago
This was fixed in f8209fcc40693a012571614fe638ef1844c84f0b

Original comment by foober...@gmail.com on 13 Feb 2015 at 2:32

GoogleCodeExporter commented 8 years ago

Original comment by kalle.st...@gmail.com on 5 Mar 2015 at 9:23