cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1420347 [1/2] - in /cxf/dosgi/trunk/dsw/cxf-dsw/src: main/java/org/apache/cxf/dosgi/dsw/decorator/ main/java/org/apache/cxf/dosgi/dsw/handlers/ main/java/org/apache/cxf/dosgi/dsw/qos/ main/java/org/apache/cxf/dosgi/dsw/service/ main/java/o...
Date Tue, 11 Dec 2012 19:28:00 GMT
Author: dkulp
Date: Tue Dec 11 19:27:53 2012
New Revision: 1420347

URL: http://svn.apache.org/viewvc?rev=1420347&view=rev
Log:
A lot more whitespace updates, remove all the tab chars

Modified:
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/InterfaceRule.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImpl.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtils.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentManagerImpl.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentUtils.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ClientServiceFactory.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventAdminHelper.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImpl.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCore.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminInstance.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceadminFactory.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/Utils.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/ActivatorTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/decorator/InterfaceRuleTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ClientServiceFactoryTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactoryTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManagerTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandlerTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/jaxws/MyJaxWsEchoService.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/simple/MySimpleEchoService.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfFindListenerHookTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtilsTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentManagerImplTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentTrackerTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/DistributionProviderImplTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImplTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCoreTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/UtilsTest.java
    cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/util/OsgiUtilsTest.java

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/InterfaceRule.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/InterfaceRule.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/InterfaceRule.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/InterfaceRule.java Tue Dec 11 19:27:53 2012
@@ -56,8 +56,8 @@ public class InterfaceRule implements Ru
                 Constructor<?> ctor = cls.getConstructor(new Class [] {String.class});
                 obj = ctor.newInstance(value);
             } catch (Throwable th) {
-                LOG.warn("Could not handle property '" + name +
-                    "' with value '" + value + "' of type: " + type, th);
+                LOG.warn("Could not handle property '" + name 
+                         + "' with value '" + value + "' of type: " + type, th);
                 return;
             }
         }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImpl.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImpl.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImpl.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImpl.java Tue Dec 11 19:27:53 2012
