cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject cxf-dosgi git commit: [DOSGI-229] Fix checkstyle warnings
Date Fri, 26 Feb 2016 17:28:12 GMT
Repository: cxf-dosgi
Updated Branches:
  refs/heads/master a93346ed7 -> 481f75772


[DOSGI-229] Fix checkstyle warnings


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

Branch: refs/heads/master
Commit: 481f75772cb8faa7a7482eca6deea746356a7dee
Parents: a93346e
Author: Christian Schneider <chris@die-schneider.net>
Authored: Fri Feb 26 18:27:59 2016 +0100
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Fri Feb 26 18:27:59 2016 +0100

----------------------------------------------------------------------
 .../cxf/dosgi/dsw/decorator/ServiceDecorator.java   |  2 +-
 .../dosgi/dsw/decorator/ServiceDecoratorImpl.java   |  2 +-
 .../cxf/dosgi/dsw/handlers/HttpServiceManager.java  | 16 ++++++++--------
 .../dsw/handlers/SecurityDelegatingHttpContext.java |  3 +++
 .../org/apache/cxf/dosgi/dsw/qos/IntentTracker.java |  2 ++
 .../cxf/dosgi/dsw/service/EventAdminHelper.java     |  3 +++
 .../cxf/dosgi/dsw/service/ExportReferenceImpl.java  |  1 +
 .../dosgi/dsw/service/ExportRegistrationImpl.java   |  1 +
 .../dosgi/dsw/service/ImportRegistrationImpl.java   |  1 +
 9 files changed, 21 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/481f7577/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecorator.java
----------------------------------------------------------------------
diff --git a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecorator.java
b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecorator.java
index 07a0b85..203bd1c 100644
--- a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecorator.java
+++ b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecorator.java
@@ -24,5 +24,5 @@ import org.osgi.framework.ServiceReference;
 
 public interface ServiceDecorator {
 
-    void decorate(ServiceReference sref, Map<String, Object> properties);
+    void decorate(ServiceReference<?> sref, Map<String, Object> properties);
 }

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/481f7577/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImpl.java
----------------------------------------------------------------------
diff --git a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImpl.java
b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImpl.java
index b67c1d6..cc8a2dc 100644
--- a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImpl.java
+++ b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/decorator/ServiceDecoratorImpl.java
@@ -42,7 +42,7 @@ public class ServiceDecoratorImpl implements ServiceDecorator {
         parser = new DecorationParser();
     }
     
