diff --git a/src/main/java/ch/geowerkstatt/ilivalidator/extensions/functions/PolylinesOverlapIoxPlugin.java b/src/main/java/ch/geowerkstatt/ilivalidator/extensions/functions/PolylinesOverlapIoxPlugin.java index f94a6c4..9d7f2e0 100644 --- a/src/main/java/ch/geowerkstatt/ilivalidator/extensions/functions/PolylinesOverlapIoxPlugin.java +++ b/src/main/java/ch/geowerkstatt/ilivalidator/extensions/functions/PolylinesOverlapIoxPlugin.java @@ -54,13 +54,13 @@ protected Value evaluateInternal(String validationKind, String usageScope, IomOb } Collection inputObjects = argObjects.getComplexObjects(); - boolean hasObjectIds = inputObjects.stream().anyMatch(o -> o.getobjectoid() != null); + List objectIds = inputObjects.stream().map(IomObject::getobjectoid).collect(Collectors.toList()); + boolean hasObjectIds = objectIds.stream().allMatch(Objects::nonNull); if (!hasObjectIds) { List lines = convertToJTSLines(polylineObjects); return new Value(hasEqualLinePart(lines)); } - List objectIds = inputObjects.stream().map(IomObject::getobjectoid).collect(Collectors.toList()); HasEqualLinePartKey key = new HasEqualLinePartKey(objectIds, argPath.isUndefined() ? null : argPath.getValue()); boolean hasOverlap = HAS_EQUAL_LINE_PART_CACHE.computeIfAbsent(key, k -> {