cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amic...@apache.org
Subject svn commit: r1501407 - in /cxf/dosgi/trunk/dsw/cxf-dsw/src: main/java/org/apache/cxf/dosgi/dsw/handlers/ test/java/org/apache/cxf/dosgi/dsw/handlers/
Date Tue, 09 Jul 2013 17:56:36 GMT
Author: amichai
Date: Tue Jul  9 17:56:36 2013
New Revision: 1501407

URL: http://svn.apache.org/r1501407
Log:
Remove unused method parameters

Modified:
    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/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/JaxRSUtilsTest.java

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=1501407&r1=1501406&r2=1501407&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 Jul  9 17:56:36 2013
@@ -99,7 +99,7 @@ public class HttpServiceManager {
         return (HttpService) service;
     }
 
-    public String getServletContextRoot(Map<?, ?> sd, Class<?> iClass) {
+    public String getServletContextRoot(Map<?, ?> sd) {
         return OsgiUtils.getFirstNonEmptyStringProperty(sd,
                 Constants.WS_HTTP_SERVICE_CONTEXT,
                 Constants.WS_HTTP_SERVICE_CONTEXT_OLD,
@@ -144,7 +144,7 @@ public class HttpServiceManager {
         return "/" + type.getName().replace('.', '/');
     }
 
-    protected String getAbsoluteAddress(BundleContext ctx, String contextRoot, String relativeEndpointAddress)
{
+    protected String getAbsoluteAddress(String contextRoot, String relativeEndpointAddress)
{
         if (relativeEndpointAddress.startsWith("http")) {
             return relativeEndpointAddress;
         }

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=1501407&r1=1501406&r2=1501407&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 Jul  9 17:56:36 2013
@@ -102,7 +102,7 @@ public class JaxRSPojoConfigurationTypeH
         } else {
             bean.setServiceClass(iClass);
         }
-        List<Object> providers = JaxRSUtils.getProviders(callingContext, dswContext,
endpoint.getProperties());
+        List<Object> providers = JaxRSUtils.getProviders(callingContext, endpoint.getProperties());
         if (providers != null && !providers.isEmpty()) {
             bean.setProviders(providers);
         }
@@ -115,7 +115,7 @@ public class JaxRSPojoConfigurationTypeH
                                      BundleContext callingContext,
                                      Map<String, Object> sd, Class<?> iClass,
                                      Object serviceBean) throws IntentUnsatisfiedException
{
-        String contextRoot = httpServiceManager.getServletContextRoot(sd, iClass);
+        String contextRoot = httpServiceManager.getServletContextRoot(sd);
         String address;
         if (contextRoot == null) {
             address = getServerAddress(sd, iClass);
@@ -132,9 +132,8 @@ public class JaxRSPojoConfigurationTypeH
         LOG.info("Creating a " + iClass.getName()
                  + " endpoint via JaxRSPojoConfigurationTypeHandler, address is " + address);
 
-        JAXRSServerFactoryBean factory = createServerFactory(dswContext, callingContext,
sd,
-                                                             iClass, serviceBean, address,
bus);
-        String completeEndpointAddress = httpServiceManager.getAbsoluteAddress(dswContext,
contextRoot, address);
+        JAXRSServerFactoryBean factory = createServerFactory(callingContext, sd, iClass,
serviceBean, address, bus);
+        String completeEndpointAddress = httpServiceManager.getAbsoluteAddress(contextRoot,
address);
 
         // The properties for the EndpointDescription
         Map<String, Object> endpointProps = createEndpointProps(sd, iClass, new String[]
{Constants.RS_CONFIG_TYPE},
@@ -157,8 +156,7 @@ public class JaxRSPojoConfigurationTypeH
         }
     }
 
-    private JAXRSServerFactoryBean createServerFactory(BundleContext dswContext,
-                                                       BundleContext callingContext,
+    private JAXRSServerFactoryBean createServerFactory(BundleContext callingContext,
                                                        Map<String, Object> sd,
                                                        Class<?> iClass,
                                                        Object serviceBean,
@@ -177,7 +175,7 @@ public class JaxRSPojoConfigurationTypeH
             factory.setResourceProvider(iClass, new SingletonResourceProvider(serviceBean));
         }
         factory.setAddress(address);
-        List<Object> providers = JaxRSUtils.getProviders(callingContext, dswContext,
sd);
+        List<Object> providers = JaxRSUtils.getProviders(callingContext, sd);
         if (providers != null && !providers.isEmpty()) {
             factory.setProviders(providers);
         }

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=1501407&r1=1501406&r2=1501407&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 Jul  9 17:56:36 2013
@@ -54,7 +54,7 @@ public final class JaxRSUtils {
     }
 
     @SuppressWarnings("rawtypes")
-    static List<Object> getProviders(BundleContext callingContext, BundleContext dswBC,
Map sd) {
+    static List<Object> getProviders(BundleContext callingContext, Map sd) {
         List<Object> providers = new ArrayList<Object>();
         if ("aegis".equals(sd.get(org.apache.cxf.dosgi.dsw.Constants.RS_DATABINDING_PROP_KEY)))
{
             providers.add(new AegisElementProvider());

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=1501407&r1=1501406&r2=1501407&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 Jul  9 17:56:36 2013
@@ -94,7 +94,7 @@ public class PojoConfigurationTypeHandle
                                      Object serviceBean) throws IntentUnsatisfiedException
{
         try {
             String address = getPojoAddress(sd, iClass);
-            String contextRoot = httpServiceManager.getServletContextRoot(sd, iClass);
+            String contextRoot = httpServiceManager.getServletContextRoot(sd);
 
             ServerFactoryBean factory = createServerFactoryBean(sd, iClass);
             factory.setDataBinding(getDataBinding(sd, iClass));
@@ -109,7 +109,7 @@ public class PojoConfigurationTypeHandle
             setWsdlProperties(factory, callingContext, sd, false);
             String[] intents = intentManager.applyIntents(factory.getFeatures(), factory,
sd);
 
-            String completeEndpointAddress = httpServiceManager.getAbsoluteAddress(dswContext,
contextRoot, address);
+            String completeEndpointAddress = httpServiceManager.getAbsoluteAddress(contextRoot,
address);
 
             // The properties for the EndpointDescription
             Map<String, Object> endpointProps = createEndpointProps(sd, iClass,

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=1501407&r1=1501406&r2=1501407&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 Jul  9 17:56:36 2013
@@ -116,7 +116,7 @@ public class WsdlConfigurationTypeHandle
         }
 
         String address = getServerAddress(sd, iClass);
-        String contextRoot = httpServiceManager.getServletContextRoot(sd, iClass);
+        String contextRoot = httpServiceManager.getServletContextRoot(sd);
         if (address == null && contextRoot == null) {
             throw new RuntimeException("Remote address is unavailable");
         }

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=1501407&r1=1501406&r2=1501407&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 Jul  9 17:56:36 2013
@@ -53,10 +53,10 @@ public class HttpServiceManagerTest exte
         HttpServiceManager manager = new HttpServiceManager(bundleContext, null, null, null);
         String localIp = LocalHostUtil.getLocalIp();
 
-        String address1 = manager.getAbsoluteAddress(bundleContext, null, "/myservice");
+        String address1 = manager.getAbsoluteAddress(null, "/myservice");
         assertEquals("http://" + localIp + ":8181/cxf/myservice", address1);
 
-        String address2 = manager.getAbsoluteAddress(bundleContext, "/mycontext", "/myservice");
+        String address2 = manager.getAbsoluteAddress("/mycontext", "/myservice");
         assertEquals("http://" + localIp + ":8181/mycontext/myservice", address2);
 
         c.verify();

Modified: cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtilsTest.java
URL: http://svn.apache.org/viewvc/cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtilsTest.java?rev=1501407&r1=1501406&r2=1501407&view=diff
==============================================================================
--- cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtilsTest.java
(original)
+++ cxf/dosgi/trunk/dsw/cxf-dsw/src/test/java/org/apache/cxf/dosgi/dsw/handlers/JaxRSUtilsTest.java
Tue Jul  9 17:56:36 2013
@@ -46,7 +46,7 @@ public class JaxRSUtilsTest extends Test
         addRequiredProps(props);
         props.put(Constants.RS_PROVIDER_GLOBAL_PROP_KEY, "false");
 
-        assertEquals(0, JaxRSUtils.getProviders(null, null, props).size());
+        assertEquals(0, JaxRSUtils.getProviders(null, props).size());
     }
 
     public void testAegisProvider() {
@@ -56,7 +56,7 @@ public class JaxRSUtilsTest extends Test
 
         addRequiredProps(props);
 
-        List<Object> providers = JaxRSUtils.getProviders(null, null, props);
+        List<Object> providers = JaxRSUtils.getProviders(null, props);
         assertEquals(1, providers.size());
         assertEquals(AegisElementProvider.class.getName(), providers.get(0).getClass().getName());
     }
@@ -70,7 +70,7 @@ public class JaxRSUtilsTest extends Test
         props.put(Constants.RS_PROVIDER_GLOBAL_PROP_KEY, "false");
         addRequiredProps(props);
 
-        List<Object> providers = JaxRSUtils.getProviders(null, null, props);
+        List<Object> providers = JaxRSUtils.getProviders(null, props);
         assertEquals(1, providers.size());
         assertEquals(AegisElementProvider.class.getName(), providers.get(0).getClass().getName());
     }
@@ -94,7 +94,7 @@ public class JaxRSUtilsTest extends Test
         props.put(Constants.RS_PROVIDER_GLOBAL_PROP_KEY, "false");
         addRequiredProps(props);
 
-        List<Object> providers = JaxRSUtils.getProviders(bc, null, props);
+        List<Object> providers = JaxRSUtils.getProviders(bc, props);
         assertEquals(2, providers.size());
         assertEquals(AegisElementProvider.class.getName(), providers.get(0).getClass().getName());
         assertEquals(JAXBElementProvider.class.getName(), providers.get(1).getClass().getName());
@@ -120,7 +120,7 @@ public class JaxRSUtilsTest extends Test
         props.put(Constants.RS_PROVIDER_GLOBAL_PROP_KEY, "false");
         addRequiredProps(props);
 
-        List<Object> providers = JaxRSUtils.getProviders(bc, null, props);
+        List<Object> providers = JaxRSUtils.getProviders(bc, props);
         assertEquals(2, providers.size());
         assertEquals(AegisElementProvider.class.getName(), providers.get(0).getClass().getName());
         assertEquals(JAXBElementProvider.class.getName(), providers.get(1).getClass().getName());
@@ -141,7 +141,7 @@ public class JaxRSUtilsTest extends Test
         Map<String, Object> props = new HashMap<String, Object>();
         addRequiredProps(props);
 
-        List<Object> providers = JaxRSUtils.getProviders(bc, null, props);
+        List<Object> providers = JaxRSUtils.getProviders(bc, props);
         assertEquals(1, providers.size());
         assertSame(p, providers.get(0));
     }
@@ -162,7 +162,7 @@ public class JaxRSUtilsTest extends Test
         props.put(Constants.RS_PROVIDER_EXPECTED_PROP_KEY, "true");
         addRequiredProps(props);
 
-        List<Object> providers = JaxRSUtils.getProviders(bc, null, props);
+        List<Object> providers = JaxRSUtils.getProviders(bc, props);
         assertEquals(0, providers.size());
     }
 
@@ -182,7 +182,7 @@ public class JaxRSUtilsTest extends Test
         props.put(Constants.RS_PROVIDER_EXPECTED_PROP_KEY, "true");
         addRequiredProps(props);
 
-        List<Object> providers = JaxRSUtils.getProviders(bc, null, props);
+        List<Object> providers = JaxRSUtils.getProviders(bc, props);
         assertEquals(1, providers.size());
         assertSame(p, providers.get(0));
     }



Mime
View raw message