HHH-7736 : Change EntityBinding.getJpaCallbackClasses() to return an unmodifiable list

This commit is contained in:
Gail Badner 2013-01-16 18:49:12 -08:00
parent 54050ca880
commit 1b436ef975
1 changed files with 3 additions and 2 deletions

View File

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