tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1239024 - /tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
Date Wed, 01 Feb 2012 09:43:48 GMT
Author: markt
Date: Wed Feb  1 09:43:48 2012
New Revision: 1239024

URL: http://svn.apache.org/viewvc?rev=1239024&view=rev
Log:
Avoid NPE if class / interface is not present

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1239024&r1=1239023&r2=1239024&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Wed Feb  1 09:43:48 2012
@@ -2101,6 +2101,9 @@ public class ContextConfig implements Li
             String name = className.replace('.', '/') + ".class";
             InputStream is =
                     context.getLoader().getClassLoader().getResourceAsStream(name);
+            if (is == null) {
+                return;
+            }
             ClassParser parser = new ClassParser(is, null);
             try {
                 JavaClass clazz = parser.parse();



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message