Browse Source

Clarified exception handling.

pull/183/merge
Kalle Stenflo 9 years ago
parent
commit
9a98961e21
  1. 17
      json-path/src/main/java/com/jayway/jsonpath/JsonPath.java

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

@ -195,15 +195,16 @@ public class JsonPath {
} catch (RuntimeException e){
if(!optSuppressExceptions){
throw e;
}
}
if(optAsPathList){
return (T)configuration.jsonProvider().createArray();
} else {
if(optAlwaysReturnList){
return (T)configuration.jsonProvider().createArray();
} else {
return (T)(path.isDefinite() ? null : configuration.jsonProvider().createArray());
if(optAsPathList){
return (T)configuration.jsonProvider().createArray();
} else {
if(optAlwaysReturnList){
return (T)configuration.jsonProvider().createArray();
} else {
return (T)(path.isDefinite() ? null : configuration.jsonProvider().createArray());
}
}
}
}
}

Loading…
Cancel
Save