Skip to content
Open
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
11 changes: 5 additions & 6 deletions src/classes/Collection.cls
Original file line number Diff line number Diff line change
Expand Up @@ -534,12 +534,11 @@ public inherited sharing class Collection {
private Map<SObjectField, List<PredicateNode>> groupNodesByField() {
final Map<SObjectField, List<PredicateNode>> values = new Map<SObjectField, List<PredicateNode>>();
for (PredicateNode predicateNode : predicateNodes) {
List<PredicateNode> nodes = values.get(predicateNode.field);
if (nodes == null) {
nodes = new List<PredicateNode>();
values.put(predicateNode.field, nodes);
if (values.containsKey(predicateNode.field) {
values.get(predicateNode.field).add(predicateNode);
} else {
values.put(predicateNode.field, new List<PredicateNode>{ predicateNode });
}
nodes.add(predicateNode);
}
return values;
}
Expand Down Expand Up @@ -693,4 +692,4 @@ public inherited sharing class Collection {
}

public class CollectionException extends Exception { }
}
}