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

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


The following commit(s) were added to refs/heads/main by this push:
     new 3c9a3ef929 Use unnamed variable to avoid IDE warnings after refactoring
3c9a3ef929 is described below

commit 3c9a3ef9296f880f1c54c19858027e9e8227c727
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Mar 19 04:04:16 2025 +0000

    Use unnamed variable to avoid IDE warnings after refactoring
---
 java/org/apache/naming/NamingContext.java         | 6 +++---
 java/org/apache/tomcat/util/modeler/Registry.java | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/java/org/apache/naming/NamingContext.java 
b/java/org/apache/naming/NamingContext.java
index 2912bdcd4f..8adf9e0d84 100644
--- a/java/org/apache/naming/NamingContext.java
+++ b/java/org/apache/naming/NamingContext.java
@@ -639,11 +639,11 @@ public class NamingContext implements Context {
                 Object toBind =
                     NamingManager.getStateToBind(obj, name, this, env);
                 switch (toBind) {
-                    case Context context -> entry = new 
NamingEntry(name.get(0), toBind,
+                    case Context _ -> entry = new NamingEntry(name.get(0), 
toBind,
                         NamingEntry.CONTEXT);
-                    case LinkRef linkRef -> entry = new 
NamingEntry(name.get(0), toBind,
+                    case LinkRef _ -> entry = new NamingEntry(name.get(0), 
toBind,
                         NamingEntry.LINK_REF);
-                    case Reference reference -> entry = new 
NamingEntry(name.get(0), toBind,
+                    case Reference _ -> entry = new NamingEntry(name.get(0), 
toBind,
                         NamingEntry.REFERENCE);
                     case Referenceable referenceable -> {
                         toBind = referenceable.getReference();
diff --git a/java/org/apache/tomcat/util/modeler/Registry.java 
b/java/org/apache/tomcat/util/modeler/Registry.java
index 4eaf9fa7ae..194eea12d2 100644
--- a/java/org/apache/tomcat/util/modeler/Registry.java
+++ b/java/org/apache/tomcat/util/modeler/Registry.java
@@ -570,7 +570,7 @@ public class Registry implements RegistryMBean, 
MBeanRegistration {
                     sourceType = "MbeansDescriptorsDigesterSource";
                 }
             }
-            case InputStream inputStream -> {
+            case InputStream _ -> {
                 type = param;
                 inputsource = source;
             }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to