This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/9.0.x by this push:
     new e01a9e2225 Fix back port
e01a9e2225 is described below

commit e01a9e2225b6998084ae27436133dc21f92244de
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Jun 19 19:33:21 2026 +0100

    Fix back port
---
 java/org/apache/naming/NamingContext.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/naming/NamingContext.java 
b/java/org/apache/naming/NamingContext.java
index 3d60c2a5f2..788c9d6304 100644
--- a/java/org/apache/naming/NamingContext.java
+++ b/java/org/apache/naming/NamingContext.java
@@ -524,9 +524,9 @@ public class NamingContext implements Context {
                             // Other thread has already created the singleton
                             singleton = true;
                             obj = entry.value;
-                        } else if (entry.value instanceof ResourceRef 
resourceRef) {
-                            singleton =
-                                    Boolean.parseBoolean((String) 
resourceRef.get(ResourceRef.SINGLETON).getContent());
+                        } else if (entry.value instanceof ResourceRef) {
+                            singleton = Boolean.parseBoolean(
+                                    (String) ((ResourceRef) 
entry.value).get(ResourceRef.SINGLETON).getContent());
                             if (singleton) {
                                 obj = getObjectInstance(name, entry);
                                 // If reference resolution fails, don't cache 
failed result.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to