cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1357094 - in /cxf/trunk: api/src/main/java/org/apache/cxf/endpoint/ rt/core/src/main/java/org/apache/cxf/bus/ rt/core/src/main/java/org/apache/cxf/bus/managers/ rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/
Date Wed, 04 Jul 2012 06:08:35 GMT
Author: ningjiang
Date: Wed Jul  4 06:08:34 2012
New Revision: 1357094

URL: http://svn.apache.org/viewvc?rev=1357094&view=rev
Log:
CXF-4399 clean up the code

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ManagedEndpoint.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/ManagedBus.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueImplMBeanWrapper.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueManagerImplMBeanWrapper.java
    cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMUtils.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ManagedEndpoint.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ManagedEndpoint.java?rev=1357094&r1=1357093&r2=1357094&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ManagedEndpoint.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/endpoint/ManagedEndpoint.java Wed Jul  4 06:08:34
2012
@@ -89,9 +89,9 @@ public class ManagedEndpoint implements 
     public ObjectName getObjectName() throws JMException {
         String busId = bus.getId();
         StringBuilder buffer = new StringBuilder();
-        buffer.append(ManagementConstants.DEFAULT_DOMAIN_NAME + ":");
-        buffer.append(ManagementConstants.BUS_ID_PROP + "=" + busId + ",");
-        buffer.append(ManagementConstants.TYPE_PROP + "=" + "Bus.Service.Endpoint,");
+        buffer.append(ManagementConstants.DEFAULT_DOMAIN_NAME).append(':');
+        buffer.append(ManagementConstants.BUS_ID_PROP).append('=').append(busId).append(',');
+        buffer.append(ManagementConstants.TYPE_PROP).append('=').append("Bus.Service.Endpoint,");
        
 
         String serviceName = (String)endpoint.get(SERVICE_NAME);
@@ -99,7 +99,7 @@ public class ManagedEndpoint implements 
             serviceName = endpoint.getService().getName().toString();
         }
         serviceName = ObjectName.quote(serviceName);
-        buffer.append(ManagementConstants.SERVICE_NAME_PROP + "=" + serviceName + ",");
+        buffer.append(ManagementConstants.SERVICE_NAME_PROP).append('=').append(serviceName).append(',');
         
         
         String endpointName = (String)endpoint.get(ENDPOINT_NAME);
@@ -107,9 +107,9 @@ public class ManagedEndpoint implements 
             endpointName = endpoint.getEndpointInfo().getName().getLocalPart();
         }
         endpointName = ObjectName.quote(endpointName);
-        buffer.append(ManagementConstants.PORT_NAME_PROP + "=" + endpointName + ",");
+        buffer.append(ManagementConstants.PORT_NAME_PROP).append('=').append(endpointName).append(',');
         // Added the instance id to make the ObjectName unique
