cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1229038 - in /cxf/trunk: common/common/src/main/java/org/apache/cxf/common/util/ common/common/src/main/java/org/apache/cxf/helpers/ common/common/src/main/java/org/apache/cxf/staxutils/ maven-plugins/codegen-plugin/src/main/java/org/apach...
Date Mon, 09 Jan 2012 06:18:50 GMT
Author: dkulp
Date: Mon Jan  9 06:18:49 2012
New Revision: 1229038

URL: http://svn.apache.org/viewvc?rev=1229038&view=rev
Log:
Minor code cleanups to remove some unneeded comparisons

Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java
    cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/NSDecl.java
    cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
    cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
    cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlUtilities.java
    cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/ContextUtils.java
    cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisXMLStreamDataWriter.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/NamespaceHelper.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/AttributeWriter.java
    cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/DataSourceProvider.java
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XPathProvider.java
    cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/UsernameTokenBuilder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
    cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/corba/CorbaTest.java
    cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/URIParserUtil.java
    cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java (original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/common/util/Compiler.java Mon Jan
 9 06:18:49 2012
@@ -254,9 +254,7 @@ public class Compiler {
                 infoStreamPrinter.start();
             }
 
-            if (p != null) {
-                return p.waitFor() == 0 ? true : false;
-            }
+            return p.waitFor() == 0 ? true : false;
         } catch (SecurityException e) {
             System.err.println("[ERROR] SecurityException during exec() of compiler \"" +
args[0] + "\".");
         } catch (InterruptedException e) {

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/NSDecl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/NSDecl.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/NSDecl.java (original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/helpers/NSDecl.java Mon Jan  9 06:18:49
2012
@@ -54,8 +54,7 @@ public final class NSDecl {
         if (!(obj instanceof NSDecl)) {
             return false;
         }
-        return obj != null
-            && uri == ((NSDecl)obj).uri
+        return uri == ((NSDecl)obj).uri
             && prefix == ((NSDecl)obj).prefix;
     }
 

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Mon Jan
 9 06:18:49 2012
@@ -613,7 +613,7 @@ public final class StaxUtils {
         // We need this check because namespace writing works
         // different on Woodstox and the RI.
         if (writeElementNS) {
-            if (prefix == null || prefix.length() == 0) {
+            if (prefix.length() == 0) {
                 writer.writeDefaultNamespace(uri);
                 writer.setDefaultNamespace(uri);
             } else {
@@ -770,7 +770,7 @@ public final class StaxUtils {
                     String value = attr.getNodeValue();
                     if (attns == null || attns.length() == 0) {
                         writer.writeAttribute(name, value);
-                    } else if (attrPrefix == null || attrPrefix.length() == 0) {
+                    } else if (attrPrefix.length() == 0) {
                         writer.writeAttribute(attns, name, value);
                     } else {
                         writer.writeAttribute(attrPrefix, attns, name, value);

Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
(original)
+++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/AbstractCodegenMoho.java
Mon Jan  9 06:18:49 2012
@@ -482,9 +482,7 @@ public abstract class AbstractCodegenMoh
             throw new MojoExecutionException(msg.toString());
         }
 
-        if (file != null) {
-            file.delete();
-        }
+        file.delete();
         if (StringUtils.isNotEmpty(err.getOutput()) && err.getOutput().contains("WSDL2Java
Error")) {
             StringBuffer msg = new StringBuffer();
             msg.append(err.getOutput());

Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlUtilities.java
URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlUtilities.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlUtilities.java
(original)
+++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/WsdlUtilities.java
Mon Jan  9 06:18:49 2012
@@ -57,13 +57,11 @@ public final class WsdlUtilities {
         }
         StringBuilder str = new StringBuilder();
 
-        if (arr != null) {
-            for (String s : arr) {
-                if (str.length() > 0) {
-                    str.append(',');
-                }
-                str.append(s);
+        for (String s : arr) {
+            if (str.length() > 0) {
+                str.append(',');
             }
+            str.append(s);
         }
         return str.toString();
     }

Modified: cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/ContextUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/ContextUtils.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/ContextUtils.java
(original)
+++ cxf/trunk/rt/bindings/corba/src/main/java/org/apache/cxf/binding/corba/utils/ContextUtils.java
Mon Jan  9 06:18:49 2012
@@ -52,8 +52,7 @@ public final class ContextUtils {
      */
     public static boolean isOutbound(Message message) {
         Exchange exchange = message.getExchange();
-        return message != null
-               && exchange != null
+        return exchange != null
                && message == exchange.getOutMessage();
     }
         

Modified: cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java
(original)
+++ cxf/trunk/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java
Mon Jan  9 06:18:49 2012
@@ -348,10 +348,8 @@ public final class IriDecoderHelper {
                 }
             }
 
-            if (param != null) {
-                params.remove(param);
-                ec.appendChild(doc.createTextNode(param.getValue()));
-            }
+            params.remove(param);
+            ec.appendChild(doc.createTextNode(param.getValue()));
         }
         return doc;
     }

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisXMLStreamDataWriter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisXMLStreamDataWriter.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisXMLStreamDataWriter.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/AegisXMLStreamDataWriter.java
Mon Jan  9 06:18:49 2012
@@ -96,7 +96,6 @@ public class AegisXMLStreamDataWriter ex
         ElementWriter writer = new ElementWriter(output);
         MessageWriter w2 = writer.getElementWriter(elementName);
         if (getContext().isWriteXsiTypes()
-            && aegisType != null 
             && aegisType.getSchemaType() != null) {
             // if we know the type, write it. We are standalone, and the reader needs it.
             w2.writeXsiType(aegisType.getSchemaType());

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/databinding/AegisDatabinding.java
Mon Jan  9 06:18:49 2012
@@ -647,7 +647,7 @@ public class AegisDatabinding extends Ab
             return null;
         }
         SimpleMethodDispatcher smd = (SimpleMethodDispatcher)md;
-        return smd != null ? smd.getPrimaryMethod(op) : null;
+        return smd.getPrimaryMethod(op);
     }
 
     public AegisType getType(MessagePartInfo part) {

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/basic/BeanType.java
Mon Jan  9 06:18:49 2012
@@ -548,7 +548,7 @@ public class BeanType extends AegisType 
         // search the BeanType superType tree for the first BeanType with a property named
'name'
         BeanType beanType = this;
         AegisType type = null;
-        while (type == null && beanType != null) {
+        while (type == null) {
             type = beanType.getTypeInfo().getType(name);
 
             if (type == null) {

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/NamespaceHelper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/NamespaceHelper.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/NamespaceHelper.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/util/NamespaceHelper.java
Mon Jan  9 06:18:49 2012
@@ -344,7 +344,7 @@ public final class NamespaceHelper {
             throw new DatabindingException("No namespace was found for prefix: " + prefix);
         }
         
-        if (jNS == null || localName == null) {
+        if (localName == null) {
             throw new DatabindingException("Invalid QName in mapping: " + value);
         }
 

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/AttributeWriter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/AttributeWriter.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/AttributeWriter.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/AttributeWriter.java
Mon Jan  9 06:18:49 2012
@@ -43,7 +43,7 @@ public class AttributeWriter extends Abs
         this.namespace = namespace;
 
         try {
-            if (namespace != null && namespace.length() > 0) {
+            if (namespace.length() > 0) {
                 if (XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI.equals(namespace)) {
                     prefix = NamespaceHelper.getUniquePrefix(writer, namespace, "xsi", true);
                 } else {

Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
(original)
+++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/io/DataWriterImpl.java
Mon Jan  9 06:18:49 2012
@@ -182,7 +182,7 @@ public class DataWriterImpl<T> extends J
                                                          getAttachmentMarshaller());
                 }
             }
-        } else if (obj == null && needToRender(obj, part)) {
+        } else if (needToRender(obj, part)) {
             JAXBEncoderDecoder.marshallNullElement(createMarshaller(obj, part),
                                                    output, part);
         }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/DataSourceProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/DataSourceProvider.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/DataSourceProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/DataSourceProvider.java
Mon Jan  9 06:18:49 2012
@@ -36,25 +36,26 @@ import org.apache.cxf.common.util.String
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.jaxrs.ext.multipart.InputStreamDataSource;
 
-public class DataSourceProvider implements MessageBodyReader, MessageBodyWriter {
+public class DataSourceProvider<T> implements MessageBodyReader<T>, MessageBodyWriter<T>
{
     
-    public boolean isReadable(Class type, Type genericType, Annotation[] annotations, MediaType
mt) {
+    public boolean isReadable(Class<?> type, Type genericType, Annotation[] annotations,
MediaType mt) {
         return isSupported(type, mt);
     }
 
-    public Object readFrom(Class cls, Type genericType, Annotation[] annotations, 
-                               MediaType type, MultivaluedMap headers, InputStream is)
+    public T readFrom(Class<T> cls, Type genericType, Annotation[] annotations, 
+                               MediaType type, 
+                               MultivaluedMap<String, String> headers, InputStream
is)
         throws IOException {
         DataSource ds = new InputStreamDataSource(is, type.toString());
-        return DataSource.class.isAssignableFrom(cls) ? ds : new DataHandler(ds);
+        return cls.cast(DataSource.class.isAssignableFrom(cls) ? ds : new DataHandler(ds));
     }
 
-    public long getSize(Object t, Class type, Type genericType, Annotation[] annotations,

+    public long getSize(T t, Class<?> type, Type genericType, Annotation[] annotations,

                         MediaType mt) {
         return -1;
     }
 
-    public boolean isWriteable(Class type, Type genericType, Annotation[] annotations, MediaType
mt) {
+    public boolean isWriteable(Class<?> type, Type genericType, Annotation[] annotations,
MediaType mt) {
         return isSupported(type, mt);
     }
 
@@ -63,8 +64,8 @@ public class DataSourceProvider implemen
             && (DataSource.class.isAssignableFrom(type) || DataHandler.class.isAssignableFrom(type));
     }
     
-    public void writeTo(Object src, Class cls, Type genericType, Annotation[] annotations,

-                        MediaType type, MultivaluedMap headers, OutputStream os)
+    public void writeTo(T src, Class<?> cls, Type genericType, Annotation[] annotations,

+                        MediaType type, MultivaluedMap<String, Object> headers, OutputStream
os)
         throws IOException {
         DataSource ds = DataSource.class.isAssignableFrom(cls) 
             ? (DataSource)src : ((DataHandler)src).getDataSource();
@@ -72,8 +73,9 @@ public class DataSourceProvider implemen
         IOUtils.copy(ds.getInputStream(), os);
     }
     
-    @SuppressWarnings("unchecked")
-    private void setContentTypeIfNeeded(MediaType type, MultivaluedMap headers, String ct)
{
+    private void setContentTypeIfNeeded(MediaType type, 
+        MultivaluedMap<String, Object> headers, String ct) {
+
         if (!StringUtils.isEmpty(ct) && !type.equals(MediaType.valueOf(ct))) { 
             headers.putSingle("Content-Type", ct);
         }

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XPathProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XPathProvider.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XPathProvider.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/XPathProvider.java
Mon Jan  9 06:18:49 2012
@@ -70,7 +70,7 @@ public class XPathProvider implements Me
         globalNamespaces = nsMap;
     }
     
-    public boolean isReadable(Class cls, Type genericType, Annotation[] annotations, MediaType
mediaType) {
+    public boolean isReadable(Class<?> cls, Type genericType, Annotation[] annotations,
MediaType mediaType) {
         
         return globalExpression != null && (className == null 
             || className != null && className.equals(cls.getName()))  

Modified: cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/WrapperClassInInterceptor.java
Mon Jan  9 06:18:49 2012
@@ -73,7 +73,7 @@ public class WrapperClassInInterceptor e
         }        
 
         
-        if (boi != null && boi.isUnwrappedCapable()) {
+        if (boi.isUnwrappedCapable()) {
             BindingOperationInfo boi2 = boi.getUnwrappedOperation();
             OperationInfo op = boi2.getOperationInfo();
             BindingMessageInfo bmi;

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Mon Jan  9 06:18:49 2012
@@ -1511,9 +1511,7 @@ public class HTTPConduit 
                         WorkQueueManager mgr = outMessage.getExchange().get(Bus.class)
                             .getExtension(WorkQueueManager.class);
                         AutomaticWorkQueue qu = mgr.getNamedWorkQueue("http-conduit");
-                        if (ex == null) {
-                            qu = mgr.getAutomaticWorkQueue();
-                        }
+                        qu = mgr.getAutomaticWorkQueue();
                         qu.execute(runnable, 5000);
                     } else {
                         outMessage.getExchange().put(Executor.class.getName() 

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/auth/DigestAuthSupplier.java
Mon Jan  9 06:18:49 2012
@@ -46,7 +46,7 @@ public class DigestAuthSupplier implemen
         try {
             md = MessageDigest.getInstance("MD5");
         } catch (NoSuchAlgorithmException e) {
-            md = null;
+            //ignore - set to null
         }
         md5Helper = md;
     }

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/UsernameTokenBuilder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/UsernameTokenBuilder.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/UsernameTokenBuilder.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/builders/UsernameTokenBuilder.java
Mon Jan  9 06:18:49 2012
@@ -65,7 +65,6 @@ public class UsernameTokenBuilder implem
                 for (int i = 0; i < children.getLength(); i++) {
                     Node child = children.item(i);
                     if (child instanceof Element) {
-                        child = child;
                         QName qname = new QName(child.getNamespaceURI(), child.getLocalName());
                         if (SPConstants.USERNAME_TOKEN10.equals(qname.getLocalPart())) {
                             usernameToken.setUseUTProfile10(true);

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/PolicyBasedWSS4JInInterceptor.java
Mon Jan  9 06:18:49 2012
@@ -138,12 +138,10 @@ public class PolicyBasedWSS4JInIntercept
                 if (url == null) {
                     url = new URL((String)o);
                 }
-                if (url != null) {
-                    properties = new Properties();
-                    InputStream ins = url.openStream();
-                    properties.load(ins);
-                    ins.close();
-                }
+                properties = new Properties();
+                InputStream ins = url.openStream();
+                properties.load(ins);
+                ins.close();
             } catch (IOException e) {
                 properties = null;
             }

Modified: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/corba/CorbaTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/corba/CorbaTest.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/corba/CorbaTest.java
(original)
+++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/corba/CorbaTest.java
Mon Jan  9 06:18:49 2012
@@ -86,7 +86,6 @@ public class CorbaTest extends AbstractB
         try {
             port.pingMe("USER");
         } catch (PingMeFault pe) {
-            assertTrue("Caught right exception ", pe != null);
             return;
         }
         fail("Didn't catch an exception");

Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/URIParserUtil.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/URIParserUtil.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/URIParserUtil.java (original)
+++ cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/URIParserUtil.java Mon
Jan  9 06:18:49 2012
@@ -276,9 +276,7 @@ public final class URIParserUtil {
                 return escapeChars(uri.replace("\\", "/"));
             }
         } catch (URISyntaxException e) {
-            if (url != null) {
-                result = escapeChars(url.toString().replace("\\", "/"));
-            }
+            result = escapeChars(url.toString().replace("\\", "/"));
         }
         return result;
     }

Modified: cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java?rev=1229038&r1=1229037&r2=1229038&view=diff
==============================================================================
--- cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
(original)
+++ cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
Mon Jan  9 06:18:49 2012
@@ -333,8 +333,7 @@ public class WSDLToCorbaHelper {
                                           elementQualified);
             memName = createQNameCorbaNamespace(memtype.getQName().getLocalPart());
 
-            if (memtype != null
-                && !isDuplicate(memtype)) {
+            if (!isDuplicate(memtype)) {
                 typeMappingType.getStructOrExceptionOrUnion().add(memtype);
             }
             membertype.setQName(memName);



Mime
View raw message