Fix NPE if no classpath is set
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 17 Aug 2007 22:47:38 +0000 (22:47 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Fri, 17 Aug 2007 22:47:38 +0000 (22:47 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@567163 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/catalina/loader/VirtualWebappLoader.java

index 7b8661f..b218e50 100755 (executable)
@@ -82,11 +82,10 @@ public class VirtualWebappLoader extends WebappLoader {
 
     @Override
     public void start() throws LifecycleException {
-
         // just add any jar/directory set in virtual classpath to the
         // repositories list before calling start on the standard WebappLoader
         StringTokenizer tkn = new StringTokenizer(virtualClasspath, ";");
-        while (tkn.hasMoreTokens()) {
+        while (tkn!=null && tkn.hasMoreTokens()) {
             File file = new File(tkn.nextToken());
             if (!file.exists()) {
                 continue;