Browse Source

java 6 support

also, to run tests you have to downgrade org.assertj:assertj-core to 1.7.0
pull/142/head
Alexey Makeyev 9 years ago
parent
commit
22bd223f58
  1. 2
      json-path-assert/src/main/java/com/jayway/jsonassert/impl/JsonAsserterImpl.java
  2. 2
      json-path/src/main/java/com/jayway/jsonpath/internal/PathRef.java

2
json-path-assert/src/main/java/com/jayway/jsonassert/impl/JsonAsserterImpl.java

@ -33,7 +33,7 @@ public class JsonAsserterImpl implements JsonAsserter {
try {
obj = JsonPath.<T>read(jsonObject, path);
} catch (Exception e) {
throw new AssertionError(String.format("Error reading JSON path [%s]", path), e);
throw new AssertionError(String.format("Error reading JSON path [%s]: %s", path, e));
}
if (!matcher.matches(obj)) {

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

@ -154,7 +154,7 @@ public abstract class PathRef implements Comparable<PathRef> {
public int compareTo(PathRef o) {
if(o instanceof ArrayIndexPathRef){
ArrayIndexPathRef pf = (ArrayIndexPathRef) o;
return Integer.compare(pf.index, this.index);
return Integer.valueOf(pf.index).compareTo(this.index);
}
return super.compareTo(o);
}

Loading…
Cancel
Save