Author: markt Date: Wed May 9 14:55:33 2018 New Revision: 1831251 URL: http://svn.apache.org/viewvc?rev=1831251&view=rev Log: JNDI resources that are defined with injection targets but no value are now treated as if the resource is not defined.
Modified: tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java?rev=1831251&r1=1831250&r2=1831251&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java (original) +++ tomcat/trunk/java/org/apache/catalina/deploy/NamingResourcesImpl.java Wed May 9 14:55:33 2018 @@ -262,6 +262,12 @@ public class NamingResourcesImpl extends } } + // Entries with injection targets but no value are effectively ignored + if (environment.getInjectionTargets() != null && environment.getInjectionTargets().size() > 0 && + (environment.getValue() == null || environment.getValue().length() == 0)) { + return; + } + if (!checkResourceType(environment)) { throw new IllegalArgumentException(sm.getString( "namingResources.resourceTypeFail", environment.getName(), Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1831251&r1=1831250&r2=1831251&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Wed May 9 14:55:33 2018 @@ -67,6 +67,10 @@ <code>getProtocol()</code> are not corrupted by the processing of the saved request body. (markt) </fix> + <fix> + JNDI resources that are defined with injection targets but no value are + now treated as if the resource is not defined. (markt) + </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