Skip to content

Commit

Permalink
Merge pull request #48 from stekaz/uniqueEntries
Browse files Browse the repository at this point in the history
Fix the uniqueEntries filtering
  • Loading branch information
nvnieuwk authored Sep 9, 2024
2 parents 54c96b0 + 7bd837b commit b5e6370
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
1. The help parameters are now no longer unexpected parameters when validating parameters.
2. Fixed a typo in the docs
3. Added a URL to the help message migration docs to the `paramsHelp()` deprecation message
4. Resolved an issue where the UniqueEntriesEvaluator did not correctly detect non-unique combinations.

# Version 2.1.0 - Tantanmen

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class UniqueEntriesEvaluator implements Evaluator {
}
def Map<String,JsonNode> filteredNodes = nodeEntry
.asObject()
.dropWhile { k,v -> !uniqueEntries.contains(k) }
.findAll { k,v -> uniqueEntries.contains(k) }
.collectEntries { k,v -> [k, v.asString()] }
for (uniqueNode : uniques) {
if(filteredNodes.equals(uniqueNode)) {
Expand All @@ -52,4 +52,4 @@ class UniqueEntriesEvaluator implements Evaluator {

return Evaluator.Result.success()
}
}
}

0 comments on commit b5e6370

Please sign in to comment.