geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r631811 - /geronimo/server/branches/2.1/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
Date Thu, 28 Feb 2008 01:59:04 GMT
Author: djencks
Date: Wed Feb 27 17:59:03 2008
New Revision: 631811

URL: http://svn.apache.org/viewvc?rev=631811&view=rev
Log:
GERONIMO-3880 Make sure jarFileUrls are always non-null

Modified:
    geronimo/server/branches/2.1/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java

Modified: geronimo/server/branches/2.1/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java?rev=631811&r1=631810&r2=631811&view=diff
==============================================================================
--- geronimo/server/branches/2.1/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
(original)
+++ geronimo/server/branches/2.1/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
Wed Feb 27 17:59:03 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>();



Mime
View raw message