cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: Some minor FindBugs stuff
Date Wed, 30 Nov 2016 15:26:44 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes f8169bd4e -> c03fc81a7


Some minor FindBugs stuff


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

Branch: refs/heads/3.1.x-fixes
Commit: c03fc81a7eda02a228ac2b041b7df6fb70cc785b
Parents: f8169bd
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed Nov 30 15:24:37 2016 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed Nov 30 15:26:39 2016 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/binding/soap/Soap11.java     | 34 +++++++++---------
 .../org/apache/cxf/binding/soap/Soap12.java     | 36 +++++++++-----------
 .../interceptor/MustUnderstandInterceptor.java  |  4 +--
 .../soap/jms/interceptor/SoapFaultFactory.java  |  3 +-
 ...AbstractRequestAssertionConsumerHandler.java |  4 ++-
 5 files changed, 39 insertions(+), 42 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c03fc81a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Soap11.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Soap11.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Soap11.java
index 8985b64..10ee250 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Soap11.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Soap11.java
@@ -22,7 +22,7 @@ package org.apache.cxf.binding.soap;
 import javax.xml.namespace.QName;
 
 /**
- * Singleton object that represents the SOAP 1.1 version.
+ * Singleton object that represents the SOAP 1.1 VERSION.
  * 
  */
 public final class Soap11 implements SoapVersion {
@@ -45,25 +45,23 @@ public final class Soap11 implements SoapVersion {
 
     private static final Soap11 INSTANCE = new Soap11();
 
-    private final double version = 1.1;
+    private static final double VERSION = 1.1;
 
-    private final String namespace = SOAP_NAMESPACE;
+    private static final String NONE_ROLE = SOAP_NAMESPACE + "/role/none";
 
-    private final String noneRole = namespace + "/role/none";
-
-    private final String ultimateReceiverRole = namespace + "/role/ultimateReceiver";
+    private static final String ULTIMATE_RECEIVER_ROLE = SOAP_NAMESPACE + "/role/ultimateReceiver";
     
-    private final String nextRole = "http://schemas.xmlsoap.org/soap/actor/next";
+    private static final String NEXT_ROLE = "http://schemas.xmlsoap.org/soap/actor/next";
 
-    private final String soapEncodingStyle = SOAP_ENCODING_URI;
+    private static final String SOAP_ENCODING_STYLE = SOAP_ENCODING_URI;
 
-    private final QName envelope = new QName(namespace, "Envelope");
+    private final QName envelope = new QName(SOAP_NAMESPACE, "Envelope");
 
-    private final QName header = new QName(namespace, "Header");
+    private final QName header = new QName(SOAP_NAMESPACE, "Header");
 
-    private final QName body = new QName(namespace, "Body");
+    private final QName body = new QName(SOAP_NAMESPACE, "Body");
 
-    private final QName fault = new QName(namespace, "Fault");      
+    private final QName fault = new QName(SOAP_NAMESPACE, "Fault");      
 
     private Soap11() {
         // Singleton 
@@ -79,11 +77,11 @@ public final class Soap11 implements SoapVersion {
     }
 
     public double getVersion() {
-        return version;
+        return VERSION;
     }
 
     public String getNamespace() {
-        return namespace;
+        return SOAP_NAMESPACE;
     }
 
     public QName getEnvelope() {
@@ -103,21 +101,21 @@ public final class Soap11 implements SoapVersion {
     }
 
     public String getSoapEncodingStyle() {
-        return soapEncodingStyle;
+        return SOAP_ENCODING_STYLE;
     }
 
     // Role URIs
     // -------------------------------------------------------------------------
     public String getNoneRole() {
-        return noneRole;
+        return NONE_ROLE;
     }
 
     public String getUltimateReceiverRole() {
-        return ultimateReceiverRole;
+        return ULTIMATE_RECEIVER_ROLE;
     }
 
     public String getNextRole() {
-        return nextRole;
+        return NEXT_ROLE;
     }
 
     public String getAttrNameRole() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/c03fc81a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Soap12.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Soap12.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Soap12.java
index 4c65507..c57844c 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Soap12.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/Soap12.java
@@ -28,45 +28,43 @@ import javax.xml.namespace.QName;
 public final class Soap12 implements SoapVersion {
     public static final String SOAP_NAMESPACE = "http://www.w3.org/2003/05/soap-envelope";
     
-    private static Soap12 instance = new Soap12();
+    private static final Soap12 INSTANCE = new Soap12();
 
-    private final double version = 1.2;
+    private static final double VERSION = 1.2;
 
-    private final String namespace = SOAP_NAMESPACE;
+    private static final String NONE_ROLE = SOAP_NAMESPACE + "/role/none";
 
-    private final String noneRole = namespace + "/role/none";
+    private static final String ULTIMATE_RECEIVER_ROLE = SOAP_NAMESPACE + "/role/ultimateReceiver";
 
-    private final String ultimateReceiverRole = namespace + "/role/ultimateReceiver";
+    private static final String NEXT_ROLE = SOAP_NAMESPACE + "/role/next";
 
-    private final String nextRole = namespace + "/role/next";
+    private static final String SOAP_ENCODING_STYLE = "http://www.w3.org/2003/05/soap-encoding";
 
-    private final String soapEncodingStyle = "http://www.w3.org/2003/05/soap-encoding";
+    private final QName envelope = new QName(SOAP_NAMESPACE, "Envelope");
 
-    private final QName envelope = new QName(namespace, "Envelope");
+    private final QName header = new QName(SOAP_NAMESPACE, "Header");
 
-    private final QName header = new QName(namespace, "Header");
+    private final QName body = new QName(SOAP_NAMESPACE, "Body");
 
-    private final QName body = new QName(namespace, "Body");
-
-    private final QName fault = new QName(namespace, "Fault");
+    private final QName fault = new QName(SOAP_NAMESPACE, "Fault");
 
     private Soap12() {
        // Singleton 
     }
     
     public static Soap12 getInstance() {
-        return instance;
+        return INSTANCE;
     }
     public String getBindingId() {
         return SoapBindingConstants.SOAP12_BINDING_ID;
     }
 
     public double getVersion() {
-        return version;
+        return VERSION;
     }
 
     public String getNamespace() {
-        return namespace;
+        return SOAP_NAMESPACE;
     }
 
     public QName getEnvelope() {
@@ -86,21 +84,21 @@ public final class Soap12 implements SoapVersion {
     }
     
     public String getSoapEncodingStyle() {
-        return soapEncodingStyle;
+        return SOAP_ENCODING_STYLE;
     }
 
     // Role URIs
     // -------------------------------------------------------------------------
     public String getNoneRole() {
-        return noneRole;
+        return NONE_ROLE;
     }
 
     public String getUltimateReceiverRole() {
-        return ultimateReceiverRole;
+        return ULTIMATE_RECEIVER_ROLE;
     }
 
     public String getNextRole() {
-        return nextRole;
+        return NEXT_ROLE;
     }
     
     public String getAttrNameRole() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/c03fc81a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MustUnderstandInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MustUnderstandInterceptor.java
b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MustUnderstandInterceptor.java
index 23d4048..64c3f75 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MustUnderstandInterceptor.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/MustUnderstandInterceptor.java
@@ -222,7 +222,7 @@ public class MustUnderstandInterceptor extends AbstractSoapInterceptor
{
     /**
      * 
      */
-    private class UltimateReceiverMustUnderstandInterceptor extends AbstractSoapInterceptor
{
+    private static class UltimateReceiverMustUnderstandInterceptor extends AbstractSoapInterceptor
{
         Set<QName> knownHeaders;
         UltimateReceiverMustUnderstandInterceptor(Set<QName> knownHeaders) {
             super(Phase.INVOKE);
@@ -256,7 +256,7 @@ public class MustUnderstandInterceptor extends AbstractSoapInterceptor
{
 
     }
     
-    public class MustUnderstandEndingInterceptor extends AbstractSoapInterceptor {
+    public static class MustUnderstandEndingInterceptor extends AbstractSoapInterceptor {
         public MustUnderstandEndingInterceptor() {
             super(Phase.PRE_LOGICAL);
             addAfter(OneWayProcessorInterceptor.class.getName());

http://git-wip-us.apache.org/repos/asf/cxf/blob/c03fc81a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/jms/interceptor/SoapFaultFactory.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/jms/interceptor/SoapFaultFactory.java
b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/jms/interceptor/SoapFaultFactory.java
index 7115468..61046ea 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/jms/interceptor/SoapFaultFactory.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/jms/interceptor/SoapFaultFactory.java
@@ -86,8 +86,7 @@ public class SoapFaultFactory  {
     }
     
     public String toString(Fault f) {
-        SoapFault sf = (SoapFault)f;
-        return sf.toString();
+        return f.toString();
     }
         
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/c03fc81a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractRequestAssertionConsumerHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractRequestAssertionConsumerHandler.java
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractRequestAssertionConsumerHandler.java
index 7486313..9c13637 100644
--- a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractRequestAssertionConsumerHandler.java
+++ b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/AbstractRequestAssertionConsumerHandler.java
@@ -294,7 +294,9 @@ public abstract class AbstractRequestAssertionConsumerHandler extends
AbstractSS
             throw new WebApplicationException(400);
         }
         
-        LOG.fine("Received response: " + DOM2Writer.nodeToString(responseDoc.getDocumentElement()));
+        if (LOG.isLoggable(Level.FINE)) {
+            LOG.fine("Received response: " + DOM2Writer.nodeToString(responseDoc.getDocumentElement()));
+        }
         
         XMLObject responseObject = null;
         try {


Mime
View raw message