cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject git commit: [CXF-5847]:Refactor the code;Fix typo
Date Fri, 11 Jul 2014 06:30:12 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 6ba3e0b61 -> 3163a3671


[CXF-5847]:Refactor the code;Fix typo


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

Branch: refs/heads/master
Commit: 3163a3671b112b7846c8408dc57cb927f08bfdbc
Parents: 6ba3e0b
Author: Jim Ma <ema@apache.org>
Authored: Fri Jul 11 14:28:57 2014 +0800
Committer: Jim Ma <ema@apache.org>
Committed: Fri Jul 11 14:29:18 2014 +0800

----------------------------------------------------------------------
 .../org/apache/cxf/management/counters/ResponseTimeCounter.java    | 2 +-
 .../interceptor/AbstractMessageResponseTimeInterceptor.java        | 2 +-
 .../management/interceptor/ResponseTimeMessageInInterceptor.java   | 2 +-
 .../interceptor/ResponseTimeMessageInvokerInterceptor.java         | 2 +-
 .../management/interceptor/ResponseTimeMessageOutInterceptor.java  | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/3163a367/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java
----------------------------------------------------------------------
diff --git a/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java
b/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java
index 4d051cf..ee35a34 100644
--- a/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java
+++ b/rt/management/src/main/java/org/apache/cxf/management/counters/ResponseTimeCounter.java
@@ -84,7 +84,7 @@ public class ResponseTimeCounter implements ResponseTimeCounterMBean, Counter
{
         if (maxHandlingTime < handlingTime) {
             maxHandlingTime = handlingTime;
         }
-        if (minHandlingTime == 0 | minHandlingTime > handlingTime) {
+        if (minHandlingTime == 0 || minHandlingTime > handlingTime) {
             minHandlingTime = handlingTime;
         }
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3163a367/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 71dffb0..92f9dc4 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
@@ -171,7 +171,7 @@ public abstract class AbstractMessageResponseTimeInterceptor extends AbstractPha
                 operationName = "\"" + escapePatternChars(nameProperty.toString()) + "\"";
             }
         }
-        StringBuffer buffer = new StringBuffer(sericeCounterName.toString());
+        StringBuilder buffer = new StringBuilder(sericeCounterName.toString());
         if (operationName != null) {
             buffer.append("," + ManagementConstants.OPERATION_NAME_PROP + "=" + operationName);
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/3163a367/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor.java
b/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor.java
index af4a8b6..bdad4e7 100644
--- a/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor.java
+++ b/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptor.java
@@ -37,7 +37,7 @@ public class ResponseTimeMessageInInterceptor extends AbstractMessageResponseTim
         Exchange ex = message.getExchange();
         //if serviceCounter is disabled , all responseTimeInterceptors will be skipped
         Boolean forceDisabled = Boolean.FALSE.equals((Boolean)ex.get("org.apache.cxf.management.counter.enabled"));
-        if (isServiceCounterEnabled(ex) && !forceDisabled) {           
+        if (!forceDisabled && isServiceCounterEnabled(ex)) {           
             if (isClient(message)) {
                 if (!ex.isOneWay()) {
                     endHandlingMessage(ex);

http://git-wip-us.apache.org/repos/asf/cxf/blob/3163a367/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptor.java
b/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptor.java
index 2e74833..5eb7a41 100644
--- a/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptor.java
+++ b/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInvokerInterceptor.java
@@ -41,7 +41,7 @@ public class ResponseTimeMessageInvokerInterceptor extends AbstractMessageRespon
     public void handleMessage(Message message) throws Fault {
         Exchange ex = message.getExchange();
         Boolean forceDisabled = Boolean.FALSE.equals((Boolean)ex.get("org.apache.cxf.management.counter.enabled"));
-        if (isServiceCounterEnabled(ex) && !forceDisabled) {  
+        if (!forceDisabled && isServiceCounterEnabled(ex)) {  
             message.getInterceptorChain().add(new ResponseTimeMessageInvokerEndingInteceptor());
         }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/3163a367/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptor.java
b/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptor.java
index 0ac533a..560c07f 100644
--- a/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptor.java
+++ b/rt/management/src/main/java/org/apache/cxf/management/interceptor/ResponseTimeMessageOutInterceptor.java
@@ -37,7 +37,7 @@ public class ResponseTimeMessageOutInterceptor extends AbstractMessageResponseTi
     public void handleMessage(Message message) throws Fault {
         Exchange ex = message.getExchange();
         Boolean forceDisabled = Boolean.FALSE.equals((Boolean)ex.get("org.apache.cxf.management.counter.enabled"));
-        if (isServiceCounterEnabled(ex) && !forceDisabled) {
+        if (!forceDisabled && isServiceCounterEnabled(ex)) {
             if (ex.get(Exception.class) != null) {
                 endHandlingMessage(ex);
                 return;


Mime
View raw message