This is an automated email from the ASF dual-hosted git repository. rmaucher pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 85f8e29f8ec07bad1b6b25d515128fffa99f98a4 Author: remm <[email protected]> AuthorDate: Thu Oct 8 17:52:06 2026 +0200 Java compat --- java/org/apache/catalina/mbeans/ContextEnvironmentMBean.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/org/apache/catalina/mbeans/ContextEnvironmentMBean.java b/java/org/apache/catalina/mbeans/ContextEnvironmentMBean.java index 09c2372549..22aeb6a7ca 100644 --- a/java/org/apache/catalina/mbeans/ContextEnvironmentMBean.java +++ b/java/org/apache/catalina/mbeans/ContextEnvironmentMBean.java @@ -66,7 +66,7 @@ public class ContextEnvironmentMBean extends BaseNamingResourceMBean<ContextEnvi // Entries with injection targets but no value are effectively ignored if (ce.getInjectionTargets() != null && !ce.getInjectionTargets().isEmpty() && "value".equals(name) && - (value == null || (value instanceof String s && s.isEmpty()))) { + (value == null || (value instanceof String && ((String) value).isEmpty()))) { throw new IllegalArgumentException(sm.getString("contextEnvironment.ignore.injectionNoValue")); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
