Browse Source

Fixed PatternNode.toString()

pull/183/merge
Kalle Stenflo 9 years ago
parent
commit
6e7cf25281
  1. 9
      json-path/src/main/java/com/jayway/jsonpath/internal/filter/ValueNode.java

9
json-path/src/main/java/com/jayway/jsonpath/internal/filter/ValueNode.java

@ -264,10 +264,11 @@ public abstract class ValueNode {
if((compiledPattern.flags() & Pattern.CASE_INSENSITIVE) == Pattern.CASE_INSENSITIVE){
flags = "i";
}
return "/" + pattern + "/" + flags;
if(!pattern.startsWith("/")){
return "/" + pattern + "/" + flags;
} else {
return pattern;
}
}
@Override

Loading…
Cancel
Save