Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,18 @@ public void testCoverageFilter() throws IOException, SAXException {
DetailedDiff detailXmlDiff = new DetailedDiff(xmlDiff);

List<Difference> differences = detailXmlDiff.getAllDifferences();
boolean isJava11 = System.getProperty("java.version").startsWith("11.");
if (isJava11 && differences.size() == 1) {
// Java 11 produces different results for transforms than Java 8
// The expected result is produced with Java 8
boolean compareXpathOnly = differences.size() == 1;
if (compareXpathOnly) {
// Java 11/17 produces different results for transforms than Java 8
// The expected result is produced with Java 17
// if the only thing that's different is the content of coordinates everything is fine
final String coordinatesPath =
"/GetRecords[1]/Query[1]/Constraint[1]/Filter[1]/Intersects[1]/Polygon[1]/outerBoundaryIs[1]/LinearRing[1]/coordinates[1]/text()[1]";
// if the difference is NOT the coordinates -> we have a problem
assertEquals("Something else than coordinates transform differ in expected and result",
coordinatesPath, differences.get(0).getTestNodeDetail().getXpathLocation());
} else {
assertTrue("Should get expected coverage request" + xmlDiff, xmlDiff.similar());
}
assertTrue("Should get expected coverage request" + xmlDiff, xmlDiff.similar());
}

private Filter createLikeFilter(final String searchCriterion,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<gml:Polygon>
<gml:outerBoundaryIs>
<gml:LinearRing>
<gml:coordinates>23.083853558742444,61.68603143255835 23.154502321133286,61.11738336517864 25.015612251028788,61.15751214782019 24.979072737465852,61.727115825195206 23.083853558742444,61.68603143255835</gml:coordinates>
<gml:coordinates>23.08385355874244,61.686031432558345 23.154502321133286,61.11738336517864 25.01561225102878,61.15751214782019 24.97907273746585,61.72711582519521 23.08385355874244,61.686031432558345</gml:coordinates>
</gml:LinearRing>
</gml:outerBoundaryIs>
</gml:Polygon>
Expand Down
Loading