Browse Source

Fix array out of bounds exception on '$.' path expression

pull/74/head
David Lee 10 years ago
parent
commit
11c64b0298
  1. 2
      json-path/src/main/java/com/jayway/jsonpath/internal/PathCompiler.java

2
json-path/src/main/java/com/jayway/jsonpath/internal/PathCompiler.java

@ -109,7 +109,7 @@ public class PathCompiler {
break;
case PERIOD:
i++;
if (path.charAt(i) == PERIOD) {
if ( i < path.length() && path.charAt(i) == PERIOD) {
//This is a deep scan
fragment = "..";
i++;

Loading…
Cancel
Save