Skip to content

Commit

Permalink
Prevent a NPE when using groupBy with an attribute in ERXQuery by ini…
Browse files Browse the repository at this point in the history
…tializing the array in constructor like groupingKeys.
  • Loading branch information
spelletier committed Jun 10, 2024
1 parent 11e2f35 commit f598e58
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ protected ERXQuery() {
// Set defaults
fetchKeys = new NSMutableArray<>();
groupingKeys = new NSMutableArray<>();
groupingAttributes = new NSMutableArray<>();
orderings = new NSMutableArray<>();
refreshRefetchedObjects = false;
usesDistinct = false;
Expand Down Expand Up @@ -1275,7 +1276,6 @@ protected void computeSelectAndGroupingAttributes() {
// Initialize arrays for storing the select attributes,
// grouping attributes and sort orderings
selectAttributes = new NSMutableArray<>(20);
groupingAttributes = new NSMutableArray<>(20);

// This keeps track of EOAttribute objects used
attributesByName = new NSMutableDictionary<>();
Expand Down

0 comments on commit f598e58

Please sign in to comment.