diff --git a/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/ImportDMNResolverUtil.java b/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/ImportDMNResolverUtil.java index 5fd09fff718..b17d68d7c71 100644 --- a/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/ImportDMNResolverUtil.java +++ b/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/ImportDMNResolverUtil.java @@ -50,8 +50,8 @@ public static Either resolveImportDMN(Import importElement, Colle importNamespace, importName, importLocationURI, importModelName); List matchingDmns = dmns.stream() - .filter(m -> idExtractor.apply(m).getNamespaceURI().equals(importNamespace)) - .collect(Collectors.toList()); + .filter(m -> idExtractor.apply(m).getNamespaceURI().equals(importNamespace)) + .collect(Collectors.toList()); if (matchingDmns.size() == 1) { T located = matchingDmns.get(0); // Check if the located DMN Model in the NS, correspond for the import `drools:modelName`. @@ -70,7 +70,7 @@ public static Either resolveImportDMN(Import importElement, Colle } } else { List usingNSandName = matchingDmns.stream() - .filter(m -> idExtractor.apply(m).getLocalPart().equals(importModelName)) + .filter(dmn -> idExtractor.apply(dmn).getLocalPart().equals(importModelName)) .toList(); if (usingNSandName.size() == 1) { LOGGER.debug("DMN Import with namespace={} name={} locationURI={}, modelName={} resolved!", @@ -85,9 +85,9 @@ public static Either resolveImportDMN(Import importElement, Colle } else { LOGGER.error("Found {} number of collision resolving an Imported DMN with namespace={} name={} locationURI={}, modelName={}", usingNSandName.size(), importNamespace, importName, importLocationURI, importModelName); - return Either.ofLeft(String.format("Found a collision resolving an Imported DMN with %s namespace, %s " + - "name and modelName %s. There are %s DMN files with the same namespace in your project. Please " + - "change the DMN namespaces and make them unique to fix this issue.", + return Either.ofLeft(String.format("Found a collision resolving an Imported DMN with %s namespace, " + + "%s name and modelName %s. There are %s DMN files with the same namespace in your project. " + + "Please change the DMN namespaces and make them unique to fix this issue.", importNamespace, importName, importModelName, usingNSandName.size())); } }