diff --git a/hibernate-core/src/main/java/org/hibernate/loader/Loader.java b/hibernate-core/src/main/java/org/hibernate/loader/Loader.java index 2024972e39..6766ccce14 100644 --- a/hibernate-core/src/main/java/org/hibernate/loader/Loader.java +++ b/hibernate-core/src/main/java/org/hibernate/loader/Loader.java @@ -2592,7 +2592,9 @@ public abstract class Loader { if ( stats ) startTime = System.currentTimeMillis(); try { - final SqlStatementWrapper wrapper = executeQueryStatement( queryParameters, true, Collections.emptyList(), session ); + // Don't use Collections#emptyList() here -- follow on locking potentially adds AfterLoadActions, + // so the list cannot be immutable. + final SqlStatementWrapper wrapper = executeQueryStatement( queryParameters, true, new ArrayList(), session ); final ResultSet rs = wrapper.getResultSet(); final PreparedStatement st = (PreparedStatement) wrapper.getStatement();