Author: rjung Date: Tue Oct 23 21:04:54 2012 New Revision: 1401477 URL: http://svn.apache.org/viewvc?rev=1401477&view=rev Log: Fix NPE in unconfigured VirtualWebappLoader. StringTokenizer throws the NPE if the virtualClassPath wasn't explicitely configured (null by default).
This might not be observed in the wild because a VirtualWebappLoader without a configured virtualClassPath isn't expected. But if you extend the class and add features, then this might well happen. Backport of r1401472 from trunk. Modified: tomcat/tc7.0.x/trunk/ (props changed) tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java Propchange: tomcat/tc7.0.x/trunk/ ------------------------------------------------------------------------------ Merged /tomcat/trunk:r1401472 Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java?rev=1401477&r1=1401476&r2=1401477&view=diff ============================================================================== --- tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java (original) +++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/loader/VirtualWebappLoader.java Tue Oct 23 21:04:54 2012 @@ -57,7 +57,7 @@ public class VirtualWebappLoader extends /** * <code>;</code> separated list of additional path elements. */ - private String virtualClasspath; + private String virtualClasspath = ""; /** * Construct a new WebappLoader with no defined parent class loader (so that --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org