axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r521218 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java
Date Thu, 22 Mar 2007 11:20:21 GMT
Author: dims
Date: Thu Mar 22 04:20:21 2007
New Revision: 521218

URL: http://svn.apache.org/viewvc?view=rev&rev=521218
Log:
Prevent NPE's. Sorry Deepal.

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java?view=diff&rev=521218&r1=521217&r2=521218
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java
Thu Mar 22 04:20:21 2007
@@ -121,8 +121,8 @@
      */
     public URL findResource(String resource) {
         URL url = super.findResource(resource);
-        if (url != null) {
-            for (int i = 0; i < embedded_jars.size(); i++) {
+        if (url == null) {
+            for (int i = 0; embedded_jars != null && i < embedded_jars.size();
i++) {
                 String libjar_name = (String) embedded_jars.get(i);
                 try {
                 InputStream in = getJarAsStream(libjar_name);
@@ -158,7 +158,7 @@
         while (e.hasMoreElements()) {
             resources.add(e.nextElement());
         }
-        for (int i = 0; i < embedded_jars.size(); i++) {
+        for (int i = 0; embedded_jars != null && i < embedded_jars.size(); i++)
{
             String libjar_name = (String) embedded_jars.get(i);
             try {
             InputStream in = getJarAsStream(libjar_name);
@@ -189,7 +189,7 @@
      * @throws java.io.IOException <code>Exception</code>
      */
     private byte[] getBytes(String resource) throws Exception {
-        for (int i = 0; i < embedded_jars.size(); i++) {
+        for (int i = 0; embedded_jars != null && i < embedded_jars.size(); i++)
{
             String libjar_name = (String) embedded_jars.get(i);
             InputStream in = getJarAsStream(libjar_name);
             byte[] bytes = getBytes(in, resource);



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message