You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2008/02/28 02:56:19 UTC
svn commit: r631810 -
/geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
Author: djencks
Date: Wed Feb 27 17:56:18 2008
New Revision: 631810
URL: http://svn.apache.org/viewvc?rev=631810&view=rev
Log:
GERONIMO-3880 Make sure jarFileUrls are always non-null
Modified:
geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
Modified: geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java?rev=631810&r1=631809&r2=631810&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java (original)
+++ geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java Wed Feb 27 17:56:18 2008
@@ -27,6 +27,7 @@
import java.util.List;
import java.util.Map;
import java.util.Properties;
+import java.util.Collections;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
@@ -52,6 +53,7 @@
* @version $Rev$ $Date$
*/
public class PersistenceUnitGBean implements GBeanLifecycle {
+ private static final List<URL> NO_URLS = Collections.emptyList();
private final String persistenceUnitRoot;
private final PersistenceUnitInfoImpl persistenceUnitInfo;
private final EntityManagerFactory entityManagerFactory;
@@ -86,7 +88,7 @@
this.persistenceUnitRoot = persistenceUnitRoot;
URI configurationBaseURI = new File(configurationBaseURL.getFile()).toURI();
URL rootURL = null;
- List<URL> jarFileUrls = null;
+ List<URL> jarFileUrls = NO_URLS;
if (!excludeUnlistedClassesValue) {
rootURL = configurationBaseURI.resolve(persistenceUnitRoot).normalize().toURL();
jarFileUrls = new ArrayList<URL>();