This is an automated email from the ASF dual-hosted git repository.

remm 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 efc3bfa592 Remove two instances of printStackTrace
efc3bfa592 is described below

commit efc3bfa592cd9153e2b761738e7f51f3d8ce3a2b
Author: remm <[email protected]>
AuthorDate: Tue Oct 3 12:28:16 2023 +0200

    Remove two instances of printStackTrace
---
 java/org/apache/catalina/manager/LocalStrings.properties   | 1 +
 java/org/apache/catalina/manager/StatusManagerServlet.java | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/catalina/manager/LocalStrings.properties 
b/java/org/apache/catalina/manager/LocalStrings.properties
index 09b6f51266..148833de19 100644
--- a/java/org/apache/catalina/manager/LocalStrings.properties
+++ b/java/org/apache/catalina/manager/LocalStrings.properties
@@ -129,6 +129,7 @@ managerServlet.deployed=OK - Deployed application at 
context path [{0}]
 managerServlet.deployedButNotStarted=FAIL - Deployed application at context 
path [{0}] but context failed to start
 managerServlet.error.deploy=Error deploying [{0}]
 managerServlet.error.idleParam=Could not parse integer idle parameter [{0}]
+managerServlet.error.jmx=JMX error
 managerServlet.error.reload=Error reloading [{0}]
 managerServlet.error.resources=Error displaying resources of type [{0}]
 managerServlet.error.serverInfo=Error displaying server information
diff --git a/java/org/apache/catalina/manager/StatusManagerServlet.java 
b/java/org/apache/catalina/manager/StatusManagerServlet.java
index 1369cb6101..db598421d8 100644
--- a/java/org/apache/catalina/manager/StatusManagerServlet.java
+++ b/java/org/apache/catalina/manager/StatusManagerServlet.java
@@ -147,7 +147,7 @@ public class StatusManagerServlet extends HttpServlet 
implements NotificationLis
             mBeanServer.addNotificationListener(objectName, this, null, null);
 
         } catch (Exception e) {
-            e.printStackTrace();
+            log(sm.getString("managerServlet.error.jmx"), e);
         }
 
     }
@@ -166,7 +166,7 @@ public class StatusManagerServlet extends HttpServlet 
implements NotificationLis
             objectName = new ObjectName(onStr);
             mBeanServer.removeNotificationListener(objectName, this, null, 
null);
         } catch (Exception e) {
-            e.printStackTrace();
+            log(sm.getString("managerServlet.error.jmx"), e);
         }
 
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to