This is an automated email from the ASF dual-hosted git repository. remm pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push: new 14f55a900e Remove use of printStackTrace 14f55a900e is described below commit 14f55a900ebfda371dbcc4ee5803fc7805d67783 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