Skip to content

Commit f619547

Browse files
cigalybeikov
authored andcommitted
HHH-19719 Prevent IndexOutOfBoundsException when no arguments
1 parent 5097326 commit f619547

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

hibernate-core/src/main/java/org/hibernate/query/sqm/function/SelfRenderingSqmWindowFunction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public void appendHqlString(StringBuilder sb) {
124124
sb.append( getFunctionName() );
125125
sb.append( '(' );
126126
int i = 1;
127-
if ( arguments.get( 0 ) instanceof SqmDistinct<?> ) {
127+
if ( !arguments.isEmpty() && arguments.get( 0 ) instanceof SqmDistinct<?> ) {
128128
arguments.get( 0 ).appendHqlString( sb );
129129
if ( arguments.size() > 1 ) {
130130
sb.append( ' ' );

0 commit comments

Comments
 (0)