Author: violetagg Date: Mon Nov 30 14:50:00 2015 New Revision: 1717264 URL: http://svn.apache.org/viewvc?rev=1717264&view=rev Log: Fixed potential NPE in HostConfig while deploying an application. Issue reported by coverity scan.
Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=1717264&r1=1717263&r2=1717264&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java (original) +++ tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Mon Nov 30 14:50:00 2015 @@ -405,13 +405,13 @@ public class HostConfig implements Lifec * Filter the list of application file paths to remove those that match * the regular expression defined by {@link Host#getDeployIgnore()}. * - * @param unfilteredAppPaths The list of application paths to filtert + * @param unfilteredAppPaths The list of application paths to filter * * @return The filtered list of application paths */ protected String[] filterAppPaths(String[] unfilteredAppPaths) { Pattern filter = host.getDeployIgnorePattern(); - if (filter == null) { + if (filter == null || unfilteredAppPaths == null) { return unfilteredAppPaths; } Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1717264&r1=1717263&r2=1717264&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Mon Nov 30 14:50:00 2015 @@ -90,6 +90,10 @@ running Tomcat with a Java agent. Based on a patch by Huxing Zhang. (markt) </fix> + <fix> + Fixed potential NPE in <code>HostConfig</code> while deploying an + application. Issue reported by coverity scan. (violetagg) + </fix> </changelog> </subsection> <subsection name="Coyote"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org