cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1404550 - in /cxf/trunk: api/src/main/java/org/apache/cxf/configuration/jsse/ api/src/main/java/org/apache/cxf/ws/addressing/ rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/ rt/databinding/jaxb/src/main/java/org/apache/cxf/ja...
Date Thu, 01 Nov 2012 12:03:05 GMT
Author: coheigea
Date: Thu Nov  1 12:03:04 2012
New Revision: 1404550

URL: http://svn.apache.org/viewvc?rev=1404550&view=rev
Log:
More cleanup

Modified:
    cxf/trunk/api/src/main/java/org/apache/cxf/configuration/jsse/TLSClientParametersConfig.java
    cxf/trunk/api/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java
    cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AegisType.java
    cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/AsymmetricBinding.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SupportingToken.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SymmetricBinding.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/TokenWrapper.java
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/TransportBinding.java
    cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLParameter.java
    cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLToCorbaHelper.java
    cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/configuration/jsse/TLSClientParametersConfig.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/configuration/jsse/TLSClientParametersConfig.java?rev=1404550&r1=1404549&r2=1404550&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/configuration/jsse/TLSClientParametersConfig.java
(original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/configuration/jsse/TLSClientParametersConfig.java
Thu Nov  1 12:03:04 2012
@@ -142,14 +142,8 @@ public final class TLSClientParametersCo
         Unmarshaller u;
         try {
             u = getContext().createUnmarshaller();
-            Object obj = u.unmarshal(data, TLSClientParametersType.class);
-            if (obj instanceof JAXBElement<?>) {
-                JAXBElement<?> el = (JAXBElement<?>)obj;
-                obj = el.getValue();
-
-            }
-            
-            TLSClientParametersType cpt = (TLSClientParametersType)obj;
+            JAXBElement<TLSClientParametersType> type = u.unmarshal(data, TLSClientParametersType.class);
+            TLSClientParametersType cpt = type.getValue();
             return createTLSClientParametersFromType(cpt);
         } catch (RuntimeException e) {
             throw e;

Modified: cxf/trunk/api/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java?rev=1404550&r1=1404549&r2=1404550&view=diff
==============================================================================
--- cxf/trunk/api/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java (original)
+++ cxf/trunk/api/src/main/java/org/apache/cxf/ws/addressing/VersionTransformer.java Thu Nov
 1 12:03:04 2012
@@ -438,9 +438,9 @@ public class VersionTransformer {
             return null;
         }
         JAXBContext ctx = getExposedJAXBContext(tns);
-        Object o = ctx.createUnmarshaller().unmarshal(ref, getExposedReferenceType(tns));
-        if (o instanceof JAXBElement) {
-            o = ((JAXBElement<?>)o).getValue();
+        JAXBElement<?> o = ctx.createUnmarshaller().unmarshal(ref, getExposedReferenceType(tns));
+        if (o != null) {
+            return convertToNative(o.getValue());
         }
         return convertToNative(o);
         

Modified: cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AegisType.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AegisType.java?rev=1404550&r1=1404549&r2=1404550&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AegisType.java
(original)
+++ cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/type/AegisType.java
Thu Nov  1 12:03:04 2012
@@ -256,10 +256,9 @@ public abstract class AegisType {
     public String toString() {
         StringBuilder sb = new StringBuilder(getClass().getName());
         sb.append("[class=");
-        Type c = getTypeClass();
-        if (c instanceof Class) {
-            Class<?> plainClass = (Class<?>)c;
-            sb.append(plainClass.getName());
+        Class<?> c = getTypeClass();
+        if (c != null) {
+            sb.append(c.getName());
         } else {
             sb.append("<generic or null>");
         }

Modified: cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java?rev=1404550&r1=1404549&r2=1404550&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
(original)
+++ cxf/trunk/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBEncoderDecoder.java
Thu Nov  1 12:03:04 2012
@@ -965,11 +965,10 @@ public final class JAXBEncoderDecoder {
                 throw new Fault(new Message("UNKNOWN_SOURCE", LOG, source.getClass().getName()));
             }
             while (reader.getName().equals(elName)) {
-                Object obj = u.unmarshal(reader, clazz);
-                if (obj instanceof JAXBElement) {
-                    obj = ((JAXBElement<?>)obj).getValue();
+                JAXBElement<?> type = u.unmarshal(reader, clazz);
+                if (type != null) {
+                    ret.add(type.getValue());
                 }
-                ret.add(obj);
                 while (reader.getEventType() != XMLStreamConstants.START_ELEMENT 
                     && reader.getEventType() != XMLStreamConstants.END_ELEMENT) {
                     reader.nextTag();

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/AsymmetricBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/AsymmetricBinding.java?rev=1404550&r1=1404549&r2=1404550&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/AsymmetricBinding.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/AsymmetricBinding.java
Thu Nov  1 12:03:04 2012
@@ -186,9 +186,9 @@ public class AsymmetricBinding extends S
             all.addPolicyComponent(getLayout());
         }
         ea.addPolicyComponent(all);
-        PolicyComponent pc = p.normalize(builder.getPolicyRegistry(), true);
-        if (pc instanceof Policy) {
-            return (Policy)pc;
+        Policy pc = p.normalize(builder.getPolicyRegistry(), true);
+        if (pc != null) {
+            return pc;
         } else {
             p = new Policy();
             p.addPolicyComponent(pc);

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SupportingToken.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SupportingToken.java?rev=1404550&r1=1404549&r2=1404550&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SupportingToken.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SupportingToken.java
Thu Nov  1 12:03:04 2012
@@ -32,7 +32,6 @@ import org.apache.cxf.ws.security.policy
 import org.apache.neethi.All;
 import org.apache.neethi.ExactlyOne;
 import org.apache.neethi.Policy;
-import org.apache.neethi.PolicyComponent;
 
 public class SupportingToken extends TokenWrapper implements AlgorithmWrapper {
 
@@ -328,9 +327,9 @@ public class SupportingToken extends Tok
         }        
         
         ea.addPolicyComponent(all);
-        PolicyComponent pc = p.normalize(builder.getPolicyRegistry(), true);
-        if (pc instanceof Policy) {
-            return (Policy)pc;
+        Policy pc = p.normalize(builder.getPolicyRegistry(), true);
+        if (pc != null) {
+            return pc;
         } else {
             p = new Policy();
             p.addPolicyComponent(pc);

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SymmetricBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SymmetricBinding.java?rev=1404550&r1=1404549&r2=1404550&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SymmetricBinding.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/SymmetricBinding.java
Thu Nov  1 12:03:04 2012
@@ -136,9 +136,9 @@ public class SymmetricBinding extends Sy
 
         
         ea.addPolicyComponent(all);
-        PolicyComponent pc = p.normalize(builder.getPolicyRegistry(), true);
-        if (pc instanceof Policy) {
-            return (Policy)pc;
+        Policy pc = p.normalize(builder.getPolicyRegistry(), true);
+        if (pc != null) {
+            return pc;
         } else {
             p = new Policy();
             p.addPolicyComponent(pc);

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/TokenWrapper.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/TokenWrapper.java?rev=1404550&r1=1404549&r2=1404550&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/TokenWrapper.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/TokenWrapper.java
Thu Nov  1 12:03:04 2012
@@ -61,9 +61,9 @@ public abstract class TokenWrapper exten
             All all = new All();
             all.addPolicyComponent(token);
             ea.addPolicyComponent(all);
-            PolicyComponent pc = p.normalize(builder.getPolicyRegistry(), true);
-            if (pc instanceof Policy) {
-                return (Policy)pc;
+            Policy pc = p.normalize(builder.getPolicyRegistry(), true);
+            if (pc != null) {
+                return pc;
             } else {
                 p = new Policy();
                 p.addPolicyComponent(pc);

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/TransportBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/TransportBinding.java?rev=1404550&r1=1404549&r2=1404550&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/TransportBinding.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/model/TransportBinding.java
Thu Nov  1 12:03:04 2012
@@ -143,9 +143,9 @@ public class TransportBinding extends Bi
             all.addPolicyComponent(getLayout());
         }
         ea.addPolicyComponent(all);
-        PolicyComponent pc = p.normalize(builder.getPolicyRegistry(), true);
-        if (pc instanceof Policy) {
-            return (Policy)pc;
+        Policy pc = p.normalize(builder.getPolicyRegistry(), true);
+        if (pc != null) {
+            return pc;
         } else {
             p = new Policy();
             p.addPolicyComponent(pc);

Modified: cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLParameter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLParameter.java?rev=1404550&r1=1404549&r2=1404550&view=diff
==============================================================================
--- cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLParameter.java
(original)
+++ cxf/trunk/tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/wsdl/WSDLParameter.java
Thu Nov  1 12:03:04 2012
@@ -451,10 +451,10 @@ public final class WSDLParameter {
             // We need to get annotation information for the schema type we are
             // about to pass in.
             // This is used to produce the correct object reference type.
-            XmlSchemaObject schemaObj = getSchemaObject(wsdlToCorbaBinding, typeName);
+            XmlSchemaElement schemaObj = getSchemaObject(wsdlToCorbaBinding, typeName);
             XmlSchemaAnnotation annotation = null;
-            if (schemaObj instanceof XmlSchemaElement) {
-                annotation = ((XmlSchemaElement)schemaObj).getAnnotation();
+            if (schemaObj != null) {
+                annotation = schemaObj.getAnnotation();
             }
             idltype = getSchemaTypeName(wsdlToCorbaBinding, schemaType, annotation, typeName,
nill);
         }

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=1404550&r1=1404549&r2=1404550&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
Thu Nov  1 12:03:04 2012
@@ -437,7 +437,7 @@ public class WSDLToCorbaHelper {
             }
         }
 
-        if ((type instanceof Struct) && (struct.getMember().size() == 0)) {
+        if ((struct != null) && (struct.getMember().size() == 0)) {
             String msgStr = "Cannot create CORBA Struct" + struct.getName()
                             + "from container with no members";
             org.apache.cxf.common.i18n.Message msg = new org.apache.cxf.common.i18n.Message(

Modified: cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java?rev=1404550&r1=1404549&r2=1404550&view=diff
==============================================================================
--- cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
(original)
+++ cxf/trunk/tools/wsdlto/databinding/jaxb/src/main/java/org/apache/cxf/tools/wsdlto/databinding/jaxb/JAXBDataBinding.java
Thu Nov  1 12:03:04 2012
@@ -806,7 +806,7 @@ public class JAXBDataBinding implements 
                                                                  (String)context.get(ToolConstants.CFG_ENCODING),
                                                                  context.get(OutputStreamCreator.class));
 
-            if (rawJaxbModelGenCode instanceof S2JJAXBModel) {
+            if (rawJaxbModelGenCode != null) {
                 S2JJAXBModel schem2JavaJaxbModel = rawJaxbModelGenCode;
 
                 ClassCollector classCollector = context.get(ClassCollector.class);



Mime
View raw message