Browse Source

Use length==0 instead of "isEmpty" which crashes on Android 2.2 where the method is missing.

pull/8/head
linton 13 years ago
parent
commit
b6b0b58a8f
  1. 2
      json-path/src/main/java/com/jayway/jsonpath/JsonPath.java

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

@ -104,7 +104,7 @@ public class JsonPath {
public JsonPath(String jsonPath, Filter[] filters) {
if (jsonPath == null ||
jsonPath.trim().isEmpty() ||
jsonPath.trim().length()==0 ||
jsonPath.matches("[^\\?\\+\\=\\-\\*\\/\\!]\\(")) {
throw new InvalidPathException("Invalid path");

Loading…
Cancel
Save