cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [11/12] cxf git commit: Remove unecessary else's and static references in binding
Date Fri, 04 Aug 2017 16:07:34 GMT
Remove unecessary else's and static references in binding


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

Branch: refs/heads/master
Commit: 4bb53de95594c3438ed76dd67728c9d485f8d3c3
Parents: bb5f3b2
Author: Daniel Kulp <dkulp@apache.org>
Authored: Fri Aug 4 10:26:29 2017 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri Aug 4 10:40:44 2017 -0400

----------------------------------------------------------------------
 .../org/apache/cxf/binding/coloc/ColocUtil.java |   3 +-
 .../interceptors/CorbaStreamInInterceptor.java  |   3 +-
 .../CorbaStreamOutEndingInterceptor.java        |   3 +-
 .../corba/runtime/CorbaStreamReader.java        |  14 +-
 .../types/AbstractStartEndEventProducer.java    |   4 +-
 .../corba/types/CorbaAnyEventProducer.java      |   7 +-
 .../corba/types/CorbaEnumEventProducer.java     |   4 +-
 .../corba/types/CorbaFixedEventProducer.java    |   4 +-
 .../CorbaObjectReferenceEventProducer.java      |  23 ++-
 .../types/CorbaOctetSequenceEventProducer.java  |   8 +-
 .../types/CorbaPrimitiveTypeEventProducer.java  |   4 +-
 .../corba/types/CorbaStructListener.java        |  17 +--
 .../corba/utils/CorbaObjectReferenceHelper.java |   9 +-
 .../cxf/binding/corba/utils/CorbaUtils.java     | 147 +++++++++----------
 .../binding/soap/SoapBindingConfiguration.java  |   3 +-
 .../interceptor/AbstractSoapInterceptor.java    |   6 +-
 .../soap/interceptor/CheckFaultInterceptor.java |   5 +-
 .../soap/interceptor/RPCInInterceptor.java      |   6 +-
 .../soap/interceptor/RPCOutInterceptor.java     |   2 +-
 .../interceptor/ReadHeadersInterceptor.java     |   8 +-
 .../interceptor/Soap11FaultInInterceptor.java   |   3 +-
 .../interceptor/Soap12FaultOutInterceptor.java  |   3 +-
 .../soap/interceptor/StartBodyInterceptor.java  |   5 +-
 .../cxf/binding/soap/model/SoapBindingInfo.java |   3 +-
 .../binding/soap/saaj/SAAJOutInterceptor.java   |   5 +-
 .../cxf/binding/soap/saaj/SAAJStreamWriter.java |   5 +-
 .../binding/soap/SoapOutInterceptorTest.java    |   9 +-
 .../cxf/binding/soap/saaj/ParseBodyTest.java    |   3 +-
 .../interceptor/XMLMessageInInterceptor.java    |  13 +-
 29 files changed, 159 insertions(+), 170 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocUtil.java
----------------------------------------------------------------------
diff --git a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocUtil.java b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocUtil.java
index a764bd1..4f12c71 100644
--- a/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocUtil.java
+++ b/rt/bindings/coloc/src/main/java/org/apache/cxf/binding/coloc/ColocUtil.java
@@ -299,8 +299,7 @@ public final class ColocUtil {
         OperationInfo oi = message.getExchange().getBindingOperationInfo().getOperationInfo();
         if (MessageUtils.isOutbound(message)) {
             return oi.getOutput();
-        } else {
-            return oi.getInput();
         }
+        return oi.getInput();
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamInInterceptor.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamInInterceptor.java
index f5a24db..a9b7818 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamInInterceptor.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamInInterceptor.java
@@ -336,8 +336,7 @@ public class CorbaStreamInInterceptor extends AbstractPhaseInterceptor<Message>
         MessagePartInfo part = msgInfo.getMessageParts().get(0);
         if (part.isElement()) {
             return part.getElementQName().getNamespaceURI();
-        } else {
-            return part.getName().getNamespaceURI();
         }
+        return part.getName().getNamespaceURI();
     }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamOutEndingInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamOutEndingInterceptor.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamOutEndingInterceptor.java
index 0de7dc0..2493b70 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamOutEndingInterceptor.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/interceptors/CorbaStreamOutEndingInterceptor.java
@@ -227,9 +227,8 @@ public class CorbaStreamOutEndingInterceptor extends AbstractPhaseInterceptor<Me
         MessagePartInfo part = msgInfo.getMessageParts().get(0);
         if (part.isElement()) {
             return part.getElementQName().getNamespaceURI();
-        } else {
-            return part.getName().getNamespaceURI();
         }
