This is an automated email from the ASF dual-hosted git repository.
markt-asf 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 b8d5cc5c49 Remove unnecessary warning suppression after Javadoc updates
b8d5cc5c49 is described below
commit b8d5cc5c4929de001c666ed9c57572f670a72a39
Author: Mark Thomas <[email protected]>
AuthorDate: Thu May 7 15:46:33 2026 +0100
Remove unnecessary warning suppression after Javadoc updates
---
java/org/apache/catalina/startup/FailedContext.java | 3 +--
.../webresources/AbstractSingleArchiveResourceSet.java | 3 +++
java/org/apache/jasper/compiler/ELNode.java | 3 ---
java/org/apache/jasper/compiler/Node.java | 5 ++---
java/org/apache/naming/ServiceRef.java | 4 ++--
.../util/http/fileupload/impl/FileItemIteratorImpl.java | 4 ++--
.../java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java | 14 ++++++++------
7 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/java/org/apache/catalina/startup/FailedContext.java
b/java/org/apache/catalina/startup/FailedContext.java
index f35127cfbf..819a1e7034 100644
--- a/java/org/apache/catalina/startup/FailedContext.java
+++ b/java/org/apache/catalina/startup/FailedContext.java
@@ -1180,9 +1180,8 @@ public class FailedContext extends LifecycleMBeanBase
implements Context {
/**
* Adds a valve to this context. This is a no-op for a failed context.
*
- * @param valve the valve to add
+ * @param valve the valve to add - ignored
*/
- @SuppressWarnings("unused")
public synchronized void addValve(Valve valve) {
// NO-OP
}
diff --git
a/java/org/apache/catalina/webresources/AbstractSingleArchiveResourceSet.java
b/java/org/apache/catalina/webresources/AbstractSingleArchiveResourceSet.java
index 3902bc491c..9fa79f7ca1 100644
---
a/java/org/apache/catalina/webresources/AbstractSingleArchiveResourceSet.java
+++
b/java/org/apache/catalina/webresources/AbstractSingleArchiveResourceSet.java
@@ -50,6 +50,9 @@ public abstract class AbstractSingleArchiveResourceSet
extends AbstractArchiveRe
* @param webAppMount The web app mount
* @param base The base
* @param internalPath The internal path
+ *
+ * @throws IllegalArgumentException if the {@link WebResourceRoot} is
available but this resource set cannot be
+ * started
*/
public AbstractSingleArchiveResourceSet(WebResourceRoot root, String
webAppMount, String base, String internalPath)
throws IllegalArgumentException {
diff --git a/java/org/apache/jasper/compiler/ELNode.java
b/java/org/apache/jasper/compiler/ELNode.java
index 595d8e2286..a50f774b79 100644
--- a/java/org/apache/jasper/compiler/ELNode.java
+++ b/java/org/apache/jasper/compiler/ELNode.java
@@ -403,7 +403,6 @@ public abstract class ELNode {
*
* @throws JasperException if an error occurs during visitation
*/
- @SuppressWarnings("unused")
public void visit(Function n) throws JasperException {
// NOOP by default
}
@@ -415,7 +414,6 @@ public abstract class ELNode {
*
* @throws JasperException if an error occurs during visitation
*/
- @SuppressWarnings("unused")
public void visit(Text n) throws JasperException {
// NOOP by default
}
@@ -427,7 +425,6 @@ public abstract class ELNode {
*
* @throws JasperException if an error occurs during visitation
*/
- @SuppressWarnings("unused")
public void visit(ELText n) throws JasperException {
// NOOP by default
}
diff --git a/java/org/apache/jasper/compiler/Node.java
b/java/org/apache/jasper/compiler/Node.java
index 4be282373b..a58d586fe5 100644
--- a/java/org/apache/jasper/compiler/Node.java
+++ b/java/org/apache/jasper/compiler/Node.java
@@ -2844,13 +2844,12 @@ public abstract class Node implements TagConstants {
}
/**
- * This method provides a place to put actions that are common to all
nodes. Override this in the child visitor
- * class if needed.
+ * This method provides a place to put actions that are common to all
nodes. It is a NO-OP by default. Override
+ * this in the child visitor class if needed.
*
* @param n The node to visit
* @throws JasperException if an error occurs while visiting the node
*/
- @SuppressWarnings("unused")
protected void doVisit(Node n) throws JasperException {
// NOOP by default
}
diff --git a/java/org/apache/naming/ServiceRef.java
b/java/org/apache/naming/ServiceRef.java
index 0802c6825e..f36da18016 100644
--- a/java/org/apache/naming/ServiceRef.java
+++ b/java/org/apache/naming/ServiceRef.java
@@ -102,7 +102,7 @@ public class ServiceRef extends AbstractRef {
/**
* Creates a ServiceRef with the given parameters and factory information.
*
- * @param refname the reference name
+ * @param refname the reference name - unused
* @param serviceInterface the service interface class name
* @param serviceQname the service QName (namespace and local part)
* @param wsdl the WSDL location
@@ -110,7 +110,7 @@ public class ServiceRef extends AbstractRef {
* @param factory the factory class name
* @param factoryLocation the factory location
*/
- public ServiceRef(@SuppressWarnings("unused") String refname, String
serviceInterface, String[] serviceQname,
+ public ServiceRef(String refname, String serviceInterface, String[]
serviceQname,
String wsdl, String jaxrpcmapping, String factory, String
factoryLocation) {
super(serviceInterface, factory, factoryLocation);
StringRefAddr refAddr;
diff --git
a/java/org/apache/tomcat/util/http/fileupload/impl/FileItemIteratorImpl.java
b/java/org/apache/tomcat/util/http/fileupload/impl/FileItemIteratorImpl.java
index 0f410d7b4e..bd37d81a8b 100644
--- a/java/org/apache/tomcat/util/http/fileupload/impl/FileItemIteratorImpl.java
+++ b/java/org/apache/tomcat/util/http/fileupload/impl/FileItemIteratorImpl.java
@@ -146,11 +146,11 @@ public class FileItemIteratorImpl implements
FileItemIterator {
* Initializes the multipart stream for processing the request.
*
* @param fileUploadBase The file upload base configuration
- * @param pRequestContext The request context
+ * @param pRequestContext The request context - unused
* @throws FileUploadException If the request content type is invalid or
size exceeds limits
* @throws IOException If an I/O error occurs
*/
- protected void init(final FileUploadBase fileUploadBase,
@SuppressWarnings("unused") final RequestContext pRequestContext)
+ protected void init(final FileUploadBase fileUploadBase, final
RequestContext pRequestContext)
throws FileUploadException, IOException {
final String contentType = ctx.getContentType();
if ((null == contentType)
diff --git
a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
index efa5ac8d07..7a772efaf6 100644
---
a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
+++
b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/DataSourceProxy.java
@@ -75,13 +75,14 @@ public class DataSourceProxy implements PoolConfiguration {
/**
* Check if this proxy wraps an instance of the given interface.
- * This implementation always returns false.
+ * This implementation always returns {@code false}.
+ * <p>
+ * Has to match signature in DataSource.
*
- * @param iface The interface to check
+ * @param iface The interface to check - ignored
* @return false
* @throws SQLException never thrown
*/
- @SuppressWarnings("unused") // Has to match signature in DataSource
public boolean isWrapperFor(Class<?> iface) throws SQLException {
// we are not a wrapper of anything
return false;
@@ -90,14 +91,15 @@ public class DataSourceProxy implements PoolConfiguration {
/**
* Unwrap the proxy to the given interface.
- * This implementation always returns null.
+ * This implementation always returns {@code null}.
+ * <p>
+ * Has to match signature in DataSource
*
* @param <T> The interface type
- * @param iface The interface to unwrap to
+ * @param iface The interface to unwrap to - ignored
* @return null
* @throws SQLException never thrown
*/
- @SuppressWarnings("unused") // Has to match signature in DataSource
public <T> T unwrap(Class<T> iface) throws SQLException {
//we can't unwrap anything
return null;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]