From 57f90ad4ef78614afb173c6c8b5c12f220f41988 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 7 Sep 2009 18:07:17 +0000 Subject: [PATCH] polishing --- .../orm/jpa/AbstractEntityManagerFactoryBean.java | 2 +- .../orm/jpa/LocalContainerEntityManagerFactoryBean.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/org.springframework.orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java b/org.springframework.orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java index 52e1fb01c4..2c521230e7 100644 --- a/org.springframework.orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java +++ b/org.springframework.orm/src/main/java/org/springframework/orm/jpa/AbstractEntityManagerFactoryBean.java @@ -112,7 +112,7 @@ public abstract class AbstractEntityManagerFactoryBean implements */ public void setPersistenceProviderClass(Class persistenceProviderClass) { Assert.isAssignable(PersistenceProvider.class, persistenceProviderClass); - this.persistenceProvider = (PersistenceProvider) BeanUtils.instantiateClass(persistenceProviderClass); + this.persistenceProvider = BeanUtils.instantiateClass(persistenceProviderClass); } /** diff --git a/org.springframework.orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java b/org.springframework.orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java index 9f60149cda..62a5734e63 100644 --- a/org.springframework.orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java +++ b/org.springframework.orm/src/main/java/org/springframework/orm/jpa/LocalContainerEntityManagerFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2008 the original author or authors. + * Copyright 2002-2009 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -208,7 +208,7 @@ public class LocalContainerEntityManagerFactoryBean extends AbstractEntityManage "No PersistenceProvider specified in EntityManagerFactory configuration, " + "and chosen PersistenceUnitInfo does not specify a provider class name either"); } - Class providerClass = ClassUtils.resolveClassName(providerClassName, getBeanClassLoader()); + Class providerClass = ClassUtils.resolveClassName(providerClassName, getBeanClassLoader()); provider = (PersistenceProvider) BeanUtils.instantiateClass(providerClass); } if (provider == null) {