This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 49de92f384a05fc9b58857ce311e0e99705bf6e6
Author: Mark Thomas
AuthorDate: Thu Nov 14 19:26:00 2019 +
Fix IDE warnings. Get build working with Java 8 through 14
"-XDignore.symbol.file" is a hack but it is the only solution I found
that worked cleanly with all Java versions.
---
build.xml| 7 +--
.../apache/catalina/mbeans/JmxRemoteLifecycleListener.java | 12 +++-
res/findbugs/filter-false-positives.xml | 6 ++
3 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/build.xml b/build.xml
index f548f23..2ec230b 100644
--- a/build.xml
+++ b/build.xml
@@ -87,7 +87,6 @@
-
@@ -638,7 +637,6 @@
deprecation="${compile.deprecation}"
source="${compile.source}"
target="${compile.target}"
- release="${compile.release}"
encoding="ISO-8859-1"
includeAntRuntime="true" >
+
@@ -1162,7 +1160,6 @@
debug="${compile.debug}" deprecation="${compile.deprecation}"
source="${compile.source}"
target="${compile.target}"
- release="${compile.release}"
classpath="${tomcat.classes}"
encoding="ISO-8859-1"
includeantruntime="false">
@@ -1174,7 +1171,6 @@
debug="${compile.debug}" deprecation="${compile.deprecation}"
source="${compile.source}"
target="${compile.target}"
- release="${compile.release}"
classpath="${tomcat.classes}"
encoding="ISO-8859-1"
includeantruntime="false">
@@ -1407,7 +1403,6 @@
deprecation="${compile.deprecation}"
source="${compile.source}"
target="${compile.target}"
- release="${compile.release}"
encoding="ISO-8859-1"
includeantruntime="true">
diff --git a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
index a4095aa..9bae7fd 100644
--- a/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
+++ b/java/org/apache/catalina/mbeans/JmxRemoteLifecycleListener.java
@@ -324,7 +324,13 @@ public class JmxRemoteLifecycleListener implements
LifecycleListener {
Remote jmxServer = server.toStub();
// Create the RMI registry
try {
-new JmxRegistry(theRmiRegistryPort, registryCsf, registrySsf,
"jmxrmi", jmxServer);
+/*
+ * JmxRegistry is registered as a side-effect of creation.
+ * This object is here so we can tell the IDE it is OK for it
+ * not to be used.
+ */
+@SuppressWarnings("unused")
+JmxRegistry unused = new JmxRegistry(theRmiRegistryPort,
registryCsf, registrySsf, "jmxrmi", jmxServer);
} catch (RemoteException e) {
log.error(sm.getString(
"jmxRemoteLifecycleListener.createRegistryFailed",
@@ -492,6 +498,10 @@ public class JmxRemoteLifecycleListener implements
LifecycleListener {
}
+/*
+ * Better to use the internal API than re-invent the wheel.
+ */
+@SuppressWarnings("restriction")
private static class JmxRegistry extends sun.rmi.registry.RegistryImpl {
private static final long serialVersionUID = -3772054804656428217L;
private final String jmxName;
diff --git a/res/findbugs/filter-false-positives.xml
b/res/findbugs/filter-false-positives.xml
index a4596d0..dff3613 100644
--- a/res/findbugs/filter-false-positives.xml
+++ b/res/findbugs/filter-false-positives.xml
@@ -332,6 +332,12 @@
+
+
+
+
+
+
-
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org