geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r412229 - /geronimo/xbean/trunk/xbean-server/src/main/java/org/apache/xbean/server/spring/configuration/ClassLoaderXmlPreprocessor.java
Date Tue, 06 Jun 2006 22:29:17 GMT
Author: gnodet
Date: Tue Jun  6 15:29:17 2006
New Revision: 412229

URL: http://svn.apache.org/viewvc?rev=412229&view=rev
Log:
Fix XBEAN-13: NPE when using <classpath><location> tag with non existing locations

Modified:
    geronimo/xbean/trunk/xbean-server/src/main/java/org/apache/xbean/server/spring/configuration/ClassLoaderXmlPreprocessor.java

Modified: geronimo/xbean/trunk/xbean-server/src/main/java/org/apache/xbean/server/spring/configuration/ClassLoaderXmlPreprocessor.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-server/src/main/java/org/apache/xbean/server/spring/configuration/ClassLoaderXmlPreprocessor.java?rev=412229&r1=412228&r2=412229&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-server/src/main/java/org/apache/xbean/server/spring/configuration/ClassLoaderXmlPreprocessor.java
(original)
+++ geronimo/xbean/trunk/xbean-server/src/main/java/org/apache/xbean/server/spring/configuration/ClassLoaderXmlPreprocessor.java
Tue Jun  6 15:29:17 2006
@@ -88,7 +88,11 @@
             URL[] urls = new URL[classpath.size()];
             for (ListIterator iterator = classpath.listIterator(); iterator.hasNext();) {
                 String location = (String) iterator.next();
-                urls[iterator.previousIndex()] = repository.getResource(location);
+                URL url = repository.getResource(location);
+                if (url == null) {
+                    throw new FatalBeanException("Unable to resolve classpath location "
+ location);
+                }
+                urls[iterator.previousIndex()] = url;
             }
 
             // create the classloader



Mime
View raw message