Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 1d5577f2a -> 871df8c66


More FindBugs work


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

Branch: refs/heads/3.1.x-fixes
Commit: 871df8c66dbab4adc1c50f966df21996f5bde6e2
Parents: 1d5577f
Author: Colm O hEigeartaigh <cohei...@apache.org>
Authored: Thu Dec 1 12:10:56 2016 +0000
Committer: Colm O hEigeartaigh <cohei...@apache.org>
Committed: Thu Dec 1 12:11:20 2016 +0000

----------------------------------------------------------------------
 .../main/java/org/apache/cxf/ext/logging/osgi/Activator.java  | 2 +-
 .../java/org/apache/cxf/jaxrs/impl/ConfigurationImpl.java     | 7 ++++---
 .../org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java    | 2 +-
 .../main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java   | 4 ++--
 .../org/apache/cxf/jaxrs/provider/JAXBElementProvider.java    | 2 +-
 .../cxf/jaxrs/security/KerberosAuthenticationFilter.java      | 2 +-
 .../src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java   | 2 +-
 .../src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java   | 2 +-
 .../org/apache/cxf/jaxws/context/WrappedMessageContext.java   | 1 -
 .../handler/logical/LogicalHandlerFaultOutInterceptor.java    | 2 +-
 .../jaxws/handler/logical/LogicalHandlerOutInterceptor.java   | 2 +-
 .../transport/http_jaxws_spi/HttpServletRequestAdapter.java   | 6 +++---
 .../transport/http_jaxws_spi/HttpServletResponseAdapter.java  | 2 +-
 .../org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java | 4 ++--
 .../org/apache/cxf/endpoint/dynamic/TypeClassInitializer.java | 2 +-
 15 files changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/871df8c6/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/osgi/Activator.java
----------------------------------------------------------------------
diff --git 
a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/osgi/Activator.java
 
b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/osgi/Activator.java
index 814de9a..815f7b9 100644
--- 
a/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/osgi/Activator.java
+++ 
b/rt/features/logging/src/main/java/org/apache/cxf/ext/logging/osgi/Activator.java
@@ -49,7 +49,7 @@ public class Activator implements BundleActivator {
 
     }
     
