Commit ad2ff272 authored by Phillip Webb's avatar Phillip Webb

Merge branch '1.5.x'

parents 4bfecc13 fac6b8da
......@@ -118,7 +118,7 @@
<jolokia.version>1.3.5</jolokia.version>
<jooq.version>3.9.0</jooq.version>
<json.version>20140107</json.version>
<jsonassert.version>1.3.0</jsonassert.version>
<jsonassert.version>1.4.0</jsonassert.version>
<json-path.version>2.2.0</json-path.version>
<jstl.version>1.2</jstl.version>
<jtds.version>1.3.1</jtds.version>
......
......@@ -987,20 +987,36 @@ public class JsonContentAssert extends AbstractAssert<JsonContentAssert, CharSeq
if (this.actual == null) {
return compareForNull(expectedJson);
}
try {
return JSONCompare.compareJSON(
(expectedJson == null ? null : expectedJson.toString()),
this.actual.toString(), compareMode);
}
catch (Exception ex) {
if (ex instanceof RuntimeException) {
throw (RuntimeException) ex;
}
throw new IllegalStateException(ex);
}
}
private JSONCompareResult compare(CharSequence expectedJson,
JSONComparator comparator) {
if (this.actual == null) {
return compareForNull(expectedJson);
}
try {
return JSONCompare.compareJSON(
(expectedJson == null ? null : expectedJson.toString()),
this.actual.toString(), comparator);
}
catch (Exception ex) {
if (ex instanceof RuntimeException) {
throw (RuntimeException) ex;
}
throw new IllegalStateException(ex);
}
}
private JSONCompareResult compareForNull(CharSequence expectedJson) {
JSONCompareResult result = new JSONCompareResult();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment