(tomcat) 01/02: Fix IDE warnings

2024-02-12 Thread markt
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 72d13c612dec48f40e200da5445cf1abd3073055
Author: Mark Thomas 
AuthorDate: Mon Feb 12 14:14:53 2024 +

Fix IDE warnings
---
 java/org/apache/catalina/session/StandardManager.java | 2 +-
 java/org/apache/coyote/ajp/AjpProcessor.java  | 2 +-
 java/org/apache/jasper/JspC.java  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/catalina/session/StandardManager.java 
b/java/org/apache/catalina/session/StandardManager.java
index 67514fe1d7..aa8da0f33b 100644
--- a/java/org/apache/catalina/session/StandardManager.java
+++ b/java/org/apache/catalina/session/StandardManager.java
@@ -311,7 +311,7 @@ public class StandardManager extends ManagerBase {
 
 // Expire all the sessions we just wrote
 if (log.isDebugEnabled()) {
-log.debug(sm.getString("standardManager.expiringSessions", 
list.size()));
+log.debug(sm.getString("standardManager.expiringSessions", 
Integer.toString(list.size(;
 }
 for (StandardSession session : list) {
 try {
diff --git a/java/org/apache/coyote/ajp/AjpProcessor.java 
b/java/org/apache/coyote/ajp/AjpProcessor.java
index 5c071ef1b9..b9f5056401 100644
--- a/java/org/apache/coyote/ajp/AjpProcessor.java
+++ b/java/org/apache/coyote/ajp/AjpProcessor.java
@@ -490,7 +490,7 @@ public class AjpProcessor extends AbstractProcessor {
 // Unexpected packet type. Unread body packets should have
 // been swallowed in finish().
 if (getLog().isDebugEnabled()) {
-
getLog().debug(sm.getString("ajpprocessor.unexpectedMessage", type));
+
getLog().debug(sm.getString("ajpprocessor.unexpectedMessage", 
Integer.toString(type)));
 }
 setErrorState(ErrorState.CLOSE_CONNECTION_NOW, null);
 break;
diff --git a/java/org/apache/jasper/JspC.java b/java/org/apache/jasper/JspC.java
index 655942d34a..6ce90fa528 100644
--- a/java/org/apache/jasper/JspC.java
+++ b/java/org/apache/jasper/JspC.java
@@ -1358,7 +1358,7 @@ public class JspC extends Task implements Options {
 @Override
 public void execute() {
 if(log.isDebugEnabled()) {
-log.debug(Localizer.getMessage("jspc.start", pages.size()));
+log.debug(Localizer.getMessage("jspc.start", 
Integer.toString(pages.size(;
 }
 
 try {


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



[tomcat] 01/02: Fix IDE warnings. Get build working with Java 8 through 14

2019-11-14 Thread markt
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