This is an automated email from the ASF dual-hosted git repository.
markt 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 d3a0122 Code clean-up. No functional change. Primarily to trigger a
CI build.
d3a0122 is described below
commit d3a012279f099706f9d746a3161d639a6f79456a
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Apr 22 07:58: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: [email protected]
For additional commands, e-mail: [email protected]