cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [06/12] cxf git commit: Fix unecessary "else" clauses in rt/management
Date Fri, 04 Aug 2017 19:35:06 GMT
Fix unecessary "else" clauses in rt/management


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/31e53648
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/31e53648
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/31e53648

Branch: refs/heads/master
Commit: 31e536485d6639a72b875e8619424c2cab60d20c
Parents: ed5dfc9
Author: Daniel Kulp <dkulp@apache.org>
Authored: Fri Aug 4 14:31:00 2017 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri Aug 4 14:31:00 2017 -0400

----------------------------------------------------------------------
 rt/management/pom.xml                                    |  2 +-
 .../AbstractMessageResponseTimeInterceptor.java          | 11 +++++------
 .../jmx/export/runtime/ModelMBeanAssembler.java          |  3 +--
 .../org/apache/cxf/tracing/AbstractTracingProvider.java  |  3 +--
 4 files changed, 8 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/31e53648/rt/management/pom.xml
----------------------------------------------------------------------
diff --git a/rt/management/pom.xml b/rt/management/pom.xml
index 108ac3a..b0c19bf 100644
--- a/rt/management/pom.xml
+++ b/rt/management/pom.xml
@@ -94,7 +94,7 @@
                                     <extension>true</extension>
                                     <bindingFile>${basedir}/src/main/build-resources/instrumentation.xjb</bindingFile>
                                     <extensionArgs>
-                                        <extensionArg>-Xdv</extensionArg>
+                                        <extensionArg>-Xdv:attributes</extensionArg>
                                     </extensionArgs>
                                 </xsdOption>
                             </xsdOptions>

http://git-wip-us.apache.org/repos/asf/cxf/blob/31e53648/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
b/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
index d940293..483ced6 100644
--- a/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
+++ b/rt/management/src/main/java/org/apache/cxf/management/interceptor/AbstractMessageResponseTimeInterceptor.java
@@ -101,13 +101,12 @@ public abstract class AbstractMessageResponseTimeInterceptor extends
AbstractPha
         if (null == cr) {
             LOG.log(Level.WARNING, "NO_COUNTER_REPOSITORY");
             return;
-        } else {
-            ObjectName serviceCountername = this.getServiceCounterName(ex);
-            cr.increaseCounter(serviceCountername, mhtr);
-
-            ObjectName operationCounter = this.getOperationCounterName(ex, serviceCountername);
-            cr.increaseCounter(operationCounter, mhtr);
         }
+        ObjectName serviceCountername = this.getServiceCounterName(ex);
+        cr.increaseCounter(serviceCountername, mhtr);
+
+        ObjectName operationCounter = this.getOperationCounterName(ex, serviceCountername);
+        cr.increaseCounter(operationCounter, mhtr);
     }
 
     protected ObjectName getServiceCounterName(Exchange ex) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/31e53648/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanAssembler.java
----------------------------------------------------------------------
diff --git a/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanAssembler.java
b/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanAssembler.java
index 23bc519..e8332ae 100644
--- a/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanAssembler.java
+++ b/rt/management/src/main/java/org/apache/cxf/management/jmx/export/runtime/ModelMBeanAssembler.java
@@ -152,9 +152,8 @@ public class ModelMBeanAssembler {
         for (int i = 0; i < methods.length; i++) {
             if (methods[i].getName().compareTo(methodName) == 0) {
                 return methods[i];
-            } else {
-                continue;
             }
+            continue;
 
         }
         return null;

http://git-wip-us.apache.org/repos/asf/cxf/blob/31e53648/rt/management/src/main/java/org/apache/cxf/tracing/AbstractTracingProvider.java
----------------------------------------------------------------------
diff --git a/rt/management/src/main/java/org/apache/cxf/tracing/AbstractTracingProvider.java
b/rt/management/src/main/java/org/apache/cxf/tracing/AbstractTracingProvider.java
index 8e9c435..d2eafef 100644
--- a/rt/management/src/main/java/org/apache/cxf/tracing/AbstractTracingProvider.java
+++ b/rt/management/src/main/java/org/apache/cxf/tracing/AbstractTracingProvider.java
@@ -71,8 +71,7 @@ public abstract class AbstractTracingProvider {
     protected String buildSpanDescription(final String path, final String method) {
         if (StringUtils.isEmpty(method)) {
             return path;
-        } else {
-            return method + " " + path;
         }
+        return method + " " + path;
     }
 }


Mime
View raw message