+        return part.getName().getNamespaceURI();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaStreamReader.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaStreamReader.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaStreamReader.java
index 27c98cf..7a9c6aa 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaStreamReader.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/runtime/CorbaStreamReader.java
@@ -38,7 +38,7 @@ public class CorbaStreamReader implements XMLStreamReader {
 
     public CorbaStreamReader(CorbaTypeEventProducer evProducer) {
         eventProducer = evProducer;
-        currentState = XMLStreamReader.START_DOCUMENT;
+        currentState = XMLStreamConstants.START_DOCUMENT;
     }
 
     public QName getName() {
@@ -62,25 +62,25 @@ public class CorbaStreamReader implements XMLStreamReader {
     }
 
     public boolean hasNext() throws XMLStreamException {
-        if (currentState == XMLStreamReader.START_DOCUMENT) {
+        if (currentState == XMLStreamConstants.START_DOCUMENT) {
             return true;
         }
         boolean hasNextEvent = eventProducer.hasNext();
-        if (!hasNextEvent && currentState != XMLStreamReader.END_DOCUMENT) {
-            currentState = XMLStreamReader.END_DOCUMENT;
+        if (!hasNextEvent && currentState != XMLStreamConstants.END_DOCUMENT) {
+            currentState = XMLStreamConstants.END_DOCUMENT;
             hasNextEvent = true;
         }
         return hasNextEvent;
     }
 
     public int next() throws XMLStreamException {
-        if (currentState == XMLStreamReader.START_DOCUMENT) {
+        if (currentState == XMLStreamConstants.START_DOCUMENT) {
             currentState = 0;
-            return XMLStreamReader.START_DOCUMENT;
+            return XMLStreamConstants.START_DOCUMENT;
         }
         // ensure we catch end_document state
         hasNext();
-        if (currentState != XMLStreamReader.END_DOCUMENT) {
+        if (currentState != XMLStreamConstants.END_DOCUMENT) {
             currentState = eventProducer.next();
         }
         return currentState;

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/AbstractStartEndEventProducer.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/AbstractStartEndEventProducer.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/AbstractStartEndEventProducer.java
index 686f954..e68ed3c 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/AbstractStartEndEventProducer.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/AbstractStartEndEventProducer.java
@@ -22,7 +22,7 @@ import java.util.Iterator;
 import java.util.List;
 
 import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.events.Attribute;
 import javax.xml.stream.events.Namespace;
 
@@ -34,7 +34,7 @@ public abstract class AbstractStartEndEventProducer implements
         CorbaTypeEventProducer {
 
     protected int state;
-    protected final int[] states = {XMLStreamReader.START_ELEMENT, 0, XMLStreamReader.END_ELEMENT};
+    protected final int[] states = {XMLStreamConstants.START_ELEMENT, 0, XMLStreamConstants.END_ELEMENT};
 
     protected CorbaTypeEventProducer currentEventProducer;
     protected QName name;

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaAnyEventProducer.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaAnyEventProducer.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaAnyEventProducer.java
index b947ea3..50a0694 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaAnyEventProducer.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaAnyEventProducer.java
@@ -24,7 +24,7 @@ import java.util.List;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLEventFactory;
-import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.events.Attribute;
 import javax.xml.stream.events.Namespace;
 
@@ -94,9 +94,8 @@ public class CorbaAnyEventProducer extends AbstractStartEndEventProducer {
         // contained type and we CAN'T have the anys attributes used (It causes big problems)
         if (currentEventProducer == null) {
             return attributes;
-        } else {
-            return null;
         }
+        return null;
     }
 
     public List<Namespace> getNamespaces() {
@@ -145,7 +144,7 @@ public class CorbaAnyEventProducer extends AbstractStartEndEventProducer {
 
     class CorbaSimpleAnyContainedTypeEventProducer implements CorbaTypeEventProducer {
         int state;
-        int[] states = {XMLStreamReader.CHARACTERS};
+        int[] states = {XMLStreamConstants.CHARACTERS};
         String value;
 
         CorbaSimpleAnyContainedTypeEventProducer(String text) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaEnumEventProducer.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaEnumEventProducer.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaEnumEventProducer.java
index 1a5c5c1..af19354 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaEnumEventProducer.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaEnumEventProducer.java
@@ -21,14 +21,14 @@ package org.apache.cxf.binding.corba.types;
 import java.util.List;
 
 import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.events.Attribute;
 import javax.xml.stream.events.Namespace;
 
 public class CorbaEnumEventProducer implements CorbaTypeEventProducer {
 
     int state;
-    int[] states = {XMLStreamReader.START_ELEMENT, XMLStreamReader.CHARACTERS, XMLStreamReader.END_ELEMENT};
+    int[] states = {XMLStreamConstants.START_ELEMENT, XMLStreamConstants.CHARACTERS, XMLStreamConstants.END_ELEMENT};
     final CorbaEnumHandler handler;
     final QName name;
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaFixedEventProducer.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaFixedEventProducer.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaFixedEventProducer.java
index f0d8810..ea2b175 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaFixedEventProducer.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaFixedEventProducer.java
@@ -21,7 +21,7 @@ package org.apache.cxf.binding.corba.types;
 import java.util.List;
 
 import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.events.Attribute;
 import javax.xml.stream.events.Namespace;
 
@@ -29,7 +29,7 @@ import javax.xml.stream.events.Namespace;
 public class CorbaFixedEventProducer implements CorbaTypeEventProducer {
 
     int state;
-    int[] states = {XMLStreamReader.START_ELEMENT, XMLStreamReader.CHARACTERS, XMLStreamReader.END_ELEMENT};
+    int[] states = {XMLStreamConstants.START_ELEMENT, XMLStreamConstants.CHARACTERS, XMLStreamConstants.END_ELEMENT};
     final CorbaFixedHandler handler;
     final QName name;
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaObjectReferenceEventProducer.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaObjectReferenceEventProducer.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaObjectReferenceEventProducer.java
index 8b042aa..53f7c60 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaObjectReferenceEventProducer.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaObjectReferenceEventProducer.java
@@ -28,7 +28,7 @@ import javax.wsdl.Binding;
 import javax.wsdl.Definition;
 import javax.xml.namespace.QName;
 import javax.xml.stream.XMLEventFactory;
-import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.events.Attribute;
 import javax.xml.stream.events.Namespace;
 
@@ -164,9 +164,9 @@ public final class CorbaObjectReferenceEventProducer extends AbstractStartEndEve
     class CorbaAddressEventProducer implements CorbaTypeEventProducer {
         int state;
 
-        int[] states = {XMLStreamReader.START_ELEMENT,
-                        XMLStreamReader.CHARACTERS,
-                        XMLStreamReader.END_ELEMENT};
+        int[] states = {XMLStreamConstants.START_ELEMENT,
+                        XMLStreamConstants.CHARACTERS,
+                        XMLStreamConstants.END_ELEMENT};
         final String address;
 
         CorbaAddressEventProducer(String value) {
@@ -240,9 +240,8 @@ public final class CorbaObjectReferenceEventProducer extends AbstractStartEndEve
         public List<Attribute> getAttributes() {
             if (currentEventProducer != null) {
                 return currentEventProducer.getAttributes();
-            } else {
-                return metaAttrs;
             }
+            return metaAttrs;
         }
 
     }
@@ -250,9 +249,9 @@ public final class CorbaObjectReferenceEventProducer extends AbstractStartEndEve
     // An event producer to handle the production of the ServiceName XML data.
     class CorbaServiceNameEventProducer implements CorbaTypeEventProducer {
         int state;
-        int[] states = {XMLStreamReader.START_ELEMENT,
-                        XMLStreamReader.CHARACTERS,
-                        XMLStreamReader.END_ELEMENT};
+        int[] states = {XMLStreamConstants.START_ELEMENT,
+                        XMLStreamConstants.CHARACTERS,
+                        XMLStreamConstants.END_ELEMENT};
         QName serviceName;
         QName name;
 
@@ -306,9 +305,9 @@ public final class CorbaObjectReferenceEventProducer extends AbstractStartEndEve
     // An event producer to handle the production of the InterfaceName XML data.
     class CorbaInterfaceNameEventProducer implements CorbaTypeEventProducer {
         int state;
-        int[] states = {XMLStreamReader.START_ELEMENT,
-                        XMLStreamReader.CHARACTERS,
-                        XMLStreamReader.END_ELEMENT};
+        int[] states = {XMLStreamConstants.START_ELEMENT,
+                        XMLStreamConstants.CHARACTERS,
+                        XMLStreamConstants.END_ELEMENT};
         QName interfaceName;
         QName name;
         List<Namespace> namespaces;

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaOctetSequenceEventProducer.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaOctetSequenceEventProducer.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaOctetSequenceEventProducer.java
index 501ff49..da3deb4 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaOctetSequenceEventProducer.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaOctetSequenceEventProducer.java
@@ -21,16 +21,16 @@ package org.apache.cxf.binding.corba.types;
 import java.util.List;
 
 import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.events.Attribute;
 import javax.xml.stream.events.Namespace;
 
 public class CorbaOctetSequenceEventProducer implements CorbaTypeEventProducer {
 
     int state;
-    final int[] states = {XMLStreamReader.START_ELEMENT,
-                          XMLStreamReader.CHARACTERS,
-                          XMLStreamReader.END_ELEMENT};
+    final int[] states = {XMLStreamConstants.START_ELEMENT,
+                          XMLStreamConstants.CHARACTERS,
+                          XMLStreamConstants.END_ELEMENT};
     final CorbaOctetSequenceHandler seqHandler;
     final QName name;
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveTypeEventProducer.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveTypeEventProducer.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveTypeEventProducer.java
index 7cb0d46..55d01f0 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveTypeEventProducer.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaPrimitiveTypeEventProducer.java
@@ -21,14 +21,14 @@ package org.apache.cxf.binding.corba.types;
 import java.util.List;
 
 import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamReader;
+import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.events.Attribute;
 import javax.xml.stream.events.Namespace;
 
 public class CorbaPrimitiveTypeEventProducer implements CorbaTypeEventProducer {
 
     int state;
-    int[] states = {XMLStreamReader.START_ELEMENT, XMLStreamReader.CHARACTERS, XMLStreamReader.END_ELEMENT};
+    int[] states = {XMLStreamConstants.START_ELEMENT, XMLStreamConstants.CHARACTERS, XMLStreamConstants.END_ELEMENT};
     final CorbaPrimitiveHandler handler;
     final QName name;
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaStructListener.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaStructListener.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaStructListener.java
index 28cd7a0..d661dcb 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaStructListener.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/types/CorbaStructListener.java
@@ -67,16 +67,15 @@ public class CorbaStructListener extends AbstractCorbaTypeListener {
                 if (member.getName().equals(name.getLocalPart())
                     || (member.isSetAnonschematype() && member.isAnonschematype())) {
                     break;
-                } else {
-                    currentTypeListener =
-                        CorbaHandlerUtils.getTypeListener(elName,
-                                                          member.getIdltype(),
-                                                          typeMap,
-                                                          orb,
-                                                          serviceInfo);
-                    currentTypeListener.setNamespaceContext(ctx);
-                    ((CorbaStructHandler)handler).addMember(currentTypeListener.getCorbaObject());
                 }
+                currentTypeListener =
+                    CorbaHandlerUtils.getTypeListener(elName,
+                                                      member.getIdltype(),
+                                                      typeMap,
+                                                      orb,
+                                                      serviceInfo);
+                currentTypeListener.setNamespaceContext(ctx);
+                ((CorbaStructHandler)handler).addMember(currentTypeListener.getCorbaObject());
             }
             boolean anonType = false;
             if (member.isSetAnonschematype() && member.isAnonschematype()) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaObjectReferenceHelper.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaObjectReferenceHelper.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaObjectReferenceHelper.java
index fc1cbd5..ddf6d00 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaObjectReferenceHelper.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaObjectReferenceHelper.java
@@ -175,12 +175,11 @@ public final class CorbaObjectReferenceHelper {
                 | ((data[index + 1] << 16) & 0x00ff0000);
             return partial | ((data[index + 2] << 8) & 0x0000ff00)
                 | ((data[index + 3]) & 0x000000ff);
-        } else {
-            int partial = ((data[index]) & 0x000000ff)
-                | ((data[index + 1] << 8) & 0x0000ff00);
-            return partial | ((data[index + 2] << 16) & 0x00ff0000)
-                | ((data[index + 3] << 24) & 0xff000000);
         }
+        int partial = ((data[index]) & 0x000000ff)
+            | ((data[index + 1] << 8) & 0x0000ff00);
+        return partial | ((data[index + 2] << 16) & 0x00ff0000)
+            | ((data[index + 3] << 24) & 0xff000000);
     }
 
     public static void populateEprInfo(EprMetaData info) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaUtils.java
----------------------------------------------------------------------
diff --git a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaUtils.java b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaUtils.java
index 7b1e229..77b52f3 100644
--- a/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaUtils.java
+++ b/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/CorbaUtils.java
@@ -303,86 +303,85 @@ public final class CorbaUtils {
 
         if (seenTypes.contains(new QName(unionType.getName()))) {
             return orb.create_recursive_tc(unionType.getRepositoryID());
-        } else {
-            seenTypes.push(new QName(unionType.getName()));
-
-            TypeCode discTC = getTypeCode(orb, unionType.getDiscriminator(), typeMap, seenTypes);
-            Map<String, UnionMember> members = new LinkedHashMap<String, UnionMember>();
-            List<Unionbranch> branches = unionType.getUnionbranch();
-            for (Iterator<Unionbranch> branchIter = branches.iterator(); branchIter.hasNext();) {
-                Unionbranch branch = branchIter.next();
-                List<CaseType> cases = branch.getCase();
-                for (Iterator<CaseType> caseIter = cases.iterator(); caseIter.hasNext();) {
-                    CaseType cs = caseIter.next();
-                    if (!members.containsKey(cs.getLabel())) {
-                        UnionMember member = new UnionMember();
-                        member.name = branch.getName();
-                        member.type = getTypeCode(orb, branch.getIdltype(), typeMap, seenTypes);
-                        member.label = orb.create_any();
-                        // We need to insert the labels in a way that depends on the type of the
-                        // discriminator.  According to the CORBA specification, the following types
-                        // are permissable as discriminator types:
-                        //    * signed & unsigned short
-                        //    * signed & unsigned long
-                        //    * signed & unsigned long long
-                        //    * char
-                        //    * boolean
-                        //    * enum
-                        switch (discTC.kind().value()) {
-                        case TCKind._tk_short:
-                            member.label.insert_short(Short.parseShort(cs.getLabel()));
-                            break;
-                        case TCKind._tk_ushort:
-                            member.label.insert_ushort(Short.parseShort(cs.getLabel()));
-                            break;
-                        case TCKind._tk_long:
-                            member.label.insert_long(Integer.parseInt(cs.getLabel()));
-                            break;
-                        case TCKind._tk_ulong:
-                            member.label.insert_ulong(Integer.parseInt(cs.getLabel()));
-                            break;
-                        case TCKind._tk_longlong:
-                            member.label.insert_longlong(Long.parseLong(cs.getLabel()));
-                            break;
-                        case TCKind._tk_ulonglong:
-                            member.label.insert_ulonglong(Long.parseLong(cs.getLabel()));
-                            break;
-                        case TCKind._tk_char:
-                            member.label.insert_char(cs.getLabel().charAt(0));
-                            break;
-                        case TCKind._tk_boolean:
-                            member.label.insert_boolean(Boolean.parseBoolean(cs.getLabel()));
-                            break;
-                        case TCKind._tk_enum:
-                            org.omg.CORBA.portable.OutputStream out =
-                                member.label.create_output_stream();
-                            Enum enumVal = (Enum)getCorbaType(unionType.getDiscriminator(), typeMap);
-                            List<Enumerator> enumerators = enumVal.getEnumerator();
-                            for (int i = 0; i < enumerators.size(); ++i) {
-                                Enumerator e = enumerators.get(i);
-                                if (e.getValue().equals(cs.getLabel())) {
-                                    out.write_long(i);
-                                }
+        }
+        seenTypes.push(new QName(unionType.getName()));
+
+        TypeCode discTC = getTypeCode(orb, unionType.getDiscriminator(), typeMap, seenTypes);
+        Map<String, UnionMember> members = new LinkedHashMap<String, UnionMember>();
+        List<Unionbranch> branches = unionType.getUnionbranch();
+        for (Iterator<Unionbranch> branchIter = branches.iterator(); branchIter.hasNext();) {
+            Unionbranch branch = branchIter.next();
+            List<CaseType> cases = branch.getCase();
+            for (Iterator<CaseType> caseIter = cases.iterator(); caseIter.hasNext();) {
+                CaseType cs = caseIter.next();
+                if (!members.containsKey(cs.getLabel())) {
+                    UnionMember member = new UnionMember();
+                    member.name = branch.getName();
+                    member.type = getTypeCode(orb, branch.getIdltype(), typeMap, seenTypes);
+                    member.label = orb.create_any();
+                    // We need to insert the labels in a way that depends on the type of the
+                    // discriminator.  According to the CORBA specification, the following types
+                    // are permissable as discriminator types:
+                    //    * signed & unsigned short
+                    //    * signed & unsigned long
+                    //    * signed & unsigned long long
+                    //    * char
+                    //    * boolean
+                    //    * enum
+                    switch (discTC.kind().value()) {
+                    case TCKind._tk_short:
+                        member.label.insert_short(Short.parseShort(cs.getLabel()));
+                        break;
+                    case TCKind._tk_ushort:
+                        member.label.insert_ushort(Short.parseShort(cs.getLabel()));
+                        break;
+                    case TCKind._tk_long:
+                        member.label.insert_long(Integer.parseInt(cs.getLabel()));
+                        break;
+                    case TCKind._tk_ulong:
+                        member.label.insert_ulong(Integer.parseInt(cs.getLabel()));
+                        break;
+                    case TCKind._tk_longlong:
+                        member.label.insert_longlong(Long.parseLong(cs.getLabel()));
+                        break;
+                    case TCKind._tk_ulonglong:
+                        member.label.insert_ulonglong(Long.parseLong(cs.getLabel()));
+                        break;
+                    case TCKind._tk_char:
+                        member.label.insert_char(cs.getLabel().charAt(0));
+                        break;
+                    case TCKind._tk_boolean:
+                        member.label.insert_boolean(Boolean.parseBoolean(cs.getLabel()));
+                        break;
+                    case TCKind._tk_enum:
+                        org.omg.CORBA.portable.OutputStream out =
+                            member.label.create_output_stream();
+                        Enum enumVal = (Enum)getCorbaType(unionType.getDiscriminator(), typeMap);
+                        List<Enumerator> enumerators = enumVal.getEnumerator();
+                        for (int i = 0; i < enumerators.size(); ++i) {
+                            Enumerator e = enumerators.get(i);
+                            if (e.getValue().equals(cs.getLabel())) {
+                                out.write_long(i);
                             }
-                            member.label.read_value(out.create_input_stream(), discTC);
-                            break;
-                        default:
-                            throw new CorbaBindingException("Unsupported discriminator type");
                         }
-                        // Some orbs are strict on how the case labels are stored for
-                        // each member.  So we can't
-                        // simply insert the labels as strings
-                        members.put(cs.getLabel(), member);
+                        member.label.read_value(out.create_input_stream(), discTC);
+                        break;
+                    default:
+                        throw new CorbaBindingException("Unsupported discriminator type");
                     }
+                    // Some orbs are strict on how the case labels are stored for
+                    // each member.  So we can't
+                    // simply insert the labels as strings
+                    members.put(cs.getLabel(), member);
                 }
             }
-            seenTypes.pop();
-            return orb.create_union_tc(unionType.getRepositoryID(),
-                                       getTypeCodeName(unionType.getName()),
-                                       discTC,
-                                       members.values().toArray(
-                                           new UnionMember[members.size()]));
         }
+        seenTypes.pop();
+        return orb.create_union_tc(unionType.getRepositoryID(),
+                                   getTypeCodeName(unionType.getName()),
+                                   discTC,
+                                   members.values().toArray(
+                                       new UnionMember[members.size()]));
     }
 
     public static String getTypeCodeName(String name) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingConfiguration.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingConfiguration.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingConfiguration.java
index 6a6f857..bb4729a 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingConfiguration.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/SoapBindingConfiguration.java
@@ -57,9 +57,8 @@ public class SoapBindingConfiguration extends BindingConfiguration {
         String action = (String)op.getProperty("action");
         if (action == null) {
             return defaultSoapAction;
-        } else {
-            return action;
         }
+        return action;
     }
 
     public String getTransportURI() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor.java
index 8bf2fc8..94778ad 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/AbstractSoapInterceptor.java
@@ -127,15 +127,13 @@ public abstract class AbstractSoapInterceptor extends AbstractPhaseInterceptor<S
             if (config && fault.getCause() != null
                 && fault.getCause().getMessage() != null && !fault.getMessage().equals(fault.getCause().getMessage())) {
                 return fault.getMessage() + " Caused by: " + fault.getCause().getMessage();
-            } else {
-                return fault.getMessage();
             }
+            return fault.getMessage();
         } else if (config && fault.getCause() != null) {
             if (fault.getCause().getMessage() != null) {
                 return fault.getCause().getMessage();
-            } else {
-                return fault.getCause().toString();
             }
+            return fault.getCause().toString();
         } else {
             return "Fault occurred while processing.";
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/CheckFaultInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/CheckFaultInterceptor.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/CheckFaultInterceptor.java
index 75f57c2..dfe6262 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/CheckFaultInterceptor.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/CheckFaultInterceptor.java
@@ -21,6 +21,7 @@ package org.apache.cxf.binding.soap.interceptor;
 
 import java.util.logging.Logger;
 
+import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 
@@ -49,8 +50,8 @@ public class CheckFaultInterceptor extends AbstractSoapInterceptor {
         try {
             // advance to first tag.
             int x = xmlReader.getEventType();
-            while (x != XMLStreamReader.START_ELEMENT
-                && x != XMLStreamReader.END_ELEMENT
+            while (x != XMLStreamConstants.START_ELEMENT
+                && x != XMLStreamConstants.END_ELEMENT
                 && xmlReader.hasNext()) {
                 x = xmlReader.next();
             }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
index d36f196..78a7f29 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCInInterceptor.java
@@ -26,6 +26,7 @@ import java.util.List;
 import java.util.logging.Logger;
 
 import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 
@@ -107,9 +108,8 @@ public class RPCInInterceptor extends AbstractInDatabindingInterceptor {
                 // it's doc-lit-bare
                 new BareInInterceptor().handleMessage(message);
                 return;
-            } else {
-                setMessage(message, operation);
             }
+            setMessage(message, operation);
         } else {
             operation = message.getExchange().getBindingOperationInfo();
         }
@@ -140,7 +140,7 @@ public class RPCInInterceptor extends AbstractInDatabindingInterceptor {
                 if (qn.equals(SOAP12_RESULT)) {
                     //just ignore this.   The parts should work correctly.
                     try {
-                        while (xmlReader.getEventType() != XMLStreamReader.END_ELEMENT) {
+                        while (xmlReader.getEventType() != XMLStreamConstants.END_ELEMENT) {
                             xmlReader.next();
                         }
                         xmlReader.next();

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
index 703d1ed..288a5b6 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/RPCOutInterceptor.java
@@ -53,7 +53,7 @@ public class RPCOutInterceptor extends AbstractOutDatabindingInterceptor {
             NSStack nsStack = new NSStack();
             nsStack.push();
 
-            BindingOperationInfo operation = (BindingOperationInfo) message.getExchange().getBindingOperationInfo();
+            BindingOperationInfo operation = message.getExchange().getBindingOperationInfo();
 
             assert operation.getName() != null;
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
index bce0bf7..b4d27c8 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ReadHeadersInterceptor.java
@@ -87,7 +87,7 @@ public class ReadHeadersInterceptor extends AbstractSoapInterceptor {
             if (xmlReader != null) {
                 try {
                     while (xmlReader.hasNext()) {
-                        if (xmlReader.next() == XMLStreamReader.END_DOCUMENT) {
+                        if (xmlReader.next() == XMLStreamConstants.END_DOCUMENT) {
                             return;
                         }
                     }
@@ -460,17 +460,15 @@ public class ReadHeadersInterceptor extends AbstractSoapInterceptor {
         public List<XMLEvent> getBodyAttributeAndNamespaceEvents() {
             if (bodyEvents == null) {
                 return Collections.emptyList();
-            } else {
-                return Collections.unmodifiableList(bodyEvents);
             }
+            return Collections.unmodifiableList(bodyEvents);
         }
 
         public List<XMLEvent> getEnvAttributeAndNamespaceEvents() {
             if (envEvents == null) {
                 return Collections.emptyList();
-            } else {
-                return Collections.unmodifiableList(envEvents);
             }
+            return Collections.unmodifiableList(envEvents);
         }
 
         public String getEnvelopePrefix() {

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultInInterceptor.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultInInterceptor.java
index 164e065..7b7cb7b 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultInInterceptor.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultInInterceptor.java
@@ -22,6 +22,7 @@ package org.apache.cxf.binding.soap.interceptor;
 import java.util.logging.Logger;
 
 import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 
@@ -60,7 +61,7 @@ public class Soap11FaultInInterceptor extends AbstractSoapInterceptor {
         Element detail = null;
         String lang = null;
         try {
-            while (reader.nextTag() == XMLStreamReader.START_ELEMENT) {
+            while (reader.nextTag() == XMLStreamConstants.START_ELEMENT) {
                 if (reader.getLocalName().equals("faultcode")) {
                     faultCode = StaxUtils.readQName(reader);
                 } else if (reader.getLocalName().equals("faultstring")) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultOutInterceptor.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultOutInterceptor.java
index b68a27c..ef4bd78 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultOutInterceptor.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultOutInterceptor.java
@@ -36,6 +36,7 @@ import org.apache.cxf.binding.soap.interceptor.Soap11FaultOutInterceptor.Soap11F
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.message.Message;
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.staxutils.StaxUtils;
 
@@ -62,7 +63,7 @@ public class Soap12FaultOutInterceptor extends AbstractSoapInterceptor {
             super(Phase.MARSHAL);
         }
         public void handleMessage(SoapMessage message) throws Fault {
-            LOG.info(getClass() + (String) message.get(SoapMessage.CONTENT_TYPE));
+            LOG.info(getClass() + (String) message.get(Message.CONTENT_TYPE));
 
             XMLStreamWriter writer = message.getContent(XMLStreamWriter.class);
             Fault f = (Fault)message.getContent(Exception.class);

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/StartBodyInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/StartBodyInterceptor.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/StartBodyInterceptor.java
index 346c5e7..8b25c7b 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/StartBodyInterceptor.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/StartBodyInterceptor.java
@@ -21,6 +21,7 @@ package org.apache.cxf.binding.soap.interceptor;
 
 import java.util.logging.Logger;
 
+import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 
@@ -57,8 +58,8 @@ public class StartBodyInterceptor extends AbstractSoapInterceptor {
         //important to keep for ws-security signature digests and stuff
         try {
             int i = xmlReader.next();
-            while (i == XMLStreamReader.NAMESPACE
-                || i == XMLStreamReader.ATTRIBUTE) {
+            while (i == XMLStreamConstants.NAMESPACE
+                || i == XMLStreamConstants.ATTRIBUTE) {
                 i = xmlReader.next();
             }
         } catch (XMLStreamException e) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/model/SoapBindingInfo.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/model/SoapBindingInfo.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/model/SoapBindingInfo.java
index 84ce8a7..bb0bb50 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/model/SoapBindingInfo.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/model/SoapBindingInfo.java
@@ -77,9 +77,8 @@ public class SoapBindingInfo extends BindingInfo {
         SoapOperationInfo opInfo = getOperation(operation.getName()).getExtensor(SoapOperationInfo.class);
         if (opInfo != null) {
             return opInfo.getStyle();
-        } else {
-            return style;
         }
+        return style;
     }
 
     public OperationInfo getOperationByAction(String action) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJOutInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJOutInterceptor.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJOutInterceptor.java
index 7328832..60bf875 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJOutInterceptor.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJOutInterceptor.java
@@ -219,10 +219,9 @@ public class SAAJOutInterceptor extends AbstractSoapInterceptor {
                     if (e.getCause() instanceof ConnectException) {
                         throw new SoapFault(e.getCause().getMessage(), e,
                                             message.getVersion().getSender());
-                    } else {
-                        throw new SoapFault(new Message("SOAPEXCEPTION", BUNDLE, e.getMessage()), e,
-                                            message.getVersion().getSender());
                     }
+                    throw new SoapFault(new Message("SOAPEXCEPTION", BUNDLE, e.getMessage()), e,
+                                        message.getVersion().getSender());
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJStreamWriter.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJStreamWriter.java b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJStreamWriter.java
index 281e34e..64fe247 100644
--- a/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJStreamWriter.java
+++ b/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/saaj/SAAJStreamWriter.java
@@ -83,9 +83,8 @@ public final class SAAJStreamWriter extends OverlayW3CDOMStreamWriter {
                     Iterator<String> it = new W3CNamespaceContext((Element)nd).getPrefixes(nsuri);
                     if (it.hasNext()) {
                         return it.next();
-                    } else {
-                        nd = null;
                     }
+                    nd = null;
                 } else {
                     nd = nd.getNextSibling();
                 }
@@ -219,7 +218,7 @@ public final class SAAJStreamWriter extends OverlayW3CDOMStreamWriter {
                     el = ((SOAPElement)cur).addChildElement(local, "", "");
                 } else {
                     el = ((SOAPElement)cur).addChildElement(local, pfx == null ? "" : pfx, ns);
-                    adjustPrefix((SOAPElement)el, pfx);
+                    adjustPrefix(el, pfx);
                 }
                 cur.removeChild(el);
                 return el;

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapOutInterceptorTest.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapOutInterceptorTest.java b/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapOutInterceptorTest.java
index f56dc0d..d21a237 100644
--- a/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapOutInterceptorTest.java
+++ b/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapOutInterceptorTest.java
@@ -25,6 +25,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 
+import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 
@@ -102,19 +103,19 @@ public class SoapOutInterceptorTest extends TestBase {
     }
 
     private void assertInputStream(XMLStreamReader xmlReader, SoapVersion version) throws Exception {
-        assertEquals(XMLStreamReader.START_ELEMENT, xmlReader.nextTag());
+        assertEquals(XMLStreamConstants.START_ELEMENT, xmlReader.nextTag());
         assertEquals(version.getEnvelope(), xmlReader.getName());
 
-        assertEquals(XMLStreamReader.START_ELEMENT, xmlReader.nextTag());
+        assertEquals(XMLStreamConstants.START_ELEMENT, xmlReader.nextTag());
         assertEquals(version.getHeader(), xmlReader.getName());
 
-        assertEquals(XMLStreamReader.START_ELEMENT, xmlReader.nextTag());
+        assertEquals(XMLStreamConstants.START_ELEMENT, xmlReader.nextTag());
         assertEquals("reservation", xmlReader.getLocalName());
         assertEquals(version.getAttrValueMustUnderstand(true),
                      xmlReader.getAttributeValue(version.getNamespace(),
                                                  version.getAttrNameMustUnderstand()));
 
-        assertEquals(XMLStreamReader.START_ELEMENT, xmlReader.nextTag());
+        assertEquals(XMLStreamConstants.START_ELEMENT, xmlReader.nextTag());
         assertEquals("reference", xmlReader.getLocalName());
         // I don't think we're writing the body yet...
         //

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/ParseBodyTest.java
----------------------------------------------------------------------
diff --git a/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/ParseBodyTest.java b/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/ParseBodyTest.java
index a41239e..f424a4d 100644
--- a/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/ParseBodyTest.java
+++ b/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/saaj/ParseBodyTest.java
@@ -28,6 +28,7 @@ import javax.xml.soap.MessageFactory;
 import javax.xml.soap.SOAPConstants;
 import javax.xml.soap.SOAPMessage;
 import javax.xml.soap.SOAPPart;
+import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLStreamReader;
 import javax.xml.stream.XMLStreamWriter;
 import javax.xml.transform.dom.DOMSource;
@@ -63,7 +64,7 @@ public class ParseBodyTest extends Assert {
         xmlReader = StaxUtils.createXMLStreamReader(new ByteArrayInputStream(data.getBytes("utf-8")));
 
         //reader should be on the start element for the
-        assertEquals(XMLStreamReader.START_ELEMENT, xmlReader.next());
+        assertEquals(XMLStreamConstants.START_ELEMENT, xmlReader.next());
         assertEquals("Body", xmlReader.getLocalName());
 
         factory = MessageFactory.newInstance();

http://git-wip-us.apache.org/repos/asf/cxf/blob/4bb53de9/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptor.java b/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptor.java
index 85b967f..fa1ea49 100644
--- a/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptor.java
+++ b/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/interceptor/XMLMessageInInterceptor.java
@@ -125,13 +125,12 @@ public class XMLMessageInInterceptor extends AbstractInDatabindingInterceptor {
                     throw new Fault(new org.apache.cxf.common.i18n.Message("STAX_READ_EXC", LOG));
                 }
                 return boi;
-            } else {
-                Collection<MessagePartInfo> bodyParts = bmi.getMessageParts();
-                if (bodyParts.size() == 1) {
-                    MessagePartInfo p = bodyParts.iterator().next();
-                    if (p.getConcreteName().equals(startQName)) {
-                        return boi;
-                    }
+            }
+            Collection<MessagePartInfo> bodyParts = bmi.getMessageParts();
+            if (bodyParts.size() == 1) {
+                MessagePartInfo p = bodyParts.iterator().next();
+                if (p.getConcreteName().equals(startQName)) {
+                    return boi;
                 }
             }
         }


Mime
View raw message