cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amic...@apache.org
Subject svn commit: r1487446 - in /cxf/dosgi/trunk/dsw: cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/TopologyManagerExport.java
Date Wed, 29 May 2013 11:55:35 GMT
Author: amichai
Date: Wed May 29 11:55:34 2013
New Revision: 1487446

URL: http://svn.apache.org/r1487446
Log:
Fix RemoteServiceAdmin.exportService() return value handling

Modified:
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java
    cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/TopologyManagerExport.java

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java?rev=1487446&r1=1487445&r2=1487446&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java
Wed May 29 11:55:34 2013
@@ -24,11 +24,13 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.Dictionary;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.cxf.dosgi.dsw.handlers.ConfigTypeHandlerFactory;
 import org.apache.cxf.dosgi.dsw.handlers.ConfigurationTypeHandler;
@@ -256,15 +258,15 @@ public class RemoteServiceAdminCore impl
     }
 
     private List<ExportRegistration> copyExportRegistration(Collection<ExportRegistration>
regs) {
-        List<EndpointDescription> copiedEndpoints = new ArrayList<EndpointDescription>();
+        Set<EndpointDescription> copiedEndpoints = new HashSet<EndpointDescription>();
 
-        // / create a new list with copies of the exportRegistrations
+        // create a new list with copies of the exportRegistrations
         List<ExportRegistration> copy = new ArrayList<ExportRegistration>(regs.size());
         for (ExportRegistration exportRegistration : regs) {
             if (exportRegistration instanceof ExportRegistrationImpl) {
                 ExportRegistrationImpl exportRegistrationImpl = (ExportRegistrationImpl)
exportRegistration;
                 EndpointDescription epd = exportRegistration.getExportReference().getExportedEndpoint();
-                //create one copy for each distinct endpoint description
+                // create one copy for each distinct endpoint description
                 if (!copiedEndpoints.contains(epd)) {
                     copiedEndpoints.add(epd);
                     copy.add(new ExportRegistrationImpl(exportRegistrationImpl));

Modified: cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/TopologyManagerExport.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/TopologyManagerExport.java?rev=1487446&r1=1487445&r2=1487446&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/TopologyManagerExport.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-topology-manager/src/main/java/org/apache/cxf/dosgi/topologymanager/exporter/TopologyManagerExport.java
Wed May 29 11:55:34 2013
@@ -164,7 +164,7 @@ public class TopologyManagerExport {
         LOG.debug("exporting ...");
         Collection<ExportRegistration> exportRegs = remoteServiceAdmin.exportService(sref,
null);
         List<EndpointDescription> endpoints = new ArrayList<EndpointDescription>();
-        if (exportRegs == null) {
+        if (exportRegs.isEmpty()) {
             // TODO export failed -> What should be done here?
             LOG.error("export failed");
         } else {



Mime
View raw message