Skip to content

Commit

Permalink
HHH-15720 Using multiple select in a multiselect generates java.lang.…
Browse files Browse the repository at this point in the history
…ArrayIndexOutOfBoundsException
  • Loading branch information
dreab8 committed Jul 3, 2023
1 parent 0b8384c commit afd3bee
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -8241,7 +8241,15 @@ private static int countIndividualSelections(List<? extends SqmAliasedNode<?>> s
offset = countIndividualSelections( ( (SqmDynamicInstantiation<?>) selectableNode ).getArguments() ) - 1;
}
else if ( selectableNode instanceof SqmJpaCompoundSelection<?> ) {
offset += ( (SqmJpaCompoundSelection<?>) selectableNode ).getSelectionItems().size() - 1;
for ( SqmSelectableNode<?> node : ( (SqmJpaCompoundSelection<?>) selectableNode ).getSelectionItems() ) {
if ( node instanceof SqmDynamicInstantiation<?> ) {
offset += countIndividualSelections( ( (SqmDynamicInstantiation<?>) node ).getArguments() ) ;
}
else {
offset += 1;
}
}
offset -= 1;
}
}
return offset + selections.size();
Expand Down

0 comments on commit afd3bee

Please sign in to comment.