You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2007/03/22 12:20:21 UTC
svn commit: r521218 -
/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentClassLoader.java
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