fix an IOOB exception in SqmPathRegistryImpl

This commit is contained in:
Gavin 2023-06-09 12:09:47 +02:00 committed by Gavin King
parent a3e6e06519
commit 0a98b41f0e
1 changed files with 3 additions and 2 deletions

View File

@ -293,8 +293,9 @@ public class SqmPathRegistryImpl implements SqmPathRegistry {
@Override
public SqmAliasedNode<?> findAliasedNodeByPosition(int position) {
// NOTE : 1-based
return simpleSelectionNodes.get( position - 1 );
return position > simpleSelectionNodes.size()
? null
: simpleSelectionNodes.get(position - 1);
}
@Override