cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/2] cxf git commit: Finished RT FindBugs sweep
Date Mon, 05 Dec 2016 11:41:29 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 2f3ba6e5c -> b9e0f788b


Finished RT FindBugs sweep


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

Branch: refs/heads/3.1.x-fixes
Commit: 9b3b93b64254409dcb538ce92556e2f0d3848a0f
Parents: 2f3ba6e
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Dec 5 10:53:07 2016 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Dec 5 11:41:22 2016 +0000

----------------------------------------------------------------------
 .../policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java | 2 +-
 .../main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java  | 4 ++--
 .../policy/interceptors/HttpsTokenInterceptorProvider.java       | 2 +-
 .../ws/security/policy/interceptors/STSTokenOutInterceptor.java  | 2 +-
 .../org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java     | 2 +-
 .../apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java    | 2 +-
 .../policyvalidators/AbstractSupportingTokenPolicyValidator.java | 2 --
 7 files changed, 7 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/9b3b93b6/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java
----------------------------------------------------------------------
diff --git a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java
b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java
index 2b96a23..2bff1ac 100644
--- a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java
+++ b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/attachment/wsdl11/Wsdl11AttachmentPolicyProvider.java
@@ -318,7 +318,7 @@ public class Wsdl11AttachmentPolicyProvider extends AbstractPolicyProvider
{
         return null;
     }
      
-    private class ExtensibleInfo implements Extensible {
+    private static class ExtensibleInfo implements Extensible {
         private List<ExtensibilityElement> extensors;
         ExtensibleInfo(List<ExtensibilityElement> e) {
             extensors = e;

http://git-wip-us.apache.org/repos/asf/cxf/blob/9b3b93b6/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java
index af682c3..8813beb 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/RMCaptureOutInterceptor.java
@@ -228,7 +228,7 @@ public class RMCaptureOutInterceptor extends AbstractRMInterceptor<Message>
 {
         message.getInterceptorChain().add(new CaptureEnd());
     }    
     
-    private class CaptureStart extends AbstractPhaseInterceptor<Message> {
+    private static class CaptureStart extends AbstractPhaseInterceptor<Message> {
         CaptureStart() {
             super(Phase.PRE_PROTOCOL);
         }
@@ -319,7 +319,7 @@ public class RMCaptureOutInterceptor extends AbstractRMInterceptor<Message>
 {
     private String getAddressingNamespace(AddressingProperties maps) {
         String wsaNamespace = maps.getNamespaceURI();
         if (wsaNamespace == null) {
-            getManager().getConfiguration().getAddressingNamespace();
+            return getManager().getConfiguration().getAddressingNamespace();
         }
         return wsaNamespace;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/9b3b93b6/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
index ebd0141..a89da9b 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/HttpsTokenInterceptorProvider.java
@@ -83,7 +83,7 @@ public class HttpsTokenInterceptorProvider extends AbstractPolicyInterceptorProv
         Map<String, List<String>> headers =
             CastUtils.cast((Map<?, ?>)message.get(Message.PROTOCOL_HEADERS));     
  
         if (null == headers) {
-            Collections.emptyMap();
+            return Collections.emptyMap();
         }
         return headers;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/9b3b93b6/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSTokenOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSTokenOutInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSTokenOutInterceptor.java
index f0683e0..ac71eac 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSTokenOutInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/STSTokenOutInterceptor.java
@@ -172,7 +172,7 @@ public class STSTokenOutInterceptor extends AbstractPhaseInterceptor<Message>
{
             props.put(SecurityConstants.USERNAME, authParams.getUserName());
         }
         props.put(SecurityConstants.CALLBACK_HANDLER, authParams.getCallbackHandler());
-        if ((authParams.getKeystoreProperties() != null) && (authParams.getKeystoreProperties()
!= null)) {
+        if (authParams.getKeystoreProperties() != null) {
             props.put(SecurityConstants.ENCRYPT_USERNAME, authParams.getAlias());
             props.put(SecurityConstants.ENCRYPT_PROPERTIES, authParams.getKeystoreProperties());
             props.put(SecurityConstants.SIGNATURE_PROPERTIES, authParams.getKeystoreProperties());

http://git-wip-us.apache.org/repos/asf/cxf/blob/9b3b93b6/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
index bd90c04..df783b6 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JInInterceptor.java
@@ -502,7 +502,7 @@ public class WSS4JInInterceptor extends AbstractWSS4JInterceptor {
         // advance just past body
         int evt = reader.next();
         
-        if (reader.hasNext() && (evt != XMLStreamConstants.END_ELEMENT || evt !=
XMLStreamConstants.START_ELEMENT)) {
+        if (reader.hasNext() && evt != XMLStreamConstants.END_ELEMENT) {
             reader.next();
         }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/9b3b93b6/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
index f701d4b..2295008 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
@@ -119,7 +119,7 @@ public class WSS4JStaxOutInterceptor extends AbstractWSS4JStaxInterceptor
{
         //must turn off mtom when using WS-Sec so binary is inlined so it can
         //be properly signed/encrypted/etc...
         String mtomKey = org.apache.cxf.message.Message.MTOM_ENABLED;
-        if (mc.get(mtomKey) == Boolean.TRUE) {
+        if (Boolean.TRUE.equals(mc.get(mtomKey))) {
             LOG.warning("MTOM will be disabled as the WSS4JOutInterceptor.mtomEnabled property"
                     + " is set to false");
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/9b3b93b6/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractSupportingTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractSupportingTokenPolicyValidator.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractSupportingTokenPolicyValidator.java
index b655fc3..3e79904 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractSupportingTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/AbstractSupportingTokenPolicyValidator.java
@@ -716,11 +716,9 @@ public abstract class AbstractSupportingTokenPolicyValidator extends
AbstractSec
             final XPathFactory factory = XPathFactory.newInstance();
             final XPath xpath = factory.newXPath();
             
-            List<String> expressions = new ArrayList<>();
             MapNamespaceContext namespaceContext = new MapNamespaceContext();
             
             for (org.apache.wss4j.policy.model.XPath xPath : xpaths) {
-                expressions.add(xPath.getXPath());
                 Map<String, String> namespaceMap = xPath.getPrefixNamespaceMap();
                 if (namespaceMap != null) {
                     namespaceContext.addNamespaces(namespaceMap);


Mime
View raw message