This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new e663ab0 Code clean-up. No functional change. Primarily to trigger a CI build. e663ab0 is described below commit e663ab075f73876adcb5172ebb332e79f6d0ee22 Author: Mark Thomas <ma...@apache.org> AuthorDate: Thu Apr 22 07:57:22 2021 +0100 Code clean-up. No functional change. Primarily to trigger a CI build. --- .../catalina/ant/jmx/JMXAccessorQueryTask.java | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/java/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java b/java/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java index dbc4d80..50a220d 100644 --- a/java/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java +++ b/java/org/apache/catalina/ant/jmx/JMXAccessorQueryTask.java @@ -102,8 +102,7 @@ public class JMXAccessorQueryTask extends JMXAccessorTask { * @param qry The query * @return null (no error message to report other than exception) */ - protected String jmxQuery(MBeanServerConnection jmxServerConnection, - String qry) { + protected String jmxQuery(MBeanServerConnection jmxServerConnection, String qry) { String isError = null; Set<ObjectName> names = null; String resultproperty = getResultproperty(); @@ -113,8 +112,9 @@ public class JMXAccessorQueryTask extends JMXAccessorTask { setProperty(resultproperty + ".Length",Integer.toString(names.size())); } } catch (Exception e) { - if (isEcho()) + if (isEcho()) { handleErrorOutput(e.getMessage()); + } return "Can't query mbeans " + qry; } @@ -142,28 +142,29 @@ public class JMXAccessorQueryTask extends JMXAccessorTask { Object value = null; for (MBeanAttributeInfo attr : attrs) { - if (!attr.isReadable()) + if (!attr.isReadable()) { continue; + } String attName = attr.getName(); - if (attName.indexOf('=') >= 0 || attName.indexOf(':') >= 0 - || attName.indexOf(' ') >= 0) { + if (attName.indexOf('=') >= 0 || attName.indexOf(':') >= 0 || attName.indexOf(' ') >= 0) { continue; } try { - value = jmxServerConnection - .getAttribute(oname, attName); + value = jmxServerConnection.getAttribute(oname, attName); } catch (Exception e) { - if (isEcho()) - handleErrorOutput("Error getting attribute " - + oname + " " + pname + attName + " " - + e.toString()); + if (isEcho()) { + handleErrorOutput( + "Error getting attribute " + oname + " " + pname + attName + " " + e.toString()); + } continue; } - if (value == null) + if (value == null) { continue; - if ("modelerType".equals(attName)) + } + if ("modelerType".equals(attName)) { continue; + } createProperty(pname + attName, value); } } catch (Exception e) { --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org