You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2025/03/19 05:49:45 UTC
(tomcat) branch main updated: Silence IDE warnings
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 2697eea6d4 Silence IDE warnings
2697eea6d4 is described below
commit 2697eea6d4fa46ecc15fd1720e8c8645ce5e42b6
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Mar 19 05:49:37 2025 +0000
Silence IDE warnings
---
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..9178013ee3 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 @SuppressWarnings("unused") Context context -> entry = new NamingEntry(name.get(0), toBind,
NamingEntry.CONTEXT);
- case LinkRef linkRef -> entry = new NamingEntry(name.get(0), toBind,
+ case @SuppressWarnings("unused") LinkRef linkRef -> entry = new NamingEntry(name.get(0), toBind,
NamingEntry.LINK_REF);
- case Reference reference -> entry = new NamingEntry(name.get(0), toBind,
+ case @SuppressWarnings("unused") Reference 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..4eea5ea69c 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 @SuppressWarnings("unused") InputStream inputStream -> {
type = param;
inputsource = source;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org