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 462be98715 Follow-up to "Javadoc warning fixes"
462be98715 is described below
commit 462be987157efbd854ef7d32690f5eb3d5df9ec6
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Sep 11 13:49:44 2026 +0100
Follow-up to "Javadoc warning fixes"
---
java/org/apache/tomcat/InstanceManager.java | 8 +++---
java/org/apache/tomcat/SimpleInstanceManager.java | 30 ++++++++++------------
java/org/apache/tomcat/jni/SSL.java | 7 ++---
.../MbeansDescriptorsIntrospectionSource.java | 4 +--
4 files changed, 22 insertions(+), 27 deletions(-)
diff --git a/java/org/apache/tomcat/InstanceManager.java
b/java/org/apache/tomcat/InstanceManager.java
index 637b1affba..ceb0e22a24 100644
--- a/java/org/apache/tomcat/InstanceManager.java
+++ b/java/org/apache/tomcat/InstanceManager.java
@@ -85,8 +85,8 @@ public interface InstanceManager {
* Perform dependency injection on the given object.
*
* @param o The object to inject dependencies into
- * @throws IllegalAccessException if the class or its nullary constructor
is not accessible
- * @throws InvocationTargetException if the nullary constructor throws an
exception
+ * @throws IllegalAccessException if the injection or lifecycle targets
are not accessible
+ * @throws InvocationTargetException if the injected setter or {@code
@PostConstruct} throws an exception
* @throws NamingException if a naming exception is encountered
*/
void newInstance(Object o) throws IllegalAccessException,
InvocationTargetException, NamingException;
@@ -95,8 +95,8 @@ public interface InstanceManager {
* Destroy the given instance, performing pre-destroy callbacks.
*
* @param o The object to destroy
- * @throws IllegalAccessException if the class or its nullary constructor
is not accessible
- * @throws InvocationTargetException if the nullary constructor throws an
exception
+ * @throws IllegalAccessException if the injection or lifecycle targets
are not accessible
+ * @throws InvocationTargetException if {@code @PreDestroy} throws an
exception
*/
void destroyInstance(Object o) throws IllegalAccessException,
InvocationTargetException;
diff --git a/java/org/apache/tomcat/SimpleInstanceManager.java
b/java/org/apache/tomcat/SimpleInstanceManager.java
index 90762ebf9d..8988289d2c 100644
--- a/java/org/apache/tomcat/SimpleInstanceManager.java
+++ b/java/org/apache/tomcat/SimpleInstanceManager.java
@@ -32,53 +32,49 @@ public class SimpleInstanceManager implements
InstanceManager {
public SimpleInstanceManager() {
}
- /**
- * {@inheritDoc}
- */
+
@Override
public Object newInstance(Class<?> clazz) throws IllegalAccessException,
InvocationTargetException, NamingException,
InstantiationException, NoSuchMethodException {
- return prepareInstance(clazz.getConstructor().newInstance());
+ return clazz.getConstructor().newInstance();
}
- /**
- * {@inheritDoc}
- */
+
@Override
public Object newInstance(String className) throws IllegalAccessException,
InvocationTargetException,
NamingException, InstantiationException, ClassNotFoundException,
NoSuchMethodException {
Class<?> clazz =
Thread.currentThread().getContextClassLoader().loadClass(className);
- return prepareInstance(clazz.getConstructor().newInstance());
+ return clazz.getConstructor().newInstance();
}
- /**
- * {@inheritDoc}
- */
+
@Override
public Object newInstance(String fqcn, ClassLoader classLoader)
throws IllegalAccessException, InvocationTargetException,
NamingException, InstantiationException,
ClassNotFoundException, NoSuchMethodException {
Class<?> clazz = classLoader.loadClass(fqcn);
- return prepareInstance(clazz.getConstructor().newInstance());
+ return clazz.getConstructor().newInstance();
}
+
/**
* {@inheritDoc}
+ * <p>
+ * This method is a NO-OP in this implementation.
*/
@Override
public void newInstance(Object o) throws IllegalAccessException,
InvocationTargetException, NamingException {
// NO-OP
}
+
/**
* {@inheritDoc}
+ * <p>
+ * This method is a NO-OP in this implementation.
*/
@Override
public void destroyInstance(Object o) throws IllegalAccessException,
InvocationTargetException {
// NO-OP
}
-
- private Object prepareInstance(Object o) {
- return o;
- }
-}
\ No newline at end of file
+}
diff --git a/java/org/apache/tomcat/jni/SSL.java
b/java/org/apache/tomcat/jni/SSL.java
index eab4fc90d1..9777736e99 100644
--- a/java/org/apache/tomcat/jni/SSL.java
+++ b/java/org/apache/tomcat/jni/SSL.java
@@ -220,7 +220,7 @@ public final class SSL {
*/
public static final long SSL_OP_ENABLE_KTLS = 0x8L;
/**
- * Obsolete option retained for compatibility. This option no longer has
any effect.
+ * Obsolete option retained for compatibility. This option has no effect
from OpenSSL 4.1 onwards.
*/
public static final long SSL_OP_TLSEXT_PADDING = 0x10L;
// Unused = 0x20L
@@ -230,7 +230,8 @@ public final class SSL {
*/
public static final long SSL_OP_SAFARI_ECDHE_ECDSA_BUG = 0x40L;
/**
- * Treat a closed connection as if the close_notify alert was received, so
the peer does not need to send it.
+ * Treat a closed connection as if the close_notify alert was received, so
the peer does not need to send it. This
+ * is only safe to use when the application protocol independently detects
truncation attacks.
*/
public static final long SSL_OP_IGNORE_UNEXPECTED_EOF = 0x80L;
/**
@@ -416,7 +417,7 @@ public final class SSL {
/**
* Mask of options that disable all DTLS protocol versions.
*/
- public static final long SSL_OP_NO_DTLS_MASK = SSL_OP_NO_DTLSv1 |
SSL_OP_NO_DTLSv1_2;
+ public static final long SSL_OP_NO_DTLS_MASK = SSL_OP_NO_DTLSv1 |
SSL_OP_NO_DTLSv1_2 | SSL_OP_NO_DTLSv1_3;
/**
* Various bug workarounds that should be rather harmless.
diff --git
a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
index 28eb475a41..b736e1f972 100644
---
a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
+++
b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
@@ -96,10 +96,8 @@ public class MbeansDescriptorsIntrospectionSource extends
ModelerSource {
/**
* Execute the descriptor loading. Errors are logged and not propagated.
- *
- * @throws Exception if an error occurs while loading the descriptors
*/
- public void execute() throws Exception {
+ public void execute() {
if (registry == null) {
registry = Registry.getRegistry(null);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]