-    private final class ConfigUpdater implements ManagedService {
+    private static final class ConfigUpdater implements ManagedService {
         private BundleContext bundleContext;
         private ServiceRegistration serviceReg;
         private ServiceRegistration intentReg;

http://git-wip-us.apache.org/repos/asf/cxf/blob/871df8c6/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ConfigurationImpl.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ConfigurationImpl.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ConfigurationImpl.java
index f1dfdce..c412dde 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ConfigurationImpl.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ConfigurationImpl.java
@@ -24,6 +24,7 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.Map.Entry;
 import java.util.Set;
 import java.util.logging.Logger;
 
@@ -194,9 +195,9 @@ public class ConfigurationImpl implements Configuration {
             metadata = new HashMap<Class<?>, Integer>();
             providers.put(provider, metadata);
         }
-        for (Class<?> contract : contracts.keySet()) {
-            if (contract.isAssignableFrom(provider.getClass())) {
-                metadata.put(contract, contracts.get(contract));
+        for (Entry<Class<?>, Integer> entry : contracts.entrySet()) {
+            if (entry.getKey().isAssignableFrom(provider.getClass())) {
+                metadata.put(entry.getKey(), entry.getValue());
             }
         }
         return true;

http://git-wip-us.apache.org/repos/asf/cxf/blob/871df8c6/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java
index 601edb8..64b7a15 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java
@@ -179,7 +179,7 @@ public class NewCookieHeaderProvider implements 
HeaderDelegate<NewCookie> {
         if (0 == len) {
             return true;
         }
-        if ('"' == value.charAt(0) & '"' == value.charAt(len - 1)) {
+        if ('"' == value.charAt(0) && '"' == value.charAt(len - 1)) {
             // already wrapped with quotes
             return false;         
         } 

http://git-wip-us.apache.org/repos/asf/cxf/blob/871df8c6/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
index b18eac3..624a1e7 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriBuilderImpl.java
@@ -913,7 +913,7 @@ public class UriBuilderImpl extends UriBuilder implements 
Cloneable {
                 if (index != -1) {
                     String[] schemePair = uri.substring(0, index).split(":");
                     this.host = schemePair[0];
-                    this.port = schemePair.length == 2 ? 
Integer.valueOf(schemePair[1]) : -1;
+                    this.port = schemePair.length == 2 ? 
Integer.parseInt(schemePair[1]) : -1;
                     
                 }
                 uri = uri.substring(index);
@@ -1016,7 +1016,7 @@ public class UriBuilderImpl extends UriBuilder implements 
Cloneable {
         return map;
     }
     
-    private class UriParts {
+    private static class UriParts {
         String path;
         String query;
         String fragment;

http://git-wip-us.apache.org/repos/asf/cxf/blob/871df8c6/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JAXBElementProvider.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JAXBElementProvider.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JAXBElementProvider.java
index a2593cf..c331492 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JAXBElementProvider.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/JAXBElementProvider.java
@@ -521,7 +521,7 @@ public class JAXBElementProvider<T> extends 
AbstractJAXBProvider<T>  {
         Collection<Attachment> attachments = getAttachments(true);
         if (attachments != null) {
             Object value = 
getContext().getContextualProperty(Message.MTOM_THRESHOLD);
-            Integer threshold = value != null ? 
Integer.valueOf(value.toString()) : 0;
+            Integer threshold = value != null ? 
Integer.valueOf(value.toString()) : Integer.valueOf(0);
             ms.setAttachmentMarshaller(new JAXBAttachmentMarshaller(
                 attachments, threshold));
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/871df8c6/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/KerberosAuthenticationFilter.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/KerberosAuthenticationFilter.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/KerberosAuthenticationFilter.java
index b5994d6..455083c 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/KerberosAuthenticationFilter.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/KerberosAuthenticationFilter.java
@@ -203,7 +203,7 @@ public class KerberosAuthenticationFilter implements 
ContainerRequestFilter {
         this.callbackHandler = callbackHandler;
     }
 
-    private final class ValidateServiceTicketAction implements 
PrivilegedExceptionAction<byte[]> {
+    private static final class ValidateServiceTicketAction implements 
PrivilegedExceptionAction<byte[]> {
         private final GSSContext context;
         private final byte[] token;
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/871df8c6/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
index d38255b..778770b 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
@@ -264,7 +264,7 @@ public final class FormUtils {
             return;
         }
         try {
-            int maxPartsCount = Integer.valueOf(maxPartsCountProp);
+            int maxPartsCount = Integer.parseInt(maxPartsCountProp);
             if (maxPartsCount != -1 && numberOfParts >= maxPartsCount) {
                 throw new WebApplicationException(413);
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/871df8c6/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java
index 1aa2f6b..321d5c5 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java
@@ -305,7 +305,7 @@ public final class HttpUtils {
             return -1;
         }
         try {
-            int len = Integer.valueOf(value);
+            int len = Integer.parseInt(value);
             return len >= 0 ? len : -1;
         } catch (Exception ex) {
             return -1;

http://git-wip-us.apache.org/repos/asf/cxf/blob/871df8c6/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
index fa7cc77..a5db0e5 100644
--- 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
+++ 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/context/WrappedMessageContext.java
@@ -427,7 +427,6 @@ public class WrappedMessageContext implements 
MessageContext {
         }
         Object ret = null;
         if ((MessageContext.HTTP_RESPONSE_HEADERS.equals(key)
-            || MessageContext.HTTP_RESPONSE_CODE.equals(key)
             || MessageContext.HTTP_RESPONSE_CODE.equals(key))
             && !isResponse() && !isRequestor()) { 
             Message tmp = createResponseMessage();

http://git-wip-us.apache.org/repos/asf/cxf/blob/871df8c6/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultOutInterceptor.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultOutInterceptor.java
 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultOutInterceptor.java
index bc7af9b..d8498b0 100644
--- 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultOutInterceptor.java
+++ 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerFaultOutInterceptor.java
@@ -83,7 +83,7 @@ public class LogicalHandlerFaultOutInterceptor
     }
     
     
-    private class LogicalHandlerFaultOutEndingInterceptor 
+    private static class LogicalHandlerFaultOutEndingInterceptor 
         extends AbstractJAXWSHandlerInterceptor<Message> {
     
         LogicalHandlerFaultOutEndingInterceptor(Binding binding) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/871df8c6/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerOutInterceptor.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerOutInterceptor.java
 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerOutInterceptor.java
index 289a1e1..696eb75 100644
--- 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerOutInterceptor.java
+++ 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/handler/logical/LogicalHandlerOutInterceptor.java
@@ -100,7 +100,7 @@ public class LogicalHandlerOutInterceptor
         }
     }
     
-    private class LogicalHandlerOutEndingInterceptor 
+    private static class LogicalHandlerOutEndingInterceptor 
         extends AbstractJAXWSHandlerInterceptor<Message> {
     
         LogicalHandlerOutEndingInterceptor(Binding binding) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/871df8c6/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletRequestAdapter.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletRequestAdapter.java
 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletRequestAdapter.java
index 6ffcd71..228a71a 100644
--- 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletRequestAdapter.java
+++ 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletRequestAdapter.java
@@ -272,7 +272,7 @@ class HttpServletRequestAdapter implements 
HttpServletRequest {
 
     public long getDateHeader(String name) {
         String s = this.getHeader(name);
-        return s != null ? Long.valueOf(s) : 0;
+        return s != null ? Long.parseLong(s) : 0;
     }
 
     public String getHeader(String name) {
@@ -290,7 +290,7 @@ class HttpServletRequestAdapter implements 
HttpServletRequest {
 
     public int getIntHeader(String name) {
         String s = this.getHeader(name);
-        return s != null ? Integer.valueOf(s) : 0;
+        return s != null ? Integer.parseInt(s) : 0;
     }
 
     public String getMethod() {
@@ -398,7 +398,7 @@ class HttpServletRequestAdapter implements 
HttpServletRequest {
         throw new UnsupportedOperationException();
     }
     
-    private class ServletInputStreamAdapter extends ServletInputStream {
+    private static class ServletInputStreamAdapter extends ServletInputStream {
         
         private InputStream delegate;
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/871df8c6/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletResponseAdapter.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletResponseAdapter.java
 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletResponseAdapter.java
index c4dd62f..a8cf176 100644
--- 
a/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletResponseAdapter.java
+++ 
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/transport/http_jaxws_spi/HttpServletResponseAdapter.java
@@ -224,7 +224,7 @@ class HttpServletResponseAdapter implements 
HttpServletResponse {
         this.setStatus(sc);
     }
 
-    private class ServletOutputStreamAdapter extends ServletOutputStream {
+    private static class ServletOutputStreamAdapter extends 
ServletOutputStream {
 
         private OutputStream delegate;
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/871df8c6/rt/frontend/simple/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/simple/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
 
b/rt/frontend/simple/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
index 768d8d9..2def391 100644
--- 
a/rt/frontend/simple/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
+++ 
b/rt/frontend/simple/src/main/java/org/apache/cxf/endpoint/dynamic/DynamicClientFactory.java
@@ -713,7 +713,7 @@ public class DynamicClientFactory {
         }
     }
 
-    class InnerErrorListener {
+    static class InnerErrorListener {
 
         private String url;
         private StringBuilder errors = new StringBuilder();
@@ -998,7 +998,7 @@ public class DynamicClientFactory {
         }
         return clone;
     }
-    public class LocationFilterReader extends StreamReaderDelegate {
+    public static class LocationFilterReader extends StreamReaderDelegate {
         boolean isImport;
         boolean isInclude;
         int locIdx = -1;

http://git-wip-us.apache.org/repos/asf/cxf/blob/871df8c6/rt/frontend/simple/src/main/java/org/apache/cxf/endpoint/dynamic/TypeClassInitializer.java
----------------------------------------------------------------------
diff --git 
a/rt/frontend/simple/src/main/java/org/apache/cxf/endpoint/dynamic/TypeClassInitializer.java
 
b/rt/frontend/simple/src/main/java/org/apache/cxf/endpoint/dynamic/TypeClassInitializer.java
index 9d75953..9ba7563 100644
--- 
a/rt/frontend/simple/src/main/java/org/apache/cxf/endpoint/dynamic/TypeClassInitializer.java
+++ 
b/rt/frontend/simple/src/main/java/org/apache/cxf/endpoint/dynamic/TypeClassInitializer.java
@@ -183,7 +183,7 @@ public class TypeClassInitializer extends 
ServiceModelVisitor {
     }
 
     
-    private class ExceptionCreator extends ASMHelper {
+    private static class ExceptionCreator extends ASMHelper {
         public Class<?> createExceptionClass(Class<?> bean) {
             String newClassName = bean.getName() + "_Exception";
             newClassName = newClassName.replaceAll("\\$", ".");

Reply via email to