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

remm pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/8.5.x by this push:
     new b879814244 Remove use of printStackTrace
b879814244 is described below

commit b879814244eaaea790338c5915b3ab420f100388
Author: remm <r...@apache.org>
AuthorDate: Mon Oct 2 15:21:07 2023 +0200

    Remove use of printStackTrace
---
 .../tomcat/util/modeler/modules/LocalStrings.properties  | 16 ++++++++++++++++
 .../modules/MbeansDescriptorsIntrospectionSource.java    |  4 +++-
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git 
a/java/org/apache/tomcat/util/modeler/modules/LocalStrings.properties 
b/java/org/apache/tomcat/util/modeler/modules/LocalStrings.properties
new file mode 100644
index 0000000000..af8059d0a4
--- /dev/null
+++ b/java/org/apache/tomcat/util/modeler/modules/LocalStrings.properties
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+source.introspectionError=Introspection error creating MBean for class [{0}]
diff --git 
a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
 
b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
index 9c1a7da220..4b145333d4 100644
--- 
a/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
+++ 
b/java/org/apache/tomcat/util/modeler/modules/MbeansDescriptorsIntrospectionSource.java
@@ -37,10 +37,12 @@ import org.apache.tomcat.util.modeler.ManagedBean;
 import org.apache.tomcat.util.modeler.OperationInfo;
 import org.apache.tomcat.util.modeler.ParameterInfo;
 import org.apache.tomcat.util.modeler.Registry;
+import org.apache.tomcat.util.res.StringManager;
 
 public class MbeansDescriptorsIntrospectionSource extends ModelerSource
 {
     private static final Log log = 
LogFactory.getLog(MbeansDescriptorsIntrospectionSource.class);
+    private static final StringManager sm = 
StringManager.getManager(MbeansDescriptorsIntrospectionSource.class);
 
     private Registry registry;
     private String type;
@@ -367,7 +369,7 @@ public class MbeansDescriptorsIntrospectionSource extends 
ModelerSource
 
             return mbean;
         } catch (Exception ex) {
-            ex.printStackTrace();
+            log.error(sm.getString("source.introspectionError", 
realClass.getName()), ex);
             return null;
         }
     }


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

Reply via email to