geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r632359 - in /geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src: main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java test/java/org/apache/geronimo/persistence/PersistenceUnitGBeanTest.java
Date Fri, 29 Feb 2008 15:47:23 GMT
Author: djencks
Date: Fri Feb 29 07:47:21 2008
New Revision: 632359

URL: http://svn.apache.org/viewvc?rev=632359&view=rev
Log:
GERONIMO-3880 another NPE fix, for persistenceUnitRootUrl

Modified:
    geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/main/java/org/apache/geronimo/persistence/PersistenceUnitGBean.java
    geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/test/java/org/apache/geronimo/persistence/PersistenceUnitGBeanTest.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=632359&r1=632358&r2=632359&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
Fri Feb 29 07:47:21 2008
@@ -87,10 +87,9 @@
         List<String> mappingFileNames = mappingFileNamesUntyped == null? new ArrayList<String>():
new ArrayList<String>(mappingFileNamesUntyped);
         this.persistenceUnitRoot = persistenceUnitRoot;
         URI configurationBaseURI = new File(configurationBaseURL.getFile()).toURI();
-        URL rootURL = null;
+        URL rootURL = configurationBaseURI.resolve(persistenceUnitRoot).normalize().toURL();
         List<URL> jarFileUrls = NO_URLS;
         if (!excludeUnlistedClassesValue) {
-            rootURL = configurationBaseURI.resolve(persistenceUnitRoot).normalize().toURL();
             jarFileUrls = new ArrayList<URL>();
             for (String urlString: jarFileUrlsUntyped) {
                 URL url = configurationBaseURI.resolve(urlString).normalize().toURL();

Modified: geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/test/java/org/apache/geronimo/persistence/PersistenceUnitGBeanTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/test/java/org/apache/geronimo/persistence/PersistenceUnitGBeanTest.java?rev=632359&r1=632358&r2=632359&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/test/java/org/apache/geronimo/persistence/PersistenceUnitGBeanTest.java
(original)
+++ geronimo/server/trunk/plugins/openjpa/geronimo-persistence-jpa10/src/test/java/org/apache/geronimo/persistence/PersistenceUnitGBeanTest.java
Fri Feb 29 07:47:21 2008
@@ -49,5 +49,6 @@
                 new File("/foo/bar/Root").toURL(),
                 getClass().getClassLoader());
         assertNotNull(gbean.getJarFileUrls());
+        assertNotNull(gbean.getPersistenceUnitRootUrl());
     }
 }



Mime
View raw message