-        buffer.append(ManagementConstants.INSTANCE_ID_PROP + "=" + endpoint.hashCode());
+        buffer.append(ManagementConstants.INSTANCE_ID_PROP).append('=').append(endpoint.hashCode());
         
         //Use default domain name of server
         return new ObjectName(buffer.toString());

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/ManagedBus.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/ManagedBus.java?rev=1357094&r1=1357093&r2=1357094&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/ManagedBus.java (original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/ManagedBus.java Wed Jul  4 06:08:34
2012
@@ -46,11 +46,11 @@ public class ManagedBus implements Manag
     
     public ObjectName getObjectName() throws JMException {
         String busId = bus.getId();
-        StringBuilder buffer = new StringBuilder(ManagementConstants.DEFAULT_DOMAIN_NAME
+ ":");
-        buffer.append(ManagementConstants.BUS_ID_PROP + "=" +  busId + ",");
-        buffer.append(ManagementConstants.TYPE_PROP + "="  + TYPE_VALUE + ",");
+        StringBuilder buffer = new StringBuilder(ManagementConstants.DEFAULT_DOMAIN_NAME).append(':');
+        buffer.append(ManagementConstants.BUS_ID_PROP).append('=').append(busId).append(',');
+        buffer.append(ManagementConstants.TYPE_PROP).append('=').append(TYPE_VALUE).append(',');
         // Added the instance id to make the ObjectName unique
-        buffer.append(ManagementConstants.INSTANCE_ID_PROP + "=" + bus.hashCode());
+        buffer.append(ManagementConstants.INSTANCE_ID_PROP).append('=').append(bus.hashCode());
         
 
         return new ObjectName(buffer.toString());

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueImplMBeanWrapper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueImplMBeanWrapper.java?rev=1357094&r1=1357093&r2=1357094&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueImplMBeanWrapper.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueImplMBeanWrapper.java
Wed Jul  4 06:08:34 2012
@@ -121,7 +121,7 @@ public class WorkQueueImplMBeanWrapper i
         buffer.append(ManagementConstants.TYPE_PROP).append('=').append(TYPE_VALUE).append(',');
         buffer.append(ManagementConstants.NAME_PROP).append('=').append(aWorkQueue.getName()).append(',');
         // Added the instance id to make the ObjectName unique
-        buffer.append(ManagementConstants.INSTANCE_ID_PROP + "=" + aWorkQueue.hashCode());
+        buffer.append(ManagementConstants.INSTANCE_ID_PROP).append('=').append(aWorkQueue.hashCode());
         //Use default domain name of server
         return new ObjectName(buffer.toString());
     }

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueManagerImplMBeanWrapper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueManagerImplMBeanWrapper.java?rev=1357094&r1=1357093&r2=1357094&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueManagerImplMBeanWrapper.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/bus/managers/WorkQueueManagerImplMBeanWrapper.java
Wed Jul  4 06:08:34 2012
@@ -57,7 +57,7 @@ public class WorkQueueManagerImplMBeanWr
         buffer.append("WorkQueueManager=").append(NAME_VALUE);
         buffer.append(',').append(ManagementConstants.TYPE_PROP).append('=').append(TYPE_VALUE).append(',');
         // Added the instance id to make the ObjectName unique
-        buffer.append(ManagementConstants.INSTANCE_ID_PROP + "=" + wqManager.hashCode());
+        buffer.append(ManagementConstants.INSTANCE_ID_PROP).append('=').append(wqManager.hashCode());
         //Use default domain name of server
         return new ObjectName(buffer.toString());
     }

Modified: cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMUtils.java?rev=1357094&r1=1357093&r2=1357094&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMUtils.java (original)
+++ cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMUtils.java Wed Jul  4 06:08:34
2012
@@ -152,7 +152,7 @@ public final class RMUtils {
         StringBuilder buffer = new StringBuilder();
         writeTypeProperty(buffer, manager.getBus(), "WSRM.Manager");
         // Added the instance id to make the ObjectName unique
-        buffer.append("," + ManagementConstants.INSTANCE_ID_PROP + "=" + manager.hashCode());
+        buffer.append(',').append(ManagementConstants.INSTANCE_ID_PROP).append('=').append(manager.hashCode());
         return new ObjectName(buffer.toString());
     }
     
@@ -173,18 +173,18 @@ public final class RMUtils {
 
     private static void writeTypeProperty(StringBuilder buffer, Bus bus, String type) {
         String busId = bus.getId();
-        buffer.append(ManagementConstants.DEFAULT_DOMAIN_NAME + ":");
-        buffer.append(ManagementConstants.BUS_ID_PROP + "=" + busId + ",");
-        buffer.append(ManagementConstants.TYPE_PROP + "=" + type);
+        buffer.append(ManagementConstants.DEFAULT_DOMAIN_NAME).append(':');
+        buffer.append(ManagementConstants.BUS_ID_PROP).append('=').append(busId).append(',');
+        buffer.append(ManagementConstants.TYPE_PROP).append('=').append(type);
     }
 
     private static void writeEndpointProperty(StringBuilder buffer, Endpoint ep) {
         String serviceName = ObjectName.quote(ep.getService().getName().toString());
         buffer.append(",");
-        buffer.append(ManagementConstants.SERVICE_NAME_PROP + "=" + serviceName + ",");
+        buffer.append(ManagementConstants.SERVICE_NAME_PROP).append('=').append(serviceName).append(',');
         String endpointName = ObjectName.quote(ep.getEndpointInfo().getName().toString());
-        buffer.append(ManagementConstants.PORT_NAME_PROP + "=" + endpointName + ",");
+        buffer.append(ManagementConstants.PORT_NAME_PROP).append('=').append(endpointName).append(',');
         // Added the instance id to make the ObjectName unique
-        buffer.append(ManagementConstants.INSTANCE_ID_PROP + "=" + ep.hashCode());
+        buffer.append(ManagementConstants.INSTANCE_ID_PROP).append('=').append(ep.hashCode());
     }
 }



Mime
View raw message