-    public void decorate(ServiceReference sref, Map<String, Object> target) {
+    public void decorate(ServiceReference<?> sref, Map<String, Object> target)
{
         for (Rule matcher : decorations) {
             matcher.apply(sref, target);
         }

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/481f7577/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java
----------------------------------------------------------------------
diff --git a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java
b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java
index 0d94d76..77de3de 100644
--- a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java
+++ b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/HttpServiceManager.java
@@ -44,7 +44,7 @@ public class HttpServiceManager {
 
     private static final Logger LOG = LoggerFactory.getLogger(HttpServiceManager.class);
     private static final long SERVICE_LOOKUP_TIMEOUT = 10000;
-    private ServiceTracker tracker;
+    private ServiceTracker<HttpService, HttpService> tracker;
     private BundleContext bundleContext;
     private Map<Long, String> exportedAliases = Collections.synchronizedMap(new HashMap<Long,
String>());
     private String httpBase;
@@ -52,14 +52,14 @@ public class HttpServiceManager {
 
     public HttpServiceManager(BundleContext bundleContext, String httpBase, String cxfServletAlias)
{
         this(bundleContext, httpBase, cxfServletAlias,
-             new ServiceTracker(bundleContext, HttpService.class.getName(), null));
+             new ServiceTracker<HttpService, HttpService>(bundleContext, HttpService.class,
null));
         this.tracker.open();
     }
 
     // Only for tests
     public HttpServiceManager(BundleContext bundleContext,
                               String httpBase, String cxfServletAlias,
-                              ServiceTracker tracker) {
+                              ServiceTracker<HttpService, HttpService> tracker) {
         this.bundleContext = bundleContext;
         this.tracker = tracker;
         this.httpBase = getWithDefault(httpBase, "http://" + LocalHostUtil.getLocalIp() +
":8181");
@@ -71,7 +71,7 @@ public class HttpServiceManager {
     }
 
     public Bus registerServlet(Bus bus, String contextRoot, BundleContext callingContext,
-            ServiceReference sref) {
+            ServiceReference<?> sref) {
         bus.setExtension(new DestinationRegistryImpl(), DestinationRegistry.class);
         CXFNonSpringServlet cxf = new CXFNonSpringServlet();
         cxf.setBus(bus);
@@ -89,7 +89,7 @@ public class HttpServiceManager {
     }
 
     protected HttpService getHttpService() {
-        Object service = null;
+        HttpService service = null;
         try {
             service = tracker.waitForService(SERVICE_LOOKUP_TIMEOUT);
         } catch (InterruptedException ex) {
@@ -98,7 +98,7 @@ public class HttpServiceManager {
         if (service == null) {
             throw new RuntimeException("No HTTPService found");
         }
-        return (HttpService) service;
+        return service;
     }
 
     private HttpContext getHttpContext(BundleContext bc, HttpService httpService) {
@@ -113,7 +113,7 @@ public class HttpServiceManager {
      * @param sref the service reference to track
      * @param alias the HTTP servlet context alias
      */
-    private void registerUnexportHook(ServiceReference sref, String alias) {
+    private void registerUnexportHook(ServiceReference<?> sref, String alias) {
         final Long sid = (Long) sref.getProperty(org.osgi.framework.Constants.SERVICE_ID);
         LOG.debug("Registering service listener for service with ID {}", sid);
 
@@ -156,7 +156,7 @@ public class HttpServiceManager {
             if (!(event.getType() == ServiceEvent.UNREGISTERING)) {
                 return;
             }
-            final ServiceReference sref = event.getServiceReference();
+            final ServiceReference<?> sref = event.getServiceReference();
             final Long sid = (Long) sref.getProperty(org.osgi.framework.Constants.SERVICE_ID);
             final String alias = exportedAliases.remove(sid);
             if (alias == null) {

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/481f7577/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/SecurityDelegatingHttpContext.java
----------------------------------------------------------------------
diff --git a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/SecurityDelegatingHttpContext.java
b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/SecurityDelegatingHttpContext.java
index a9c12ef..7e9710b 100644
--- a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/SecurityDelegatingHttpContext.java
+++ b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/handlers/SecurityDelegatingHttpContext.java
@@ -72,6 +72,9 @@ public class SecurityDelegatingHttpContext implements HttpContext {
         return delegate.getResource(name);
     }
 
+    @SuppressWarnings({
+     "unchecked", "rawtypes"
+    })
     public boolean handleSecurity(HttpServletRequest request, HttpServletResponse response)
throws IOException {
         ServiceReference[] refs;
         try {

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/481f7577/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentTracker.java
----------------------------------------------------------------------
diff --git a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentTracker.java b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentTracker.java
index 4cae464..e1ceaaa 100644
--- a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentTracker.java
+++ b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/qos/IntentTracker.java
@@ -25,10 +25,12 @@ import org.osgi.framework.InvalidSyntaxException;
 import org.osgi.framework.ServiceReference;
 import org.osgi.util.tracker.ServiceTracker;
 
+@SuppressWarnings({"rawtypes", "unchecked"})
 public class IntentTracker extends ServiceTracker {
 
     private final IntentMap intentMap;
 
+    
     public IntentTracker(BundleContext context, IntentMap intentMap) {
         super(context, getFilter(context), null);
         this.intentMap = intentMap;

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/481f7577/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventAdminHelper.java
----------------------------------------------------------------------
diff --git a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventAdminHelper.java
b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventAdminHelper.java
index 133d3c7..ed89389 100644
--- a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventAdminHelper.java
+++ b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/EventAdminHelper.java
@@ -86,6 +86,9 @@ public class EventAdminHelper {
         notifyEventAdmins(topic, event);
     }
 
+    @SuppressWarnings({
+     "rawtypes", "unchecked"
+    })
     private void notifyEventAdmins(String topic, Event event) {
         ServiceReference[] refs = null;
         try {

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/481f7577/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportReferenceImpl.java
----------------------------------------------------------------------
diff --git a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportReferenceImpl.java
b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportReferenceImpl.java
index fcfc289..497aa9c 100644
--- a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportReferenceImpl.java
+++ b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportReferenceImpl.java
@@ -22,6 +22,7 @@ import org.osgi.framework.ServiceReference;
 import org.osgi.service.remoteserviceadmin.EndpointDescription;
 import org.osgi.service.remoteserviceadmin.ExportReference;
 
+@SuppressWarnings("rawtypes")
 public class ExportReferenceImpl implements ExportReference {
 
     private ServiceReference serviceReference;

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/481f7577/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java
----------------------------------------------------------------------
diff --git a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java
b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java
index 59a9b11..d6e5774 100644
--- a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java
+++ b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ExportRegistrationImpl.java
@@ -31,6 +31,7 @@ import org.osgi.service.remoteserviceadmin.ExportRegistration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+@SuppressWarnings("rawtypes")
 public class ExportRegistrationImpl implements ExportRegistration {
 
     private static final Logger LOG = LoggerFactory.getLogger(ExportRegistrationImpl.class);

http://git-wip-us.apache.org/repos/asf/cxf-dosgi/blob/481f7577/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImpl.java
----------------------------------------------------------------------
diff --git a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImpl.java
b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImpl.java
index 0edde9f..2b896db 100644
--- a/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImpl.java
+++ b/dsw/cxf-dsw/src/main/java/org/apache/cxf/dosgi/dsw/service/ImportRegistrationImpl.java
@@ -29,6 +29,7 @@ import org.osgi.service.remoteserviceadmin.ImportRegistration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+@SuppressWarnings("rawtypes")
 public class ImportRegistrationImpl implements ImportRegistration, ImportReference {
 
     private static final Logger LOG = LoggerFactory.getLogger(ImportRegistrationImpl.class);


Mime
View raw message