diff --git a/hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/EntityBinding.java b/hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/EntityBinding.java index 2280e985af..e9c5d70d13 100644 --- a/hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/EntityBinding.java +++ b/hibernate-core/src/main/java/org/hibernate/metamodel/spi/binding/EntityBinding.java @@ -25,6 +25,7 @@ package org.hibernate.metamodel.spi.binding; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.List; @@ -564,8 +565,8 @@ public class EntityBinding extends AbstractAttributeBindingContainer implements this.jpaCallbackClasses = jpaCallbackClasses; } - public Iterable getJpaCallbackClasses() { - return jpaCallbackClasses; + public List getJpaCallbackClasses() { + return Collections.unmodifiableList( jpaCallbackClasses ); } //-------------------------- //meta methods for persister , to improve performance, these methods below should really be replaced as ValueHolder