@@ -101,7 +101,7 @@ public class ServiceDecoratorImpl implem
     }
     
     void removeDecorations(Bundle bundle) {
-        for (Iterator<Rule> i = decorations.iterator(); i.hasNext(); ) {
+        for (Iterator<Rule> i = decorations.iterator(); i.hasNext();) {
             Rule r = i.next();
             if (bundle.equals(r.getBundle())) {
                 decorations.remove(r); // The iterator doesn't support 'remove'

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java Tue Dec 11 19:27:53 2012
@@ -114,14 +114,14 @@ public class HttpServiceManager {
         LOG.debug("Registering service listener for service with ID {}", sid);
      
         String previous = exportedAliases.put(sid, alias);
-        if(previous != null) {
+        if (previous != null) {
             LOG.warn("Overwriting service export for service with ID {}", sid);
         }
         
         try {
             Filter f = bundleContext.createFilter("(" + org.osgi.framework.Constants.SERVICE_ID + "=" + sid + ")");
             
-            if(f != null) {
+            if (f != null) {
                 bundleContext.addServiceListener(new UnregisterListener(), f.toString());
             } else {
                 LOG.warn("Service listener could not be started. The service will not be automatically unexported.");
@@ -159,7 +159,7 @@ public class HttpServiceManager {
             if (alias == null) {
                 LOG.error(
                         "Unable to unexport HTTP servlet for service class ''{0}'', service-id {1}: no servlet alias found",
-                        new Object[] { sref.getProperty(org.osgi.framework.Constants.OBJECTCLASS), sid });
+                        new Object[] {sref.getProperty(org.osgi.framework.Constants.OBJECTCLASS), sid});
                 return;
             }
             LOG.debug("Unexporting HTTP servlet for alias '{}'", alias);

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSPojoConfigurationTypeHandler.java Tue Dec 11 19:27:53 2012
@@ -56,7 +56,8 @@ public class JaxRSPojoConfigurationTypeH
     }
     
     public Object createProxy(ServiceReference serviceReference, BundleContext dswContext,
-                              BundleContext callingContext, Class<?> iClass, EndpointDescription sd) throws IntentUnsatifiedException {
+                              BundleContext callingContext, Class<?> iClass,
+                              EndpointDescription sd) throws IntentUnsatifiedException {
 
         String address = getPojoAddress(sd, iClass);
         if (address == null) {
@@ -72,9 +73,9 @@ public class JaxRSPojoConfigurationTypeH
         }
         
         try {
-        	ProxyClassLoader cl = new ProxyClassLoader();
-        	cl.addLoader(iClass.getClassLoader());
-        	cl.addLoader(Client.class.getClassLoader());
+            ProxyClassLoader cl = new ProxyClassLoader();
+            cl.addLoader(iClass.getClassLoader());
+            cl.addLoader(Client.class.getClassLoader());
             return createJaxrsProxy(address, callingContext, dswContext, iClass, cl, sd);
         } catch (Throwable e) {
             LOG.warn("proxy creation failed", e);
@@ -85,15 +86,15 @@ public class JaxRSPojoConfigurationTypeH
     }
 
     protected Object createJaxrsProxy(String address, 
-    		                          BundleContext dswContext,
+                                      BundleContext dswContext,
                                       BundleContext callingContext,
                                       Class<?> iClass,
                                       ClassLoader loader,
                                       EndpointDescription sd) {
-    	JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
+        JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
         bean.setAddress(address);
         if (loader != null) {
-        	bean.setClassLoader(loader);
+            bean.setClassLoader(loader);
         }
         
         addRsInterceptorsFeaturesProps(bean, callingContext, sd.getProperties());
@@ -113,8 +114,11 @@ public class JaxRSPojoConfigurationTypeH
         return proxy;
     }
     
-    public ExportResult createServer(ServiceReference sref, BundleContext dswContext,
-                             BundleContext callingContext, Map<String, Object> sd, Class<?> iClass, Object serviceBean) throws IntentUnsatifiedException {
+    public ExportResult createServer(ServiceReference sref,
+                                     BundleContext dswContext,
+                                     BundleContext callingContext, 
+                                     Map<String, Object> sd, Class<?> iClass,
+                                     Object serviceBean) throws IntentUnsatifiedException {
 
         String contextRoot = httpServiceManager.getServletContextRoot(sd, iClass);
         String address;
@@ -127,22 +131,25 @@ public class JaxRSPojoConfigurationTypeH
             }
         }
 
-        Bus bus = contextRoot != null ? httpServiceManager.registerServletAndGetBus(contextRoot, callingContext, sref) : null;
+        Bus bus = contextRoot != null 
+                ? httpServiceManager.registerServletAndGetBus(contextRoot, callingContext, sref) : null;
 
         LOG.info("Creating a " + iClass.getName()
                  + " endpoint via JaxRSPojoConfigurationTypeHandler, address is " + address);
 
-        JAXRSServerFactoryBean factory = createServerFactory(dswContext, callingContext, sd, iClass, serviceBean, address, bus);
+        JAXRSServerFactoryBean factory = createServerFactory(dswContext, callingContext, sd,
+                                                             iClass, serviceBean, address, bus);
         String completeEndpointAddress = httpServiceManager.getAbsoluteAddress(dswContext, contextRoot, address);
 
         // The properties for the EndpointDescription
-        Map<String, Object> endpointProps = createEndpointProps(sd, iClass, new String[] { Constants.RS_CONFIG_TYPE },
-                completeEndpointAddress, new String[] { "HTTP" });
+        Map<String, Object> endpointProps = createEndpointProps(sd, iClass, new String[] {Constants.RS_CONFIG_TYPE},
+                completeEndpointAddress, new String[] {"HTTP"});
 
         return createServerFromFactory(factory, endpointProps);
     }
     
-    private final ExportResult createServerFromFactory(JAXRSServerFactoryBean factory, Map<String, Object> endpointProps) {
+    private ExportResult createServerFromFactory(JAXRSServerFactoryBean factory,
+                                                       Map<String, Object> endpointProps) {
         ClassLoader oldClassLoader = Thread.currentThread().getContextClassLoader();
         try {
             Thread.currentThread().setContextClassLoader(JAXRSServerFactoryBean.class.getClassLoader());
@@ -155,10 +162,15 @@ public class JaxRSPojoConfigurationTypeH
         }
     }
     
-    private JAXRSServerFactoryBean createServerFactory(BundleContext dswContext, BundleContext callingContext, Map<String, Object> sd,
-            Class<?> iClass, Object serviceBean, String address, Bus bus) {
+    private JAXRSServerFactoryBean createServerFactory(BundleContext dswContext, 
+                                                       BundleContext callingContext,
+                                                       Map<String, Object> sd,
+                                                       Class<?> iClass, 
+                                                       Object serviceBean, 
+                                                       String address, 
+                                                       Bus bus) {
         JAXRSServerFactoryBean factory = new JAXRSServerFactoryBean();
-        if (bus !=null) {
+        if (bus != null) {
             factory.setBus(bus);
         }
         List<UserResource> resources = JaxRSUtils.getModel(callingContext, iClass);

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtils.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtils.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtils.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtils.java Tue Dec 11 19:27:53 2012
@@ -59,10 +59,9 @@ public class JaxRSUtils {
             providers.add(new AegisElementProvider());
         }
         
-        providers.addAll(
-        		ClassUtils.loadProviderClasses(callingContext, 
-                                               sd, 
-                                               org.apache.cxf.dosgi.dsw.Constants.RS_PROVIDER_PROP_KEY));
+        providers.addAll(ClassUtils.loadProviderClasses(callingContext, 
+                                                        sd, 
+                                                        org.apache.cxf.dosgi.dsw.Constants.RS_PROVIDER_PROP_KEY));
 
         Object globalQueryProp = sd.get(org.apache.cxf.dosgi.dsw.Constants.RS_PROVIDER_GLOBAL_PROP_KEY);
         boolean globalQueryRequired = globalQueryProp == null || OsgiUtils.toBoolean(globalQueryProp);

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandler.java Tue Dec 11 19:27:53 2012
@@ -105,7 +105,9 @@ public class PojoConfigurationTypeHandle
         String completeEndpointAddress = httpServiceManager.getAbsoluteAddress(dswContext, contextRoot, address);
 
         // The properties for the EndpointDescription
-        Map<String, Object> endpointProps = createEndpointProps(sd, iClass, new String[]{Constants.WS_CONFIG_TYPE}, completeEndpointAddress, intents);
+        Map<String, Object> endpointProps = createEndpointProps(sd, iClass,
+                                                                new String[]{Constants.WS_CONFIG_TYPE},
+                                                                completeEndpointAddress, intents);
 
         return createServerFromFactory(factory, endpointProps);
     }
@@ -116,7 +118,9 @@ public class PojoConfigurationTypeHandle
 
     private boolean isJAXB(Map<String, Object> sd, Class<?> iClass) {
         String dataBindingName = (String)sd.get(Constants.WS_DATABINDING_PROP_KEY);
-        return (iClass.getAnnotation(WebService.class) != null || Constants.WS_DATA_BINDING_JAXB.equals(dataBindingName)) && !Constants.WS_DATA_BINDING_AEGIS.equals(dataBindingName);
+        return (iClass.getAnnotation(WebService.class) != null 
+            || Constants.WS_DATA_BINDING_JAXB.equals(dataBindingName)) 
+            && !Constants.WS_DATA_BINDING_AEGIS.equals(dataBindingName);
     }
 
     // Isolated so that it can be substituted for testing
@@ -131,7 +135,9 @@ public class PojoConfigurationTypeHandle
     
     private boolean isJAXWS(Map<String, Object> sd, Class<?> iClass) {
         String frontEnd = (String)sd.get(Constants.WS_FRONTEND_PROP_KEY);
-        return (iClass.getAnnotation(WebService.class) != null || Constants.WS_FRONTEND_JAXWS.equals(frontEnd)) && !Constants.WS_FRONTEND_SIMPLE.equals(frontEnd);
+        return (iClass.getAnnotation(WebService.class) != null
+            || Constants.WS_FRONTEND_JAXWS.equals(frontEnd)) 
+            && !Constants.WS_FRONTEND_SIMPLE.equals(frontEnd);
     }
 
 }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandler.java Tue Dec 11 19:27:53 2012
@@ -82,15 +82,15 @@ public class WsdlConfigurationTypeHandle
         }
         String serviceName = OsgiUtils.getProperty(sd, Constants.WSDL_SERVICE_NAME);
         if (serviceName == null) {
-        	serviceName = iClass.getSimpleName();	
+            serviceName = iClass.getSimpleName();
         }
         QName serviceQname = getServiceQName(iClass, sd.getProperties(),
-        		Constants.WSDL_SERVICE_NAMESPACE, Constants.WSDL_SERVICE_NAME);
+                                             Constants.WSDL_SERVICE_NAMESPACE,
+                                             Constants.WSDL_SERVICE_NAME);
         QName portQname = getPortQName(serviceQname.getNamespaceURI(), sd.getProperties(), Constants.WSDL_PORT_NAME);
         Service service = createWebService(wsdlAddress, serviceQname);
-        Object proxy = getProxy(
-            portQname == null ? service.getPort(iClass) : service.getPort(portQname, iClass), 
-        	iClass);
+        Object proxy = getProxy(portQname == null ? service.getPort(iClass) : service.getPort(portQname, iClass), 
+                                iClass);
         //MARC: FIXME !!!! getDistributionProvider().addRemoteService(serviceReference);
         return proxy;
         

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentManagerImpl.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentManagerImpl.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentManagerImpl.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentManagerImpl.java Tue Dec 11 19:27:53 2012
@@ -33,8 +33,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 public class IntentManagerImpl implements IntentManager {
-    private static final String PROVIDED_INTENT_VALUE = "PROVIDED";
     static final Logger LOG = LoggerFactory.getLogger(IntentManagerImpl.class);
+    private static final String PROVIDED_INTENT_VALUE = "PROVIDED";
 
     private final IntentMap intentMap;
     private long maxIntentWaitTime;
@@ -48,7 +48,8 @@ public class IntentManagerImpl implement
         this.maxIntentWaitTime = maxIntentWaitTime;
     }
     
-    public String[] applyIntents(List<Feature> features, AbstractEndpointFactory factory, Map<String, Object> props) throws IntentUnsatifiedException {
+    public String[] applyIntents(List<Feature> features, AbstractEndpointFactory factory,
+                                 Map<String, Object> props) throws IntentUnsatifiedException {
         Set<String> requestedIntents = IntentUtils.getRequestedIntents(props);
         Set<String> appliedIntents = new HashSet<String>();
         appliedIntents.addAll(reverseLookup(intentMap, PROVIDED_INTENT_VALUE));
@@ -66,7 +67,8 @@ public class IntentManagerImpl implement
         return appliedIntents.toArray(new String[0]);
     }
     
-    private boolean processIntent(List<Feature> features, AbstractEndpointFactory factory, String intentName, Object intent) throws IntentUnsatifiedException {
+    private boolean processIntent(List<Feature> features, AbstractEndpointFactory factory,
+                                  String intentName, Object intent) throws IntentUnsatifiedException {
         if (intent instanceof String) {
             if (PROVIDED_INTENT_VALUE.equalsIgnoreCase((String) intent)) {
                 return false;
@@ -88,7 +90,8 @@ public class IntentManagerImpl implement
         return false;
     }
 
-    private Collection<String> addSynonymIntents(Collection<String> appliedIntents, IntentMap intentMap) {
+    private Collection<String> addSynonymIntents(Collection<String> appliedIntents, 
+                                                 IntentMap intentMap) {
         // E.g. SOAP and SOAP.1_1 are synonyms
         List<Object> values = new ArrayList<Object>();
         for (String key : appliedIntents) {
@@ -142,8 +145,9 @@ public class IntentManagerImpl implement
         } while (unsupportedIntents.size() > 0 && System.currentTimeMillis() < endTime);
         
         if (unsupportedIntents.size() > 0) {
-            throw new RuntimeException("service cannot be exported because the following intents are not supported by this RSA: "
-                    + unsupportedIntents);
+            throw new RuntimeException("service cannot be exported because the following "
+                                       + "intents are not supported by this RSA: "
+                                       + unsupportedIntents);
         }
     }
 

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentUtils.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentUtils.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentUtils.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentUtils.java Tue Dec 11 19:27:53 2012
@@ -60,8 +60,12 @@ public class IntentUtils {
     }
 
     public static String[] mergeArrays(String[] a1, String[] a2) {
-        if(a1==null) return a2;
-        if(a2==null) return a1;
+        if (a1 == null) {
+            return a2;
+        }
+        if (a2 == null) {
+            return a1;
+        }
 
         List<String> list = new ArrayList<String>(a1.length + a2.length);
 
@@ -70,8 +74,9 @@ public class IntentUtils {
         }
 
         for (String s : a2) {
-            if (!list.contains(s))
+            if (!list.contains(s)) {
                 list.add(s);
+            }
         }
 
         return list.toArray(new String[list.size()]);

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ClientServiceFactory.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ClientServiceFactory.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ClientServiceFactory.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ClientServiceFactory.java Tue Dec 11 19:27:53 2012
@@ -42,8 +42,8 @@ public class ClientServiceFactory implem
 
     private ImportRegistrationImpl importRegistartion;
 
-    private boolean closeable = false;
-    private int serviceCounter = 0;
+    private boolean closeable;
+    private int serviceCounter;
 
     public ClientServiceFactory(BundleContext dswContext, Class<?> iClass, EndpointDescription sd,
                                 ConfigurationTypeHandler handler, ImportRegistrationImpl ir) {
@@ -63,7 +63,7 @@ public class ClientServiceFactory implem
         try {
             Object proxy = AccessController.doPrivileged(new PrivilegedAction<Object>() {
                 public Object run() {
-                     return handler.createProxy(sreg.getReference(), dswContext, requestingBundle
+                    return handler.createProxy(sreg.getReference(), dswContext, requestingBundle
                                                        .getBundleContext(), iClass, sd);
                 }
             });
@@ -100,20 +100,22 @@ public class ClientServiceFactory implem
             --serviceCounter;
             LOG.debug("Services still provided by this ServiceFactory: {}", serviceCounter);
 
-            if (serviceCounter <= 0 && closeable)
+            if (serviceCounter <= 0 && closeable) {
                 remove();
+            }
         }
     }
 
     private void remove() {
-          importRegistartion.closeAll();
+        importRegistartion.closeAll();
     }
 
     public void setCloseable(boolean closeable) {
         synchronized (this) {
             this.closeable = closeable;
-            if (serviceCounter <= 0 && closeable)
+            if (serviceCounter <= 0 && closeable) {
                 remove();
+            }
         }
     }
 

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventAdminHelper.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventAdminHelper.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventAdminHelper.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventAdminHelper.java Tue Dec 11 19:27:53 2012
@@ -73,7 +73,7 @@ public class EventAdminHelper {
 
         
         EndpointDescription epd = null;
-        if (rsae.getImportReference()!= null) {
+        if (rsae.getImportReference() != null) {
             epd = ((ImportReferenceImpl)rsae.getImportReference()).getImportedEndpointAlways();
             setIfNotNull(props, "import.registration", epd);
         } else if (rsae.getExportReference() != null) {

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventProducer.java Tue Dec 11 19:27:53 2012
@@ -33,7 +33,7 @@ import org.slf4j.LoggerFactory;
 
 public class EventProducer {
 
-    private final static Logger LOG = LoggerFactory.getLogger(EventProducer.class);
+    private static final Logger LOG = LoggerFactory.getLogger(EventProducer.class);
     private BundleContext bctx;
     private EventAdminHelper eaHelper;
 
@@ -51,8 +51,8 @@ public class EventProducer {
     protected void publishNotifcation(ExportRegistration er) {
         RemoteServiceAdminEvent rsae = null;
         if (er.getException() != null) {
-            rsae = new RemoteServiceAdminEvent(RemoteServiceAdminEvent.EXPORT_ERROR, bctx.getBundle(),(ExportReference)null, er
-                .getException());
+            rsae = new RemoteServiceAdminEvent(RemoteServiceAdminEvent.EXPORT_ERROR, bctx.getBundle(), 
+                                               (ExportReference)null, er.getException());
         } else {
             rsae = new RemoteServiceAdminEvent(RemoteServiceAdminEvent.EXPORT_REGISTRATION, bctx.getBundle(),
                                                er.getExportReference(), er.getException());

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImpl.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImpl.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImpl.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImpl.java Tue Dec 11 19:27:53 2012
@@ -144,7 +144,7 @@ public class ImportRegistrationImpl impl
     public EndpointDescription getImportedEndpointDescription() {
         if (isFailure())
             return null;
-        if(closed)
+        if (closed)
             return null;
         
         return importedEndpoint;
@@ -207,7 +207,7 @@ public class ImportRegistrationImpl impl
     }
 
     public ImportReference getImportReference() {
-        if(importReference==null){
+        if (importReference == null) {
             importReference = new ImportReferenceImpl(this);
         }
         return importReference;

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=1420347&r1=1420346&r2=1420347&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 Tue Dec 11 19:27:53 2012
@@ -55,8 +55,10 @@ public class RemoteServiceAdminCore impl
 
     private static final Logger LOG = LoggerFactory.getLogger(RemoteServiceAdminCore.class);
 
-    private final LinkedHashMap<ServiceReference, Collection<ExportRegistration>> exportedServices = new LinkedHashMap<ServiceReference, Collection<ExportRegistration>>();
-    private final LinkedHashMap<EndpointDescription, Collection<ImportRegistrationImpl>> importedServices = new LinkedHashMap<EndpointDescription, Collection<ImportRegistrationImpl>>();
+    private final LinkedHashMap<ServiceReference, Collection<ExportRegistration>> exportedServices 
+        = new LinkedHashMap<ServiceReference, Collection<ExportRegistration>>();
+    private final LinkedHashMap<EndpointDescription, Collection<ImportRegistrationImpl>> importedServices
+        = new LinkedHashMap<EndpointDescription, Collection<ImportRegistrationImpl>>();
 
     private BundleContext bctx;
     private EventProducer eventProducer;
@@ -70,7 +72,7 @@ public class RemoteServiceAdminCore impl
     }
 
     @SuppressWarnings({ "rawtypes", "unchecked" })
-	public List<ExportRegistration> exportService(ServiceReference serviceReference, Map additionalProperties)
+    public List<ExportRegistration> exportService(ServiceReference serviceReference, Map additionalProperties)
         throws IllegalArgumentException, UnsupportedOperationException {
 
         Properties serviceProperties = getProperties(serviceReference);
@@ -98,7 +100,8 @@ public class RemoteServiceAdminCore impl
                 return copyExportRegistration(serviceReference);
             }
             LOG.info("interfaces selected for export: " + interfaces);
-            LinkedHashMap<String, ExportRegistrationImpl> exportRegs = new LinkedHashMap<String, ExportRegistrationImpl>(1);
+            LinkedHashMap<String, ExportRegistrationImpl> exportRegs 
+                = new LinkedHashMap<String, ExportRegistrationImpl>(1);
             Object serviceObject = bctx.getService(serviceReference);
             BundleContext callingContext = serviceReference.getBundle().getBundleContext();
             ConfigurationTypeHandler handler = null;
@@ -147,7 +150,8 @@ public class RemoteServiceAdminCore impl
         List<String> interfaces = new ArrayList<String>(1);
         
         String[] providedInterfaces = (String[]) serviceProperties.get(org.osgi.framework.Constants.OBJECTCLASS);
-        String[] allowedInterfaces = Utils.normalizeStringPlus(serviceProperties.get(RemoteConstants.SERVICE_EXPORTED_INTERFACES));
+        String[] allowedInterfaces 
+            = Utils.normalizeStringPlus(serviceProperties.get(RemoteConstants.SERVICE_EXPORTED_INTERFACES));
         if (providedInterfaces == null || allowedInterfaces == null) {
             return Collections.emptyList();
         }
@@ -184,15 +188,15 @@ public class RemoteServiceAdminCore impl
         // / 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
-        		if (!copiedEndpoints.contains(epd)) {
-        			copiedEndpoints.add(epd);
-        			copy.add(new ExportRegistrationImpl(exportRegistrationImpl));
-        		}
-        	}
+            if (exportRegistration instanceof ExportRegistrationImpl) {
+                ExportRegistrationImpl exportRegistrationImpl = (ExportRegistrationImpl) exportRegistration;
+                EndpointDescription epd = exportRegistration.getExportReference().getExportedEndpoint();
+                //create one copy for each distinct endpoint description
+                if (!copiedEndpoints.contains(epd)) {
+                    copiedEndpoints.add(epd);
+                    copy.add(new ExportRegistrationImpl(exportRegistrationImpl));
+                }
+            }
         }
 
         regs.addAll(copy);
@@ -203,7 +207,7 @@ public class RemoteServiceAdminCore impl
 
 
     private boolean isCreatedByThisRSA(ServiceReference sref) {
-        return (sref.getBundle() != null ) && sref.getBundle().equals(bctx.getBundle());
+        return (sref.getBundle() != null) && sref.getBundle().equals(bctx.getBundle());
     }
 
     public Collection<ExportReference> getExportedServices() {
@@ -222,9 +226,9 @@ public class RemoteServiceAdminCore impl
         synchronized (importedServices) {
             List<ImportReference> irs = new ArrayList<ImportReference>();
             for (Collection<ImportRegistrationImpl> irl : importedServices.values()) {
-            	for (ImportRegistrationImpl impl : irl) {
-            		irs.add(impl.getImportReference());
-            	}
+                for (ImportRegistrationImpl impl : irl) {
+                    irs.add(impl.getImportReference());
+                }
             }
             return Collections.unmodifiableCollection(irs);
         }
@@ -337,7 +341,8 @@ public class RemoteServiceAdminCore impl
                 eventProducer.notifyRemoval(eri);
                 exRegs.remove(eri);
             } else {
-                LOG.error("An exportRegistartion was intended to be removed form internal management structure but couldn't be found in it !! ");
+                LOG.error("An exportRegistartion was intended to be removed form internal "
+                          + "management structure but couldn't be found in it !! ");
             }
             if (exRegs == null || exRegs.size() == 0) {
                 exportedServices.remove(sref);
@@ -350,9 +355,12 @@ public class RemoteServiceAdminCore impl
         Bundle exportingBundle = exportingBundleCtx.getBundle();
 
         // Work on a copy as the map gets modified as part of the behaviour by underlying methods
-        HashMap<ServiceReference, Collection<ExportRegistration>> exportCopy = new HashMap<ServiceReference, Collection<ExportRegistration>>(exportedServices);
+        Map<ServiceReference, Collection<ExportRegistration>> exportCopy 
+            = new HashMap<ServiceReference, Collection<ExportRegistration>>(exportedServices);
 
-        for (Iterator<Map.Entry<ServiceReference, Collection<ExportRegistration>>> it = exportCopy.entrySet().iterator(); it.hasNext(); ) {
+        for (Iterator<Map.Entry<ServiceReference, Collection<ExportRegistration>>> it
+                = exportCopy.entrySet().iterator(); it.hasNext();) {
+            
             Entry<ServiceReference, Collection<ExportRegistration>> entry = it.next();
             Bundle regBundle = entry.getKey().getBundle();
             if (exportingBundle.equals(regBundle)) {
@@ -370,10 +378,11 @@ public class RemoteServiceAdminCore impl
             LOG.debug("Removing importRegistration {}", iri);
 
             Collection<ImportRegistrationImpl> imRegs = importedServices.get(iri.getImportedEndpointAlways());
-            if (imRegs!=null && imRegs.contains(iri)) {
+            if (imRegs != null && imRegs.contains(iri)) {
                 imRegs.remove(iri);
             } else {
-                LOG.error("An importRegistartion was intended to be removed form internal management structure but couldn't be found in it !! ");
+                LOG.error("An importRegistartion was intended to be removed form internal management " 
+                    + "structure but couldn't be found in it !! ");
             }
             if (imRegs == null || imRegs.size() == 0) {
                 importedServices.remove(iri.getImportedEndpointAlways());

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminInstance.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminInstance.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminInstance.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminInstance.java Tue Dec 11 19:27:53 2012
@@ -38,15 +38,15 @@ public class RemoteServiceAdminInstance 
     private BundleContext bctx;
     private RemoteServiceAdminCore rsaCore;
 
-    private boolean closed = false;
+    private boolean closed;
 
     public RemoteServiceAdminInstance(BundleContext bc, RemoteServiceAdminCore core) {
         bctx = bc;
         rsaCore = core;
     }
 
-	@SuppressWarnings({ "rawtypes", "unchecked" })
-	public List /* ExportRegistration */exportService(ServiceReference ref, Map properties)
+    @SuppressWarnings({ "rawtypes", "unchecked" })
+    public List /* ExportRegistration */exportService(ServiceReference ref, Map properties)
         throws IllegalArgumentException, UnsupportedOperationException {
 
         SecurityManager sm = System.getSecurityManager();
@@ -64,16 +64,17 @@ public class RemoteServiceAdminInstance 
         return AccessController.doPrivileged(new PrivilegedAction<List>() {
             public List<ExportRegistration> run() {
 
-                if (closed)
+                if (closed) {
                     return Collections.emptyList();
+                }
 
-                 return rsaCore.exportService(refFinal, propertiesFinal);
+                return rsaCore.exportService(refFinal, propertiesFinal);
             }
         });
     }
 
     @SuppressWarnings({ "rawtypes", "unchecked" })
-	public Collection getExportedServices() {
+    public Collection getExportedServices() {
 
         SecurityManager sm = System.getSecurityManager();
         EndpointPermission epp = new EndpointPermission("*", EndpointPermission.READ);
@@ -81,13 +82,14 @@ public class RemoteServiceAdminInstance 
             sm.checkPermission(epp);
         }
 
-        if (closed)
+        if (closed) {
             return null;
+        }
         return rsaCore.getExportedServices();
     }
 
     @SuppressWarnings({ "rawtypes", "unchecked" })
-	public Collection getImportedEndpoints() {
+    public Collection getImportedEndpoints() {
 
         SecurityManager sm = System.getSecurityManager();
         EndpointPermission epp = new EndpointPermission("*", EndpointPermission.READ);
@@ -95,8 +97,9 @@ public class RemoteServiceAdminInstance 
             sm.checkPermission(epp);
         }
 
-        if (closed)
+        if (closed) {
             return null;
+        }
         return rsaCore.getImportedEndpoints();
     }
 
@@ -114,8 +117,9 @@ public class RemoteServiceAdminInstance 
         return AccessController.doPrivileged(new PrivilegedAction<ImportRegistration>() {
             public ImportRegistration run() {
 
-                if (closed)
+                if (closed) {
                     return null;
+                }
 
                 return rsaCore.importService(epd);
             }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceadminFactory.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceadminFactory.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceadminFactory.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceadminFactory.java Tue Dec 11 19:27:53 2012
@@ -35,12 +35,12 @@ public class RemoteServiceadminFactory i
     private RemoteServiceAdminCore rsaCore;
 
     public RemoteServiceadminFactory(RemoteServiceAdminCore rsaCore) {
-    	this.rsaCore = rsaCore;
+        this.rsaCore = rsaCore;
     }
 
     public Object getService(Bundle b, ServiceRegistration sr) {
         LOG.debug("new RemoteServiceAdmin ServiceInstance created for Bundle {}", b.getSymbolicName());
-        RemoteServiceAdminInstance rsai = new RemoteServiceAdminInstance(b.getBundleContext(),rsaCore);
+        RemoteServiceAdminInstance rsai = new RemoteServiceAdminInstance(b.getBundleContext(), rsaCore);
         rsaServiceInstances.add(rsai);
         return rsai;
     }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/OsgiUtils.java Tue Dec 11 19:27:53 2012
@@ -47,7 +47,7 @@ public final class OsgiUtils {
     // TODO : move these property helpers into PropertyUtils ?
 
     @SuppressWarnings("rawtypes")
-	public static boolean getBooleanProperty(Map sd, String name) {
+    public static boolean getBooleanProperty(Map sd, String name) {
         Object value = sd.get(name);
         return toBoolean(value);
     }
@@ -75,7 +75,7 @@ public final class OsgiUtils {
     public static String getProperty(EndpointDescription sd, String name) {
         Object o = sd.getProperties().get(name);
 
-        if (o != null && o instanceof String) {
+        if (o instanceof String) {
             return (String)o;
         }
 
@@ -84,10 +84,10 @@ public final class OsgiUtils {
     }
 
     @SuppressWarnings("rawtypes")
-	public static String getProperty(Map dict, String name) {
+    public static String getProperty(Map dict, String name) {
         Object o = dict.get(name);
 
-        if (o != null && o instanceof String) {
+        if (o instanceof String) {
             return (String)o;
         }
         return null;
@@ -145,16 +145,15 @@ public final class OsgiUtils {
             String pack = iClass.getPackage().getName();
             LOG.debug("Looking for Package: {}", pack);
             if (ep != null) {
-	            for (ExportedPackage p : ep) {
-	            	if (p != null) {
-		                if (pack.equals(p.getName())) {
-		                    if (LOG.isDebugEnabled()) {
-		                        LOG.debug("found package -> Version: {}", p.getVersion());
-		                    }
-		                    return p.getVersion().toString();
-		                }
-	            	}
-	            }
+                for (ExportedPackage p : ep) {
+                    if (p != null
+                        && pack.equals(p.getName())) {
+                        if (LOG.isDebugEnabled()) {
+                            LOG.debug("found package -> Version: {}", p.getVersion());
+                        }
+                        return p.getVersion().toString();
+                    }
+                }
             }
         } else {
             LOG.error("Was unable to obtain the package admin service -> can't resolve interface versions");
@@ -180,8 +179,8 @@ public final class OsgiUtils {
     public static void overlayProperties(Properties serviceProperties, Map additionalProperties) {
         Enumeration<Object> keys = serviceProperties.keys();
         // Maps lower case key to original key
-        HashMap<String,String> keysLowerCase = new HashMap<String, String>();
-        while(keys.hasMoreElements()){
+        Map<String, String> keysLowerCase = new HashMap<String, String>();
+        while (keys.hasMoreElements()) {
             Object o = keys.nextElement(); 
             if (o instanceof String) {
                 String ks = (String)o;
@@ -193,14 +192,14 @@ public final class OsgiUtils {
         for (Map.Entry e : adProps) {
             // objectClass and service.id must not be overwritten
             Object keyObj = e.getKey();
-            if (keyObj instanceof String && keyObj != null) {
+            if (keyObj instanceof String) {
                 String key = ((String)keyObj).toLowerCase();
                 if (org.osgi.framework.Constants.SERVICE_ID.toLowerCase().equals(key)
                     || org.osgi.framework.Constants.OBJECTCLASS.toLowerCase().equals(key)) {
                     LOG.info("exportService called with additional properties map that contained illegal key: "
                               + key + "   The key is ignored");
                     continue;
-                } else if(keysLowerCase.containsKey(key)) {
+                } else if (keysLowerCase.containsKey(key)) {
                     String origKey = keysLowerCase.get(key);
                     serviceProperties.put(origKey, e.getValue());
                     LOG.debug("Overwriting property [{}]  with value [{}]", origKey, e.getValue());

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/Utils.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/Utils.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/Utils.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/util/Utils.java Tue Dec 11 19:27:53 2012
@@ -30,19 +30,19 @@ public class Utils {
     private static final Logger LOG = LoggerFactory.getLogger(Utils.class);
     
     @SuppressWarnings("rawtypes")
-	public static String[] normalizeStringPlus(Object object) {
+    public static String[] normalizeStringPlus(Object object) {
 
         if (object instanceof String) {
             String s = (String)object;
             String[] values = s.split(",");
             List<String> list = new ArrayList<String>();
             for (String val : values) {
-            	String actualValue = val.trim();
-            	if (actualValue.length() > 0) {
-            		list.add(actualValue);
-            	}
+                String actualValue = val.trim();
+                if (actualValue.length() > 0) {
+                    list.add(actualValue);
+                }
             }
-            return list.toArray(new String[0]);
+            return list.toArray(new String[list.size()]);
         }
 
         if (object instanceof String[]) {
@@ -50,12 +50,12 @@ public class Utils {
         }
         if (object instanceof Collection) {
             Collection col = (Collection)object;
-            ArrayList<String> ar = new ArrayList<String>(col.size());
+            List<String> ar = new ArrayList<String>(col.size());
             for (Object o : col) {
                 if (o instanceof String) {
                     String s = (String)o;
                     ar.add(s);
-                }else{
+                } else {
                     LOG.warn("stringPlus contained non string element in list ! Element was skipped");
                 }
             }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/ActivatorTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/ActivatorTest.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/ActivatorTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/ActivatorTest.java Tue Dec 11 19:27:53 2012
@@ -31,7 +31,7 @@ import org.osgi.framework.Filter;
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.remoteserviceadmin.RemoteServiceAdmin;
 
-public class ActivatorTest extends TestCase{
+public class ActivatorTest extends TestCase {
     private BundleContext getMockBundleContext(IMocksControl control) {
         Bundle b = control.createMock(Bundle.class);
         Hashtable<String, String> ht = new Hashtable<String, String>();
@@ -47,10 +47,12 @@ public class ActivatorTest extends TestC
         IMocksControl control = EasyMock.createNiceControl();
         BundleContext bc = getMockBundleContext(control);
         Filter filter = control.createMock(Filter.class);
-        EasyMock.expect(bc.createFilter(EasyMock.<String>anyObject())).andReturn(filter );
+        EasyMock.expect(bc.createFilter(EasyMock.<String>anyObject())).andReturn(filter);
         EasyMock.expectLastCall().atLeastOnce();
         ServiceRegistration sr = control.createMock(ServiceRegistration.class);
-        EasyMock.expect(bc.registerService(EasyMock.eq(RemoteServiceAdmin.class.getName()),EasyMock.anyObject(), (Dictionary<?,?>)EasyMock.anyObject())).andReturn(sr).atLeastOnce();
+        EasyMock.expect(bc.registerService(EasyMock.eq(RemoteServiceAdmin.class.getName()),
+                                           EasyMock.anyObject(), (Dictionary<?, ?>)EasyMock.anyObject()))
+                                           .andReturn(sr).atLeastOnce();
         
         control.replay();
         Activator a = new Activator();

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/decorator/InterfaceRuleTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/decorator/InterfaceRuleTest.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/decorator/InterfaceRuleTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/decorator/InterfaceRuleTest.java Tue Dec 11 19:27:53 2012
@@ -31,7 +31,7 @@ import org.osgi.framework.ServiceReferen
 
 public class InterfaceRuleTest extends TestCase {
     
-    public void testDUMMY(){
+    public void testDUMMY() {
         assertTrue(true);
     }
     

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ClientServiceFactoryTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ClientServiceFactoryTest.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ClientServiceFactoryTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ClientServiceFactoryTest.java Tue Dec 11 19:27:53 2012
@@ -42,7 +42,7 @@ public class ClientServiceFactoryTest ex
         
         IMocksControl control = EasyMock.createNiceControl();
         BundleContext dswContext = control.createMock(BundleContext.class);
-        Map<String, Object> map = new HashMap<String,Object>();
+        Map<String, Object> map = new HashMap<String, Object>();
         map.put(RemoteConstants.ENDPOINT_ID, "http://google.de");
         map.put(RemoteConstants.SERVICE_IMPORTED_CONFIGS, "myGreatConfiguration");
         map.put(Constants.OBJECTCLASS, new String[]{"my.class"});
@@ -64,7 +64,7 @@ public class ClientServiceFactoryTest ex
         EasyMock.expectLastCall().andReturn(myTestProxyObject);        
         control.replay();       
         
-        ClientServiceFactory csf = new ClientServiceFactory(dswContext, String.class, ed, handler,iri);
+        ClientServiceFactory csf = new ClientServiceFactory(dswContext, String.class, ed, handler, iri);
         assertSame(myTestProxyObject, csf.getService(requestingBundle, sreg));
     }
 }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactoryTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactoryTest.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactoryTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/ConfigTypeHandlerFactoryTest.java Tue Dec 11 19:27:53 2012
@@ -18,8 +18,6 @@
  */
 package org.apache.cxf.dosgi.dsw.handlers;
 
-import static org.junit.Assert.assertTrue;
-
 import java.util.HashMap;
 import java.util.Map;
 
@@ -33,6 +31,9 @@ import org.junit.Test;
 import org.osgi.framework.BundleContext;
 import org.osgi.service.remoteserviceadmin.RemoteConstants;
 
+import static org.junit.Assert.assertTrue;
+
+
 public class ConfigTypeHandlerFactoryTest {
 
     @Test

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManagerTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManagerTest.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManagerTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManagerTest.java Tue Dec 11 19:27:53 2012
@@ -18,9 +18,6 @@
   */
 package org.apache.cxf.dosgi.dsw.handlers;
 
-import static org.easymock.EasyMock.expect;
-import static org.easymock.EasyMock.expectLastCall;
-
 import java.util.Dictionary;
 
 import javax.servlet.Servlet;
@@ -44,6 +41,10 @@ import org.osgi.service.http.HttpContext
 import org.osgi.service.http.HttpService;
 import org.osgi.service.http.NamespaceException;
 
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+
+
 public class HttpServiceManagerTest extends TestCase {
     
     public void testGetAbsoluteAddress() {
@@ -74,10 +75,10 @@ public class HttpServiceManagerTest exte
         ServletConfig config = c.createMock(ServletConfig.class);
         expect(config.getInitParameter(EasyMock.<String>anyObject())).andReturn(null).atLeastOnce();
         ServletContext servletContext = c.createMock(ServletContext.class);
-        expect(config.getServletContext()).andReturn(servletContext );
+        expect(config.getServletContext()).andReturn(servletContext);
         final HttpService httpService = new DummyHttpService(config);
         ServiceReference sr = c.createMock(ServiceReference.class);
-        expect(sr.getProperty(EasyMock.eq("service.id"))).andReturn(12345l).atLeastOnce();
+        expect(sr.getProperty(EasyMock.eq("service.id"))).andReturn(12345L).atLeastOnce();
         c.replay();
         
         HttpServiceManager h = new HttpServiceManager(dswContext, null, null, null) {

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/PojoConfigurationTypeHandlerTest.java Tue Dec 11 19:27:53 2012
@@ -97,7 +97,7 @@ public class PojoConfigurationTypeHandle
     }
 
     //  todo: add test for data bindings
-    public void testCreateProxy(){
+    public void testCreateProxy() {
         IMocksControl c = EasyMock.createNiceControl();
         BundleContext bc1 = c.createMock(BundleContext.class);
         BundleContext bc2 = c.createMock(BundleContext.class);
@@ -109,11 +109,15 @@ public class PojoConfigurationTypeHandle
         EasyMock.expect(cpfb.getServiceFactory()).andReturn(sf).anyTimes();
         IntentManager intentManager = new IntentManagerImpl(new IntentMap()) {
             @Override
-            public String[] applyIntents(List<Feature> features, AbstractEndpointFactory factory, Map<String, Object> sd) {
+            public String[] applyIntents(List<Feature> features, 
+                                         AbstractEndpointFactory factory, 
+                                         Map<String, Object> sd) {
                 return new String[0];
             }
         };
-        PojoConfigurationTypeHandler p = new PojoConfigurationTypeHandler(bc1, intentManager, dummyHttpServiceManager()) {
+        PojoConfigurationTypeHandler p = new PojoConfigurationTypeHandler(bc1,
+                                                                          intentManager,
+                                                                          dummyHttpServiceManager()) {
             @Override
             protected ClientProxyFactoryBean createClientProxyFactoryBean(Map<String, Object> sd, Class<?> iClass) {
                 return cpfb;
@@ -149,13 +153,15 @@ public class PojoConfigurationTypeHandle
         final ServerFactoryBean sfb = createMockServerFactoryBean();
         
         IntentMap intentMap = new IntentMap();
-        IntentManager intentManager = new IntentManagerImpl(intentMap ) {
+        IntentManager intentManager = new IntentManagerImpl(intentMap) {
             @Override
-            public String[] applyIntents(List<Feature> features, AbstractEndpointFactory factory, Map<String, Object> sd) {
+            public String[] applyIntents(List<Feature> features, AbstractEndpointFactory factory, 
+                                         Map<String, Object> sd) {
                 return new String []{};
             }
         };
-        PojoConfigurationTypeHandler p = new PojoConfigurationTypeHandler(dswContext, intentManager, dummyHttpServiceManager()) {
+        PojoConfigurationTypeHandler p = new PojoConfigurationTypeHandler(dswContext, intentManager, 
+                                                                          dummyHttpServiceManager()) {
             @Override
             protected ServerFactoryBean createServerFactoryBean(Map<String, Object> sd, Class<?> iClass) {
                 return sfb;
@@ -239,7 +245,9 @@ public class PojoConfigurationTypeHandle
         EasyMock.replay(bc);
         
         IntentManager intentManager = new IntentManagerImpl(new IntentMap());
-        PojoConfigurationTypeHandler pch = new PojoConfigurationTypeHandler(bc, intentManager, dummyHttpServiceManager());
+        PojoConfigurationTypeHandler pch = new PojoConfigurationTypeHandler(bc, 
+                                                                            intentManager,
+                                                                            dummyHttpServiceManager());
         
         Map<String, Object> sd = new HashMap<String, Object>();
         sd.put(org.osgi.framework.Constants.SERVICE_ID, 42);
@@ -250,9 +258,12 @@ public class PojoConfigurationTypeHandle
         assertEquals(42, props.get(RemoteConstants.ENDPOINT_SERVICE_ID));
         assertEquals("some_uuid1", props.get(RemoteConstants.ENDPOINT_FRAMEWORK_UUID));
         assertEquals("http://localhost:12345", props.get(RemoteConstants.ENDPOINT_ID));
-        assertEquals(Arrays.asList("java.lang.String"), Arrays.asList((Object []) props.get(org.osgi.framework.Constants.OBJECTCLASS)));
-        assertEquals(Arrays.asList("org.apache.cxf.ws"), Arrays.asList((Object []) props.get(RemoteConstants.SERVICE_IMPORTED_CONFIGS)));
-        assertEquals(Arrays.asList("my_intent", "your_intent"), Arrays.asList((Object []) props.get(RemoteConstants.SERVICE_INTENTS)));
+        assertEquals(Arrays.asList("java.lang.String"), 
+                     Arrays.asList((Object []) props.get(org.osgi.framework.Constants.OBJECTCLASS)));
+        assertEquals(Arrays.asList("org.apache.cxf.ws"),
+                     Arrays.asList((Object []) props.get(RemoteConstants.SERVICE_IMPORTED_CONFIGS)));
+        assertEquals(Arrays.asList("my_intent", "your_intent"),
+                     Arrays.asList((Object []) props.get(RemoteConstants.SERVICE_INTENTS)));
         assertEquals("0.0.0", props.get("endpoint.package.version.java.lang"));
     }
     
@@ -260,7 +271,9 @@ public class PojoConfigurationTypeHandle
         IMocksControl c = EasyMock.createNiceControl();
         BundleContext dswBC = c.createMock(BundleContext.class);
         IntentManager intentManager = new DummyIntentManager();
-        PojoConfigurationTypeHandler handler = new PojoConfigurationTypeHandler(dswBC, intentManager, dummyHttpServiceManager());
+        PojoConfigurationTypeHandler handler = new PojoConfigurationTypeHandler(dswBC, 
+                                                                                intentManager, 
+                                                                                dummyHttpServiceManager());
         Object serviceBean = new MyJaxWsEchoServiceImpl();
         ServiceReference sref = c.createMock(ServiceReference.class);
 
@@ -274,7 +287,9 @@ public class PojoConfigurationTypeHandle
         Endpoint ep = server.getEndpoint();
         QName bindingName = ep.getEndpointInfo().getBinding().getName();
         Assert.assertEquals(JaxWsEndpointImpl.class, ep.getClass());
-        Assert.assertEquals(new QName("http://jaxws.handlers.dsw.dosgi.cxf.apache.org/", "MyJaxWsEchoServiceServiceSoapBinding"), bindingName);
+        Assert.assertEquals(new QName("http://jaxws.handlers.dsw.dosgi.cxf.apache.org/",
+                                      "MyJaxWsEchoServiceServiceSoapBinding"),
+                            bindingName);
         
     }
     
@@ -282,7 +297,8 @@ public class PojoConfigurationTypeHandle
         IMocksControl c = EasyMock.createNiceControl();
         BundleContext dswBC = c.createMock(BundleContext.class);
         IntentManager intentManager = new DummyIntentManager();
-        PojoConfigurationTypeHandler handler = new PojoConfigurationTypeHandler(dswBC, intentManager, dummyHttpServiceManager());
+        PojoConfigurationTypeHandler handler 
+            = new PojoConfigurationTypeHandler(dswBC, intentManager, dummyHttpServiceManager());
         Object serviceBean = new MySimpleEchoServiceImpl();
         ServiceReference sref = c.createMock(ServiceReference.class);
         Map<String, Object> sd = new HashMap<String, Object>();
@@ -295,13 +311,17 @@ public class PojoConfigurationTypeHandle
         Endpoint ep = server.getEndpoint();
         QName bindingName = ep.getEndpointInfo().getBinding().getName();
         Assert.assertEquals(EndpointImpl.class, ep.getClass());
-        Assert.assertEquals(new QName("http://simple.handlers.dsw.dosgi.cxf.apache.org/", "MySimpleEchoServiceSoapBinding"), bindingName);
+        Assert.assertEquals(new QName("http://simple.handlers.dsw.dosgi.cxf.apache.org/",
+                                      "MySimpleEchoServiceSoapBinding"),
+                            bindingName);
     }
     
     public static class DummyIntentManager implements IntentManager {
 
         @Override
-        public String[] applyIntents(List<Feature> features, AbstractEndpointFactory factory, Map<String, Object> props) {
+        public String[] applyIntents(List<Feature> features, 
+                                     AbstractEndpointFactory factory,
+                                     Map<String, Object> props) {
             return new String[]{};
         }
 

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandlerTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandlerTest.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandlerTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/WsdlConfigurationTypeHandlerTest.java Tue Dec 11 19:27:53 2012
@@ -22,7 +22,7 @@ import junit.framework.TestCase;
 
 public class WsdlConfigurationTypeHandlerTest extends TestCase {
     
-    public void testDUMMY(){
+    public void testDUMMY() {
         assertTrue(true);
     }
     

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/jaxws/MyJaxWsEchoService.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/jaxws/MyJaxWsEchoService.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/jaxws/MyJaxWsEchoService.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/jaxws/MyJaxWsEchoService.java Tue Dec 11 19:27:53 2012
@@ -22,5 +22,5 @@ import javax.jws.WebService;
 
 @WebService
 public interface MyJaxWsEchoService {
-    public String echo(String message);
+    String echo(String message);
 }
\ No newline at end of file

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/simple/MySimpleEchoService.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/simple/MySimpleEchoService.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/simple/MySimpleEchoService.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/simple/MySimpleEchoService.java Tue Dec 11 19:27:53 2012
@@ -19,5 +19,5 @@
 package org.apache.cxf.dosgi.dsw.handlers.simple;
 
 public interface MySimpleEchoService {
-    public String echo(String message);
+    String echo(String message);
 }
\ No newline at end of file

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfFindListenerHookTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfFindListenerHookTest.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfFindListenerHookTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/CxfFindListenerHookTest.java Tue Dec 11 19:27:53 2012
@@ -113,7 +113,7 @@ public class CxfFindListenerHookTest ext
 //                        + ")(colour=blue))";
 //        doTestTrackerPropertiesSet(filter,
 //                                   "osgi.remote.discovery.interest.filters",
-//				   replacePredicate(filter),
+//                                   replacePredicate(filter),
 //                                   Collections.EMPTY_SET,
 //                                   asList(replacePredicate(filter)));
 //    }
@@ -134,7 +134,7 @@ public class CxfFindListenerHookTest ext
 //                        + ")(colour=blue))";
 //        doTestTrackerPropertiesSet(filter,
 //                                   "osgi.remote.discovery.interest.filters",
-//				   replacePredicate(filter),
+//                                   replacePredicate(filter),
 //                                   Collections.EMPTY_SET,
 //                                   asList(replacePredicate(filter)));
 //    }

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtilsTest.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtilsTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/hooks/ServiceHookUtilsTest.java Tue Dec 11 19:27:53 2012
@@ -22,7 +22,7 @@ import junit.framework.TestCase;
 
 public class ServiceHookUtilsTest extends TestCase {
     
-    public void testDUMMY(){
+    public void testDUMMY() {
         assertTrue(true);
     }
     
@@ -42,7 +42,7 @@ public class ServiceHookUtilsTest extend
 //        control.replay();
 //        
 //        assertSame(srvr, 
-//            ServiceHookUtils.createServer(handler, serviceReference, dswContext, callingContext, sd, service));        
+//            ServiceHookUtils.createServer(handler, serviceReference, dswContext, callingContext, sd, service));
 //    }
 //
 //    public void testNoServerWhenNoInterfaceSpecified() {
@@ -101,8 +101,8 @@ public class ServiceHookUtilsTest extend
 //                                                              String... interfaceNames) {
 //        List<String> iList = new ArrayList<String>();
 //        for (String iName : interfaceNames) {
-//    	    iList.add(iName);
-//    	}
+//            iList.add(iName);
+//        }
 //        ServiceEndpointDescription sd = control.createMock(ServiceEndpointDescription.class);
 //        sd.getProvidedInterfaces();
 //        EasyMock.expectLastCall().andReturn(iList);

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentManagerImplTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentManagerImplTest.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentManagerImplTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentManagerImplTest.java Tue Dec 11 19:27:53 2012
@@ -18,9 +18,6 @@
   */
 package org.apache.cxf.dosgi.dsw.qos;
 
-import static junit.framework.Assert.assertEquals;
-import static junit.framework.Assert.assertTrue;
-
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -39,6 +36,10 @@ import org.easymock.classextension.EasyM
 import org.easymock.classextension.IMocksControl;
 import org.junit.Test;
 
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertTrue;
+
+
 public class IntentManagerImplTest {
     
     @Test
@@ -147,7 +148,8 @@ public class IntentManagerImplTest {
 
         Map<String, Object> intents = new HashMap<String, Object>();
         BindingConfiguration feat1 = control.createMock(BindingConfiguration.class);
-        intents.put("A", new AbstractFeature() {});
+        intents.put("A", new AbstractFeature() {
+        });
         intents.put("SOAP", feat1);
         intents.put("SOAP.1_1", feat1);
         intents.put("SOAP.1_2", control.createMock(BindingConfiguration.class));
@@ -176,7 +178,8 @@ public class IntentManagerImplTest {
 
         Map<String, Object> intents = new HashMap<String, Object>();
         BindingConfiguration feat1 = control.createMock(BindingConfiguration.class);
-        intents.put("A", new AbstractFeature() {});
+        intents.put("A", new AbstractFeature() {
+        });
         intents.put("SOAP", feat1);
         intents.put("SOAP.1_1", feat1);
         intents.put("SOAP.1_2", control.createMock(BindingConfiguration.class));
@@ -261,13 +264,14 @@ public class IntentManagerImplTest {
         
         IntentManager intentManager = new IntentManagerImpl(intentMap);
         
-        Set<String> effectiveIntents = new HashSet<String>(Arrays.asList( 
-            intentManager.applyIntents(features, factory, props)));
+        Set<String> effectiveIntents = new HashSet<String>(Arrays.asList(intentManager.applyIntents(features,
+                                                                                                    factory, 
+                                                                                                    props)));
         Set<String> expectedIntents = new HashSet<String>(Arrays.asList(new String [] {"A", "B", "SOAP"}));
         assertEquals(expectedIntents, effectiveIntents);
     }
     
-    private static class TestFeature extends AbstractFeature {
+    private static final class TestFeature extends AbstractFeature {
         private final String name;
         
         private TestFeature(String n) {

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentTrackerTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentTrackerTest.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentTrackerTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/qos/IntentTrackerTest.java Tue Dec 11 19:27:53 2012
@@ -18,7 +18,6 @@
   */
 package org.apache.cxf.dosgi.dsw.qos;
 
-import static org.easymock.EasyMock.expect;
 import junit.framework.Assert;
 
 import org.apache.cxf.dosgi.dsw.Constants;
@@ -34,6 +33,8 @@ import org.osgi.framework.ServiceEvent;
 import org.osgi.framework.ServiceListener;
 import org.osgi.framework.ServiceReference;
 
+import static org.easymock.EasyMock.expect;
+
 public class IntentTrackerTest {
     private static final String MY_INTENT_NAME = "myIntent";
 
@@ -47,13 +48,15 @@ public class IntentTrackerTest {
         final Capture<ServiceListener> capturedListener = new Capture<ServiceListener>();
         bc.addServiceListener(EasyMock.capture(capturedListener), EasyMock.<String>anyObject());
         EasyMock.expectLastCall().atLeastOnce();
-        expect(bc.getServiceReferences(EasyMock.<String>anyObject(), EasyMock.<String>anyObject())).andReturn(new ServiceReference[]{});
+        expect(bc.getServiceReferences(EasyMock.<String>anyObject(), 
+                                       EasyMock.<String>anyObject())).andReturn(new ServiceReference[]{});
         IntentMap intentMap = new IntentMap();
 
         // Create a custom intent
         ServiceReference reference = c.createMock(ServiceReference.class);
         expect(reference.getProperty(Constants.INTENT_NAME_PROP)).andReturn(MY_INTENT_NAME);
-        AbstractFeature testIntent = new AbstractFeature() {};
+        AbstractFeature testIntent = new AbstractFeature() {
+        };
         expect(bc.getService(reference)).andReturn(testIntent).atLeastOnce();
 
         c.replay();

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/DistributionProviderImplTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/DistributionProviderImplTest.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/DistributionProviderImplTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/DistributionProviderImplTest.java Tue Dec 11 19:27:53 2012
@@ -21,7 +21,7 @@ package org.apache.cxf.dosgi.dsw.service
 import junit.framework.TestCase;
 
 public class DistributionProviderImplTest extends TestCase {
-    public void testDUMMY(){
+    public void testDUMMY() {
         assertTrue(true);
     }
     

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImplTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImplTest.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImplTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImplTest.java Tue Dec 11 19:27:53 2012
@@ -18,9 +18,6 @@
   */
 package org.apache.cxf.dosgi.dsw.service;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
 
 import org.easymock.IMocksControl;
 import org.easymock.classextension.EasyMock;
@@ -29,10 +26,14 @@ import org.osgi.framework.ServiceReferen
 import org.osgi.framework.ServiceRegistration;
 import org.osgi.service.remoteserviceadmin.EndpointDescription;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
 public class ImportRegistrationImplTest {
 
     @Test
-    public void testException(){
+    public void testException() {
         
         IMocksControl c = EasyMock.createNiceControl();
         Exception e = c.createMock(Exception.class);
@@ -47,7 +48,7 @@ public class ImportRegistrationImplTest 
     }
     
     @Test
-    public void testDefaultCtor(){
+    public void testDefaultCtor() {
         
         IMocksControl c = EasyMock.createNiceControl();
         EndpointDescription ed = c.createMock(EndpointDescription.class);
@@ -56,17 +57,17 @@ public class ImportRegistrationImplTest 
         
         c.replay();
         
-        ImportRegistrationImpl i = new ImportRegistrationImpl(ed,rsac);
+        ImportRegistrationImpl i = new ImportRegistrationImpl(ed, rsac);
         
         assertNull(i.getException());
         assertEquals(i, i.getParent());
-        assertEquals(ed,i.getImportedEndpointDescription());
+        assertEquals(ed, i.getImportedEndpointDescription());
         
     }
 
     
     @Test
-    public void testCloneAndClose(){
+    public void testCloneAndClose() {
      
         IMocksControl c = EasyMock.createControl();
         EndpointDescription ed = c.createMock(EndpointDescription.class);
@@ -78,17 +79,17 @@ public class ImportRegistrationImplTest 
         
         c.replay();
         
-        ImportRegistrationImpl i1 = new ImportRegistrationImpl(ed,rsac);
+        ImportRegistrationImpl i1 = new ImportRegistrationImpl(ed, rsac);
         
         ImportRegistrationImpl i2 = new ImportRegistrationImpl(i1);
         
         ImportRegistrationImpl i3 = new ImportRegistrationImpl(i2);
         
         
-        try{
+        try {
             i2.setImportedServiceRegistration(sr);    
             assertTrue("An exception should be thrown here !", false);
-        }catch(IllegalStateException e){
+        } catch (IllegalStateException e) {
             // must be thrown here ...
         }
         
@@ -101,9 +102,9 @@ public class ImportRegistrationImplTest 
         assertEquals(i1, i2.getParent());
         assertEquals(i1, i3.getParent());
         
-        assertEquals(ed,i1.getImportedEndpointDescription());
-        assertEquals(ed,i2.getImportedEndpointDescription());
-        assertEquals(ed,i3.getImportedEndpointDescription());
+        assertEquals(ed, i1.getImportedEndpointDescription());
+        assertEquals(ed, i2.getImportedEndpointDescription());
+        assertEquals(ed, i3.getImportedEndpointDescription());
         
         c.verify();
         c.reset();
@@ -149,14 +150,14 @@ public class ImportRegistrationImplTest 
     }
     
     @Test
-    public void testCloseAll(){
+    public void testCloseAll() {
         IMocksControl c = EasyMock.createControl();
         EndpointDescription ed = c.createMock(EndpointDescription.class);
         RemoteServiceAdminCore rsac = c.createMock(RemoteServiceAdminCore.class);
         
         c.replay();
         
-        ImportRegistrationImpl i1 = new ImportRegistrationImpl(ed,rsac);
+        ImportRegistrationImpl i1 = new ImportRegistrationImpl(ed, rsac);
         
         ImportRegistrationImpl i2 = new ImportRegistrationImpl(i1);
         

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCoreTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCoreTest.java?rev=1420347&r1=1420346&r2=1420347&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCoreTest.java (original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/service/RemoteServiceAdminCoreTest.java Tue Dec 11 19:27:53 2012
@@ -18,10 +18,6 @@
  */
 package org.apache.cxf.dosgi.dsw.service;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
 import java.util.Dictionary;
 import java.util.HashMap;
 import java.util.List;
@@ -47,6 +43,11 @@ import org.osgi.service.remoteserviceadm
 import org.osgi.service.remoteserviceadmin.ImportRegistration;
 import org.osgi.service.remoteserviceadmin.RemoteConstants;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+
 public class RemoteServiceAdminCoreTest {
 
     @Test
@@ -58,15 +59,15 @@ public class RemoteServiceAdminCoreTest 
 
         EasyMock.expect(bc.getBundle()).andReturn(b).anyTimes();
 
-        Dictionary<?,?> d = new Properties();
+        Dictionary<?, ?> d = new Properties();
         EasyMock.expect(b.getHeaders()).andReturn(d).anyTimes();
 
         ServiceReference sref = c.createMock(ServiceReference.class);
         EasyMock.expect(sref.getBundle()).andReturn(b).anyTimes();
         EasyMock.expect(sref.getPropertyKeys()).andReturn(new String[]{}).anyTimes();
 
-		ConfigTypeHandlerFactory configTypeHandlerFactory = c.createMock(ConfigTypeHandlerFactory.class);
-        RemoteServiceAdminCore rsaCore = new RemoteServiceAdminCore(bc, configTypeHandlerFactory );
+        ConfigTypeHandlerFactory configTypeHandlerFactory = c.createMock(ConfigTypeHandlerFactory.class);
+        RemoteServiceAdminCore rsaCore = new RemoteServiceAdminCore(bc, configTypeHandlerFactory);
 
         c.replay();
 
@@ -90,7 +91,7 @@ public class RemoteServiceAdminCoreTest 
         Bundle b = c.createMock(Bundle.class);
         BundleContext bc = c.createMock(BundleContext.class);
 
-        Dictionary<?,?> d = new Properties();
+        Dictionary<?, ?> d = new Properties();
         EasyMock.expect(b.getHeaders()).andReturn(d).anyTimes();
 
         EasyMock.expect(bc.getBundle()).andReturn(b).anyTimes();
@@ -106,8 +107,9 @@ public class RemoteServiceAdminCoreTest 
         IntentMap intentMap = new IntentMap(new DefaultIntentMapFactory().create());
         IntentManager intentManager = new IntentManagerImpl(intentMap, 10000);
         HttpServiceManager httpServiceManager = c.createMock(HttpServiceManager.class);
-        ConfigTypeHandlerFactory configTypeHandlerFactory = new ConfigTypeHandlerFactory(bc, intentManager, httpServiceManager);
-        RemoteServiceAdminCore rsaCore = new RemoteServiceAdminCore(bc, configTypeHandlerFactory ) {
+        ConfigTypeHandlerFactory configTypeHandlerFactory 
+            = new ConfigTypeHandlerFactory(bc, intentManager, httpServiceManager);
+        RemoteServiceAdminCore rsaCore = new RemoteServiceAdminCore(bc, configTypeHandlerFactory) {
             @Override
             protected void proxifyMatchingInterface(String interfaceName, ImportRegistrationImpl imReg,
                                                     ConfigurationTypeHandler handler,
@@ -133,7 +135,7 @@ public class RemoteServiceAdminCoreTest 
         // lets import the same endpoint once more -> should get a copy of the ImportRegistration
         ImportRegistration ireg2 = rsaCore.importService(endpoint);
         assertNotNull(ireg2);
-        assertEquals(2,rsaCore.getImportedEndpoints().size());
+        assertEquals(2, rsaCore.getImportedEndpoints().size());
 
         assertEquals(ireg.getImportReference(), (rsaCore.getImportedEndpoints().toArray())[0]);
 



Mime
View raw message