File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
json-path/src/main/java/com/jayway/jsonpath/internal/path Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -560,6 +560,7 @@ private boolean readBracketPropertyToken(PathTokenAppender appender) {
560560 int endPosition = 0 ;
561561 boolean inProperty = false ;
562562 boolean inEscape = false ;
563+ boolean lastSignificantWasComma = false ;
563564
564565 while (path .inBounds (readPosition )) {
565566 char c = path .charAt (readPosition );
@@ -579,7 +580,13 @@ private boolean readBracketPropertyToken(PathTokenAppender appender) {
579580 } else {
580581 startPosition = readPosition + 1 ;
581582 inProperty = true ;
583+ lastSignificantWasComma = false ;
582584 }
585+ } else if (c == COMMA ){
586+ if (lastSignificantWasComma ){
587+ fail ("Found empty property at index " +readPosition );
588+ }
589+ lastSignificantWasComma = true ;
583590 }
584591 readPosition ++;
585592 }
You can’t perform that action at this time.
0 commit comments