(tomcat) branch 9.0.x updated: Fix IDE warnings
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new d2827524c2 Fix IDE warnings d2827524c2 is described below commit d2827524c25ce5141330bf4ac2b5e90398707666 Author: Mark Thomas AuthorDate: Tue Jun 25 17:19:53 2024 +0100 Fix IDE warnings --- test/org/apache/tomcat/websocket/server/TestWsServerContainer.java | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java b/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java index a78894a6a1..3965c6e4b9 100644 --- a/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java +++ b/test/org/apache/tomcat/websocket/server/TestWsServerContainer.java @@ -490,6 +490,7 @@ public class TestWsServerContainer extends WebSocketBaseTest { } private static class DummyDecoder implements Decoder { +@SuppressWarnings("unused") DummyDecoder(String ignoredParam) { } @@ -504,7 +505,8 @@ public class TestWsServerContainer extends WebSocketBaseTest { @Test public void testFilterRegistrationFailure() { -new WsServerContainer(new TesterServletContext(){ +@SuppressWarnings("unused") +Object obj = new WsServerContainer(new TesterServletContext(){ @Override public FilterRegistration.Dynamic addFilter(String filterName, Filter filter) { return null; @@ -580,6 +582,7 @@ public class TestWsServerContainer extends WebSocketBaseTest { } private static class DummyConfigurator extends ServerEndpointConfig.Configurator { +@SuppressWarnings("unused") DummyConfigurator(String ignoredParam) { } - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: Fix IDE warnings
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new f13afa93ac Fix IDE warnings f13afa93ac is described below commit f13afa93ace1ce16e8e2512c19c89cd6b8cd80c3 Author: Mark Thomas AuthorDate: Tue Mar 12 11:37:15 2024 + Fix IDE warnings --- java/org/apache/catalina/realm/RealmBase.java | 2 ++ java/org/apache/catalina/security/SecurityListener.java | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/realm/RealmBase.java b/java/org/apache/catalina/realm/RealmBase.java index 39bb5cb006..7959c3ea0b 100644 --- a/java/org/apache/catalina/realm/RealmBase.java +++ b/java/org/apache/catalina/realm/RealmBase.java @@ -1334,6 +1334,8 @@ public abstract class RealmBase extends LifecycleMBeanBase implements Realm { * * * @param args The parameters passed on the command line + * + * @throws IOException If an error occurs reading the password file */ public static void main(String args[]) throws IOException { diff --git a/java/org/apache/catalina/security/SecurityListener.java b/java/org/apache/catalina/security/SecurityListener.java index adececd631..e92f7fbbc4 100644 --- a/java/org/apache/catalina/security/SecurityListener.java +++ b/java/org/apache/catalina/security/SecurityListener.java @@ -151,7 +151,7 @@ public class SecurityListener implements LifecycleListener { } catch (NumberFormatException nfe) { // Just use the default and warn the user log.warn(sm.getString("SecurityListener.buildDateAgeUnreadable", -ageDays, DEFAULT_BUILD_DATE_WARNING_AGE_DAYS)); +ageDays, String.valueOf(DEFAULT_BUILD_DATE_WARNING_AGE_DAYS))); } } @@ -235,7 +235,7 @@ public class SecurityListener implements LifecycleListener { old.add(Calendar.DATE, -allowedAgeDays); // Subtract X days from today if (buildDate.before(old.getTime())) { -log.warn(sm.getString("SecurityListener.buildDateIsOld", allowedAgeDays)); +log.warn(sm.getString("SecurityListener.buildDateIsOld", String.valueOf(allowedAgeDays))); } } catch (ParseException pe) { log.warn(sm.getString("SecurityListener.buildDateUnreadable", buildDateString)); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: Fix IDE warnings
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new fda3901a54 Fix IDE warnings fda3901a54 is described below commit fda3901a5461e2582cd65a39408d9b0068eb3c07 Author: Mark Thomas AuthorDate: Tue Feb 13 00:07:49 2024 + Fix IDE warnings --- webapps/examples/WEB-INF/classes/RequestHeaderExample.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webapps/examples/WEB-INF/classes/RequestHeaderExample.java b/webapps/examples/WEB-INF/classes/RequestHeaderExample.java index 0cff06402f..df2d2d51f7 100644 --- a/webapps/examples/WEB-INF/classes/RequestHeaderExample.java +++ b/webapps/examples/WEB-INF/classes/RequestHeaderExample.java @@ -89,7 +89,7 @@ public class RequestHeaderExample extends HttpServlet { protected void renderHTML(HttpServletRequest request, HttpServletResponse response) -throws IOException, ServletException +throws IOException { ResourceBundle rb = ResourceBundle.getBundle("LocalStrings",request.getLocale()); @@ -144,7 +144,7 @@ public class RequestHeaderExample extends HttpServlet { } protected void renderJSON(HttpServletRequest request, HttpServletResponse response) -throws IOException, ServletException +throws IOException { response.setContentType("application/json"); response.setCharacterEncoding("UTF-8"); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
(tomcat) branch 9.0.x updated: Fix IDE warnings
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new afe0375210 Fix IDE warnings afe0375210 is described below commit afe0375210597e208747befcea80b72ed317d101 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 5dcadf893f..00cef4709e 100644 --- a/java/org/apache/coyote/ajp/AjpProcessor.java +++ b/java/org/apache/coyote/ajp/AjpProcessor.java @@ -379,7 +379,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 8ef5a4b96c..71f138526a 100644 --- a/java/org/apache/jasper/JspC.java +++ b/java/org/apache/jasper/JspC.java @@ -1398,7 +1398,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) branch 9.0.x updated: Fix IDE warnings
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new d7e4201ae4 Fix IDE warnings d7e4201ae4 is described below commit d7e4201ae4a94556027e91e53e5c4f1332d43d54 Author: Mark Thomas AuthorDate: Sat Feb 3 10:48:27 2024 + Fix IDE warnings --- java/org/apache/jasper/compiler/Generator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/apache/jasper/compiler/Generator.java b/java/org/apache/jasper/compiler/Generator.java index 46a7238136..9c3756d3c1 100644 --- a/java/org/apache/jasper/compiler/Generator.java +++ b/java/org/apache/jasper/compiler/Generator.java @@ -639,7 +639,7 @@ class Generator { // Packages is never empty because o.a.j.Constants.STANDARD_IMPORTS // contains 3 packages and is always added to the imports. out.printin("_jspx_imports_packages = new java.util.LinkedHashSet<>("); -out.print(Integer.valueOf(packages.size())); +out.print(Integer.toString(packages.size())); out.print(");"); out.println(); for (String packageName : packages) { @@ -653,7 +653,7 @@ class Generator { out.println(); } else { out.printin("_jspx_imports_classes = new java.util.LinkedHashSet<>("); -out.print(Integer.valueOf(classes.size())); +out.print(Integer.toString(classes.size())); out.print(");"); out.println(); for (String className : classes) { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated: Fix IDE warnings
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new aa3329de72 Fix IDE warnings aa3329de72 is described below commit aa3329de726831a5b22ce48695a8268a25a2fec8 Author: Mark Thomas AuthorDate: Thu Sep 21 16:33:20 2023 +0100 Fix IDE warnings --- java/org/apache/jasper/compiler/Node.java | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/java/org/apache/jasper/compiler/Node.java b/java/org/apache/jasper/compiler/Node.java index cc46b7399a..0306b16fcc 100644 --- a/java/org/apache/jasper/compiler/Node.java +++ b/java/org/apache/jasper/compiler/Node.java @@ -1680,7 +1680,8 @@ abstract class Node implements TagConstants { this.nestedScriptingVars = vec; break; default: -throw new IllegalArgumentException(Localizer.getMessage("jsp.error.page.invalid.varscope", scope)); +throw new IllegalArgumentException( + Localizer.getMessage("jsp.error.page.invalid.varscope", Integer.valueOf(scope))); } } @@ -1702,7 +1703,8 @@ abstract class Node implements TagConstants { vec = this.nestedScriptingVars; break; default: -throw new IllegalArgumentException(Localizer.getMessage("jsp.error.page.invalid.varscope", scope)); +throw new IllegalArgumentException( + Localizer.getMessage("jsp.error.page.invalid.varscope", Integer.valueOf(scope))); } return vec; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated: Fix IDE warnings
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new 1070104313 Fix IDE warnings 1070104313 is described below commit 10701043138222cc73465ec2c199ea7c3e94265f Author: Mark Thomas AuthorDate: Tue Jun 13 12:00:42 2023 +0100 Fix IDE warnings --- .../apache/catalina/core/TestContextNamingInfoListener.java | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/org/apache/catalina/core/TestContextNamingInfoListener.java b/test/org/apache/catalina/core/TestContextNamingInfoListener.java index 875d0a574f..65f1d47e0a 100644 --- a/test/org/apache/catalina/core/TestContextNamingInfoListener.java +++ b/test/org/apache/catalina/core/TestContextNamingInfoListener.java @@ -16,17 +16,17 @@ */ package org.apache.catalina.core; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; + import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameter; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; - import org.apache.catalina.Context; import org.apache.catalina.LifecycleState; import org.apache.catalina.deploy.NamingResourcesImpl; @@ -67,7 +67,7 @@ public class TestContextNamingInfoListener extends TomcatBaseTest { @Parameter(2) public String displayName; @Parameter(3) -public Boolean emptyOnRoot; +public boolean emptyOnRoot; @Parameter(4) public String expectedContextPath; @Parameter(5) - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated: Fix IDE warnings
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new 0229e5905e Fix IDE warnings 0229e5905e is described below commit 0229e5905efe0a43fa2f54c67ccaf1e094728724 Author: Mark Thomas AuthorDate: Fri Mar 3 14:45:58 2023 + Fix IDE warnings --- .../apache/catalina/valves/JsonAccessLogValve.java | 46 +++--- java/org/apache/tomcat/util/json/JSONFilter.java | 6 +-- 2 files changed, 25 insertions(+), 27 deletions(-) diff --git a/java/org/apache/catalina/valves/JsonAccessLogValve.java b/java/org/apache/catalina/valves/JsonAccessLogValve.java index cd48cfceb2..2a56d1763e 100644 --- a/java/org/apache/catalina/valves/JsonAccessLogValve.java +++ b/java/org/apache/catalina/valves/JsonAccessLogValve.java @@ -68,28 +68,28 @@ public class JsonAccessLogValve extends AccessLogValve { static { // FIXME: finalize attribute names Map pattern2AttributeName = new HashMap<>(); -pattern2AttributeName.put('a', "remoteAddr"); -pattern2AttributeName.put('A', "localAddr"); -pattern2AttributeName.put('b', "size"); /* byteSent -> size */ -pattern2AttributeName.put('B', "byteSentNC"); -pattern2AttributeName.put('D', "elapsedTime"); -pattern2AttributeName.put('F', "firstByteTime"); -pattern2AttributeName.put('h', "host"); -pattern2AttributeName.put('H', "protocol"); -pattern2AttributeName.put('l', "logicalUserName"); -pattern2AttributeName.put('m', "method"); -pattern2AttributeName.put('p', "port"); -pattern2AttributeName.put('q', "query"); -pattern2AttributeName.put('r', "request"); -pattern2AttributeName.put('s', "statusCode"); -pattern2AttributeName.put('S', "sessionId"); -pattern2AttributeName.put('t', "time"); /* dateTime -> time */ -pattern2AttributeName.put('T', "elapsedTimeS"); -pattern2AttributeName.put('u', "user"); -pattern2AttributeName.put('U', "path"); /* requestURI -> path */ -pattern2AttributeName.put('v', "localServerName"); -pattern2AttributeName.put('I', "threadName"); -pattern2AttributeName.put('X', "connectionStatus"); +pattern2AttributeName.put(Character.valueOf('a'), "remoteAddr"); +pattern2AttributeName.put(Character.valueOf('A'), "localAddr"); +pattern2AttributeName.put(Character.valueOf('b'), "size"); /* byteSent -> size */ +pattern2AttributeName.put(Character.valueOf('B'), "byteSentNC"); +pattern2AttributeName.put(Character.valueOf('D'), "elapsedTime"); +pattern2AttributeName.put(Character.valueOf('F'), "firstByteTime"); +pattern2AttributeName.put(Character.valueOf('h'), "host"); +pattern2AttributeName.put(Character.valueOf('H'), "protocol"); +pattern2AttributeName.put(Character.valueOf('l'), "logicalUserName"); +pattern2AttributeName.put(Character.valueOf('m'), "method"); +pattern2AttributeName.put(Character.valueOf('p'), "port"); +pattern2AttributeName.put(Character.valueOf('q'), "query"); +pattern2AttributeName.put(Character.valueOf('r'), "request"); +pattern2AttributeName.put(Character.valueOf('s'), "statusCode"); +pattern2AttributeName.put(Character.valueOf('S'), "sessionId"); +pattern2AttributeName.put(Character.valueOf('t'), "time"); /* dateTime -> time */ +pattern2AttributeName.put(Character.valueOf('T'), "elapsedTimeS"); +pattern2AttributeName.put(Character.valueOf('u'), "user"); +pattern2AttributeName.put(Character.valueOf('U'), "path"); /* requestURI -> path */ +pattern2AttributeName.put(Character.valueOf('v'), "localServerName"); +pattern2AttributeName.put(Character.valueOf('I'), "threadName"); +pattern2AttributeName.put(Character.valueOf('X'), "connectionStatus"); PATTERNS = Collections.unmodifiableMap(pattern2AttributeName); } @@ -117,7 +117,7 @@ public class JsonAccessLogValve extends AccessLogValve { @Override protected AccessLogElement createAccessLogElement(char pattern) { AccessLogElement ale = super.createAccessLogElement(pattern); -String attributeName = PATTERNS.get(pattern); +String attributeName = PATTERNS.get(Character.valueOf(pattern)); if (attributeName == null) { attributeName = "other-" + new String(JSONFilter.escape(pattern)); } diff --git a/java/org/apache/tomcat/util/json/JSONFilter.java b/java/org/apache/tomcat/util/json/JSONFilter.java index 43c23f331b..176867407d 100644 --- a/java/org/apache/tomcat/util/json/JSONFilter.java +++ b/java/org/apache/tomcat/util/json/JSONFilter.java @@ -29,8 +29,7 @@ public class JSONFilter { * @return a char array with the escaped sequence */ public static c
[tomcat] branch 9.0.x updated: Fix IDE warnings
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new a15b566343 Fix IDE warnings a15b566343 is described below commit a15b566343813fe042121fa3d1e04689165580cd Author: Mark Thomas AuthorDate: Wed Jun 1 09:12:36 2022 +0100 Fix IDE warnings --- java/org/apache/catalina/core/AprLifecycleListener.java | 1 + 1 file changed, 1 insertion(+) diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java b/java/org/apache/catalina/core/AprLifecycleListener.java index f8656c37f4..719b83f9f9 100644 --- a/java/org/apache/catalina/core/AprLifecycleListener.java +++ b/java/org/apache/catalina/core/AprLifecycleListener.java @@ -184,6 +184,7 @@ public class AprLifecycleListener implements LifecycleListener { fipsModeActive = false; } +@SuppressWarnings("deprecation") private static void init() { int major = 0; - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated: Fix IDE warnings
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new a81bd7ec05 Fix IDE warnings a81bd7ec05 is described below commit a81bd7ec05a21bbefab4b2a23b41a5f3f4392246 Author: Mark Thomas AuthorDate: Tue May 3 21:59:45 2022 +0100 Fix IDE warnings --- java/org/apache/jasper/compiler/Generator.java | 1 + 1 file changed, 1 insertion(+) diff --git a/java/org/apache/jasper/compiler/Generator.java b/java/org/apache/jasper/compiler/Generator.java index d12bef8941..a853cf8f4e 100644 --- a/java/org/apache/jasper/compiler/Generator.java +++ b/java/org/apache/jasper/compiler/Generator.java @@ -1545,6 +1545,7 @@ class Generator { return " " + attr + "=\"" + value + '\"'; } +@SuppressWarnings("deprecation") @Override public void visit(Node.PlugIn n) throws JasperException { - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated: Fix IDE warnings
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new e8c721a Fix IDE warnings e8c721a is described below commit e8c721a121d75f8ace7e5975f00d9adde6035c18 Author: Mark Thomas AuthorDate: Mon May 4 15:50:10 2020 +0100 Fix IDE warnings --- java/org/apache/catalina/valves/rewrite/RewriteRule.java | 4 ++-- java/org/apache/juli/ClassLoaderLogManager.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/java/org/apache/catalina/valves/rewrite/RewriteRule.java b/java/org/apache/catalina/valves/rewrite/RewriteRule.java index 0aa96de..efdb8ac 100644 --- a/java/org/apache/catalina/valves/rewrite/RewriteRule.java +++ b/java/org/apache/catalina/valves/rewrite/RewriteRule.java @@ -86,7 +86,7 @@ public class RewriteRule { * @return null if no rewrite took place */ public CharSequence evaluate(CharSequence url, Resolver resolver) { -Pattern pattern = this.pattern.get(); +Pattern pattern = RewriteRule.pattern.get(); if (pattern == null) { // Parse the pattern int flags = 0; @@ -94,7 +94,7 @@ public class RewriteRule { flags |= Pattern.CASE_INSENSITIVE; } pattern = Pattern.compile(patternString, flags); -this.pattern.set(pattern); +RewriteRule.pattern.set(pattern); } Matcher matcher = pattern.matcher(url); // Use XOR diff --git a/java/org/apache/juli/ClassLoaderLogManager.java b/java/org/apache/juli/ClassLoaderLogManager.java index cf3ad4c..c907056 100644 --- a/java/org/apache/juli/ClassLoaderLogManager.java +++ b/java/org/apache/juli/ClassLoaderLogManager.java @@ -277,7 +277,7 @@ public class ClassLoaderLogManager extends LogManager { return null; } -String prefix = this.prefix.get(); +String prefix = ClassLoaderLogManager.prefix.get(); String result = null; // If a prefix is defined look for a prefixed property first @@ -595,13 +595,13 @@ public class ClassLoaderLogManager extends LogManager { } } try { -this.prefix.set(prefix); +ClassLoaderLogManager.prefix.set(prefix); Handler handler = (Handler) classLoader.loadClass( handlerClassName).getConstructor().newInstance(); // The specification strongly implies all configuration should be done // during the creation of the handler object. // This includes setting level, filter, formatter and encoding. -this.prefix.set(null); +ClassLoaderLogManager.prefix.set(null); info.handlers.put(handlerName, handler); if (rootHandlers == null) { localRootLogger.addHandler(handler); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org
[tomcat] branch 9.0.x updated: Fix IDE warnings
This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 9.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git The following commit(s) were added to refs/heads/9.0.x by this push: new b8be303 Fix IDE warnings b8be303 is described below commit b8be303227e64d03ad721bf293f34506b748cefd Author: Mark Thomas AuthorDate: Tue Jan 14 21:04:15 2020 + Fix IDE warnings --- java/org/apache/catalina/manager/JMXProxyServlet.java | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/manager/JMXProxyServlet.java b/java/org/apache/catalina/manager/JMXProxyServlet.java index 30b718e..c54121f 100644 --- a/java/org/apache/catalina/manager/JMXProxyServlet.java +++ b/java/org/apache/catalina/manager/JMXProxyServlet.java @@ -262,10 +262,12 @@ public class JMXProxyServlet extends HttpServlet { *call the requested operation. * @return The value returned by the requested operation. */ +@SuppressWarnings("null") // parameters can't be null if signature.length > 0 private Object invokeOperationInternal(String onameStr, String operation, String[] parameters) throws OperationsException, MBeanException, ReflectionException { ObjectName oname = new ObjectName(onameStr); -MBeanOperationInfo methodInfo = registry.getMethodInfo(oname, operation, (null == parameters ? 0 : parameters.length)); +int paramCount = null == parameters ? 0 : parameters.length; +MBeanOperationInfo methodInfo = registry.getMethodInfo(oname, operation, paramCount); if(null == methodInfo) { // getMethodInfo returns null for both "object not found" and "operation not found" MBeanInfo info = null; @@ -276,7 +278,9 @@ public class JMXProxyServlet extends HttpServlet { } catch (Exception e) { throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noBeanFound", onameStr), e); } -throw new IllegalArgumentException(sm.getString("jmxProxyServlet.noOperationOnBean", operation, (null == parameters ? 0 : parameters.length), onameStr, info.getClassName())); +throw new IllegalArgumentException( +sm.getString("jmxProxyServlet.noOperationOnBean", +operation, Integer.valueOf(paramCount), onameStr, info.getClassName())); } MBeanParameterInfo[] signature = methodInfo.getSignature(); - To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org