Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public JpaPersistentEntityImpl(TypeInformation<T> information, ProxyIdAccessor p
super(information, null);

Assert.notNull(proxyIdAccessor, "ProxyIdAccessor must not be null");
Assert.notNull(metamodel, "JpaMetamodel must not be null");

this.proxyIdAccessor = proxyIdAccessor;
this.metamodel = metamodel;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ private JpaClassUtils() {}
*/
public static boolean isEntityManagerOfType(EntityManager em, String type) {

EntityManager entityManagerToUse = em.getDelegate()instanceof EntityManager delegate //
EntityManager entityManagerToUse = em.getDelegate() instanceof EntityManager delegate //
? delegate //
: em;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public String getCommentHintKey() {

private static final Collection<PersistenceProvider> ALL = List.of(HIBERNATE, ECLIPSELINK, GENERIC_JPA);

static ConcurrentReferenceHashMap<Class<?>, PersistenceProvider> CACHE = new ConcurrentReferenceHashMap<>();
final static ConcurrentReferenceHashMap<Class<?>, PersistenceProvider> CACHE = new ConcurrentReferenceHashMap<>();
private final Iterable<String> entityManagerClassNames;
private final Iterable<String> metamodelClassNames;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.jndi.JndiObjectFactoryBean;
import org.springframework.orm.jpa.AbstractEntityManagerFactoryBean;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
import org.springframework.util.ObjectUtils;

Expand Down Expand Up @@ -97,6 +98,8 @@ public static Iterable<String> getEntityManagerFactoryBeanNames(ListableBeanFact
public static Collection<EntityManagerFactoryBeanDefinition> getEntityManagerFactoryBeanDefinitions(
ConfigurableListableBeanFactory beanFactory) {

Assert.notNull(beanFactory, "ConfigurableListableBeanFactory must not be null!");

Set<EntityManagerFactoryBeanDefinition> definitions = new HashSet<>();

for (Class<?> type : EMF_TYPES) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
class JpaMetamodelCacheCleanup implements DisposableBean {

@Override
public void destroy() throws Exception {
public void destroy() {
JpaMetamodel.clear();
}
}