cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r953828 - in /cxf/branches/2.2.x-fixes: ./ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/ rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/ rt/ws/s...
Date Fri, 11 Jun 2010 18:48:56 GMT
Author: dkulp
Date: Fri Jun 11 18:48:55 2010
New Revision: 953828

URL: http://svn.apache.org/viewvc?rev=953828&view=rev
Log:
Merged revisions 953449 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r953449 | dkulp | 2010-06-10 16:40:47 -0400 (Thu, 10 Jun 2010) | 1 line
  
  Fix some dead code warnings that the Eclipse Helios compiler is catching
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
    cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
    cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java
    cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptor.java
    cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/CustomOutFaultInterceptor.java
    cxf/branches/2.2.x-fixes/tools/wsdlto/misc/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToServiceProcessorTest.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java?rev=953828&r1=953827&r2=953828&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/SoapOutInterceptor.java
Fri Jun 11 18:48:55 2010
@@ -258,12 +258,11 @@ public class SoapOutInterceptor extends 
     protected DataWriter<XMLStreamWriter> getDataWriter(Message message) {
         Service service = ServiceModelUtil.getService(message.getExchange());
         DataWriter<XMLStreamWriter> dataWriter = service.getDataBinding().createWriter(XMLStreamWriter.class);
-        dataWriter.setAttachments(message.getAttachments());
-        
         if (dataWriter == null) {
             throw new Fault(new org.apache.cxf.common.i18n.Message("NO_DATAWRITER", BUNDLE,
service
                 .getName()));
         }
+        dataWriter.setAttachments(message.getAttachments());
 
         return dataWriter;
     }

Modified: cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java?rev=953828&r1=953827&r2=953828&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
Fri Jun 11 18:48:55 2010
@@ -545,14 +545,7 @@ public class BeanType extends Type {
             }
         }
 
-        BeanTypeInfo elementTypeInfo;
-        if (beanType != null) {
-            elementTypeInfo = beanType.getTypeInfo();
-        } else {
-            // didn't find a bean type so just use this bean's type info
-            elementTypeInfo = getTypeInfo();
-        }
-        return elementTypeInfo;
+        return beanType.getTypeInfo();
     }
 
     /**

Modified: cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java?rev=953828&r1=953827&r2=953828&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RetransmissionQueueImpl.java
Fri Jun 11 18:48:55 2010
@@ -263,14 +263,14 @@ public class RetransmissionQueueImpl imp
         if (null != maps) {
             to = maps.getTo();
         }
-        if (RMUtils.getAddressingConstants().getAnonymousURI().equals(to.getValue())) {
-            LOG.log(Level.FINE, "Cannot resend to anonymous target");
-            return;
-        }
         if (null == to) {
             LOG.log(Level.SEVERE, "NO_ADDRESS_FOR_RESEND_MSG");
             return;
         }
+        if (RMUtils.getAddressingConstants().getAnonymousURI().equals(to.getValue())) {
+            LOG.log(Level.FINE, "Cannot resend to anonymous target");
+            return;
+        }
         
         final String address = to.getValue();
         LOG.fine("Resending to address: " + address);

Modified: cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptor.java?rev=953828&r1=953827&r2=953828&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptor.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JOutInterceptor.java
Fri Jun 11 18:48:55 2010
@@ -141,7 +141,6 @@ public class WSS4JOutInterceptor extends
             
             boolean doDebug = LOG.isLoggable(Level.FINE);
             boolean doTimeDebug = TIME_LOG.isLoggable(Level.FINE);
-            SoapVersion version = mc.getVersion();
     
             long t0 = 0;
             long t1 = 0;
@@ -154,7 +153,14 @@ public class WSS4JOutInterceptor extends
             if (doDebug) {
                 LOG.fine("WSS4JOutInterceptor: enter handleMessage()");
             }
-    
+            /**
+             * There is nothing to send...Usually happens when the provider
+             * needs to send a HTTP 202 message (with no content)
+             */
+            if (mc == null) {
+                return;
+            }
+            SoapVersion version = mc.getVersion();
             RequestData reqData = new RequestData();
     
             reqData.setMsgContext(mc);
