cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: Removing some unnecessary unchecked warnings
Date Mon, 20 Feb 2017 15:57:27 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 090fa6100 -> c0e79369f


Removing some unnecessary unchecked warnings


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

Branch: refs/heads/master
Commit: c0e79369faa3acbca703f9ae93d63da1bd216e5c
Parents: 090fa61
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Feb 20 15:57:11 2017 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Feb 20 15:57:11 2017 +0000

----------------------------------------------------------------------
 .../java/org/apache/cxf/transport/AbstractTransportFactory.java  | 4 +---
 .../java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java    | 3 +--
 .../org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java   | 2 +-
 .../main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java   | 3 +--
 4 files changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c0e79369/core/src/main/java/org/apache/cxf/transport/AbstractTransportFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/transport/AbstractTransportFactory.java b/core/src/main/java/org/apache/cxf/transport/AbstractTransportFactory.java
index 984b47d..ea7d407 100644
--- a/core/src/main/java/org/apache/cxf/transport/AbstractTransportFactory.java
+++ b/core/src/main/java/org/apache/cxf/transport/AbstractTransportFactory.java
@@ -22,8 +22,6 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Set;
 
-import org.apache.cxf.helpers.CastUtils;
-
 /**
  * Helper methods for {@link DestinationFactory}s and {@link ConduitInitiator}s.
  */
@@ -45,6 +43,6 @@ public abstract class AbstractTransportFactory {
     }
 
     public Set<String> getUriPrefixes() {
-        return CastUtils.cast(Collections.EMPTY_SET);
+        return Collections.emptySet();
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/c0e79369/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
index 67fbb3f..764580c 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/model/AbstractResourceInfo.java
@@ -257,10 +257,9 @@ public abstract class AbstractResourceInfo {
         }
     }
 
-    @SuppressWarnings("unchecked")
     public Map<Class<?>, Method> getContextMethods() {
         Map<Class<?>, Method> methods = contextMethods == null ? null : contextMethods.get(getServiceClass());
-        return methods == null ? Collections.EMPTY_MAP
+        return methods == null ? Collections.emptyMap()
                                       : Collections.unmodifiableMap(methods);
     }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/c0e79369/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
index a90ef65..8fb9040 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/servlet/CXFNonSpringJaxrsServlet.java
@@ -338,7 +338,7 @@ public class CXFNonSpringJaxrsServlet extends CXFNonSpringServlet {
     protected List<?> getProviders(ServletConfig servletConfig, String splitChar) throws
ServletException {
         String providersList = servletConfig.getInitParameter(PROVIDERS_PARAM);
         if (providersList == null) {
-            return Collections.EMPTY_LIST;
+            return Collections.emptyList();
         }
         String[] classNames = StringUtils.split(providersList, splitChar);
         List<Object> providers = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/cxf/blob/c0e79369/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
----------------------------------------------------------------------
diff --git a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
index fdb994e..04a112d 100644
--- a/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
+++ b/rt/rs/client/src/main/java/org/apache/cxf/jaxrs/client/ClientProxyImpl.java
@@ -486,10 +486,9 @@ public class ClientProxyImpl extends AbstractClient implements
         return m.getParameterAnnotations()[p.getIndex()];
     }
 
-    @SuppressWarnings("unchecked")
     private static List<Parameter> getParameters(MultivaluedMap<ParameterType, Parameter>
map,
                                            ParameterType key) {
-        return map.get(key) == null ? Collections.EMPTY_LIST : map.get(key);
+        return map.get(key) == null ? Collections.emptyList() : map.get(key);
     }
 
     private void handleQueries(Method m,


Mime
View raw message