@@ -232,7 +238,8 @@ public class WSS4JOutInterceptor extends
                  * over the wire. Therefore this must shall be the last (or only)
                  * handler in a chain. Now we can perform our security operations on
                  * this request.
-                 */
+                 */              
+    
                 SOAPMessage saaj = mc.getContent(SOAPMessage.class);
     
                 if (saaj == null) {
@@ -242,14 +249,7 @@ public class WSS4JOutInterceptor extends
                 }
     
                 Document doc = saaj.getSOAPPart();
-                /**
-                 * There is nothing to send...Usually happens when the provider
-                 * needs to send a HTTP 202 message (with no content)
-                 */
-                if (mc == null) {
-                    return;
-                }
-    
+
                 if (doTimeDebug) {
                     t1 = System.currentTimeMillis();
                 }

Modified: cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/CustomOutFaultInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/CustomOutFaultInterceptor.java?rev=953828&r1=953827&r2=953828&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/CustomOutFaultInterceptor.java
(original)
+++ cxf/branches/2.2.x-fixes/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/CustomOutFaultInterceptor.java
Fri Jun 11 18:48:55 2010
@@ -48,8 +48,7 @@ public class CustomOutFaultInterceptor e
         if (ex == null) {
             throw new RuntimeException("Exception is expected");
         }
-        Fault fault = (Fault)ex;
-        if (fault == null) {
+        if (!(ex instanceof Fault)) {
             throw new RuntimeException("Fault is expected");
         }
         // deal with the actual exception : fault.getCause()

Modified: cxf/branches/2.2.x-fixes/tools/wsdlto/misc/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToServiceProcessorTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/tools/wsdlto/misc/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToServiceProcessorTest.java?rev=953828&r1=953827&r2=953828&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/tools/wsdlto/misc/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToServiceProcessorTest.java
(original)
+++ cxf/branches/2.2.x-fixes/tools/wsdlto/misc/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToServiceProcessorTest.java
Fri Jun 11 18:48:55 2010
@@ -69,7 +69,7 @@ public class WSDLToServiceProcessorTest 
                 fail("Element wsdl:service serviceins Missed!");
             }
             Iterator it = service.getPort("portins").getExtensibilityElements().iterator();
-            if (service == null) {
+            if (it == null || !it.hasNext()) {
                 fail("Element wsdl:port portins Missed!");
             }
             boolean found = false;
@@ -117,7 +117,7 @@ public class WSDLToServiceProcessorTest 
                 fail("Element wsdl:service serviceins Missed!");
             }
             Iterator it = service.getPort("SoapPort").getExtensibilityElements().iterator();
-            if (service == null) {
+            if (it == null || !it.hasNext()) {
                 fail("Element wsdl:port portins Missed!");
             }
 
@@ -159,7 +159,7 @@ public class WSDLToServiceProcessorTest 
                 fail("Element wsdl:service serviceins Missed!");
             }
             Iterator it = service.getPort("portins").getExtensibilityElements().iterator();
-            if (service == null) {
+            if (it == null || !it.hasNext()) {
                 fail("Element wsdl:port portins Missed!");
             }
             boolean found = false;
@@ -208,7 +208,7 @@ public class WSDLToServiceProcessorTest 
                 fail("Element wsdl:service serviceins Missed!");
             }
             Iterator it = service.getPort("portins").getExtensibilityElements().iterator();
-            if (service == null) {
+            if (it == null || !it.hasNext()) {
                 fail("Element wsdl:port portins Missed!");
             }
             boolean found = false;
@@ -265,7 +265,7 @@ public class WSDLToServiceProcessorTest 
                 fail("Element wsdl:service serviceins Missed!");
             }
             Iterator it = service.getPort("portins").getExtensibilityElements().iterator();
-            if (service == null) {
+            if (it == null || !it.hasNext()) {
                 fail("Element wsdl:port portins Missed!");
             }
             boolean found = false;



Mime
View raw message