cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r608913 - in /incubator/cxf/trunk/tools/corba: ./ src/main/java/org/apache/yoko/tools/ src/main/java/org/apache/yoko/tools/idlpreprocessor/ src/main/java/org/apache/yoko/tools/processors/idl/ src/main/java/org/apache/yoko/tools/processors/w...
Date Fri, 04 Jan 2008 16:40:41 GMT
Author: dkulp
Date: Fri Jan  4 08:40:40 2008
New Revision: 608913

URL: http://svn.apache.org/viewvc?rev=608913&view=rev
Log:
Checkstyle/pmd fixes for corba tooling

Modified:
    incubator/cxf/trunk/tools/corba/   (props changed)
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/IDLToWSDL.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/idlpreprocessor/IdlPreprocessorReader.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/FixedPtConstVisitor.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/IDLToWSDLProcessor.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ModuleToNSMapper.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/OperationVisitor.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/PortTypeVisitor.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/Scope.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ScopedNameVisitor.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/SequenceDeferredAction.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/WSDLASTVisitor.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/WSDLSchemaManager.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLParameter.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaHelper.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToIDLAction.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLTypes.java
    incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/utils/FileOutputStreamFactory.java
    incubator/cxf/trunk/tools/corba/src/test/java/org/apache/yoko/tools/idlpreprocessor/IdlPreprocessorReaderTest.java
    incubator/cxf/trunk/tools/corba/src/test/java/org/apache/yoko/tools/utils/TestWSDLCorbaWriterImpl.java
    incubator/cxf/trunk/tools/corba/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java

Propchange: incubator/cxf/trunk/tools/corba/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Jan  4 08:40:40 2008
@@ -0,0 +1,11 @@
+.pmd
+.checkstyle
+.ruleset
+target
+.settings
+.classpath
+.project
+.wtpmodules
+
+
+

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/IDLToWSDL.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/IDLToWSDL.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/IDLToWSDL.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/IDLToWSDL.java Fri Jan  4 08:40:40 2008
@@ -206,11 +206,10 @@
 
         if (doc.hasParameter(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE)) {
             String sequenceOctetType = doc.getParameter(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE);
-            if (sequenceOctetType != null) {
-                if (!(sequenceOctetType.equals(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE_BASE64BINARY)
-                    || sequenceOctetType.equals(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE_HEXBINARY))) {
-                    errors.add(new ErrorVisitor.UserError("Invalid value specified for -s option"));
-                }
+            if (sequenceOctetType != null
+                && (!(sequenceOctetType.equals(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE_BASE64BINARY)
+                    || sequenceOctetType.equals(ToolCorbaConstants.CFG_SEQUENCE_OCTET_TYPE_HEXBINARY)))) {
+                errors.add(new ErrorVisitor.UserError("Invalid value specified for -s option"));
             }
         }
         if (doc.hasParameter(ToolCorbaConstants.CFG_ADDRESSFILE)) {

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/idlpreprocessor/IdlPreprocessorReader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/idlpreprocessor/IdlPreprocessorReader.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/idlpreprocessor/IdlPreprocessorReader.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/idlpreprocessor/IdlPreprocessorReader.java Fri Jan  4 08:40:40 2008
@@ -142,8 +142,7 @@
         if (buf.length() == 0) {
             return -1;
         } else {
-            char c = buf.charAt(readPos++);
-            return c;
+            return buf.charAt(readPos++);
         }
     }
 
@@ -321,8 +320,7 @@
             return false;
         }
 
-        boolean top = ifStack.peek();
-        return top;
+        return ifStack.peek();
     }
 
     private void registerIf(boolean skip) {

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/FixedPtConstVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/FixedPtConstVisitor.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/FixedPtConstVisitor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/FixedPtConstVisitor.java Fri Jan  4 08:40:40 2008
@@ -36,7 +36,6 @@
     private XmlSchemaType schemaType;
     private CorbaTypeImpl corbaType;
     private Scope scope;
-    private Scope moduleScope;
     private XmlSchemaCollection schemas;
     
     

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/IDLToWSDLProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/IDLToWSDLProcessor.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/IDLToWSDLProcessor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/IDLToWSDLProcessor.java Fri Jan  4 08:40:40 2008
@@ -45,6 +45,7 @@
 
 import antlr.collections.AST;
 
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.tools.common.ToolConstants;
 import org.apache.cxf.tools.common.ToolException;
 import org.apache.cxf.tools.util.FileWriterUtil;
@@ -311,7 +312,6 @@
             assert importSchemaWriters.size() == schemas.size();
         }
         
-        int count = 0;
         for (java.util.Iterator<File> it = defns.keySet().iterator(); it.hasNext();) {
             File file = it.next();
             Definition defn = defns.get(file);
@@ -370,12 +370,6 @@
         return null;
     }
     
-    // check if file has a fully qualified path
-    private boolean isFQPath(String ifile) {
-        File file = new File(ifile);
-        return file.isAbsolute();
-    }
-    
     private Writer createOutputWriter(String name) throws Exception {        
         String outDir = outputDir;
         String filename = name;               
@@ -403,12 +397,12 @@
     
     public Writer getOutputWriter(String filename, String outputDirectory) throws Exception {
 
-        FileWriterUtil fw = new FileWriterUtil(outputDirectory);        
         
         if (env.optionSet(ToolCorbaConstants.CFG_WSDL_ENCODING)) { 
             String encoding = env.get(ToolCorbaConstants.CFG_WSDL_ENCODING).toString();            
-            return fw.getWriter(new File(outputDirectory, filename), encoding); 
+            return FileWriterUtil.getWriter(new File(outputDirectory, filename), encoding); 
         } else {
+            FileWriterUtil fw = new FileWriterUtil(outputDirectory);        
             return fw.getWriter("", filename); 
         }       
     }
@@ -570,7 +564,8 @@
                             
                             // add the import and the prefix to the definition
                             def.getTypes().addExtensibilityElement(wsdlSchema);
-                            def.getNamespaces().put(ReferenceConstants.WSADDRESSING_PREFIX, typeNamespace);
+                            CastUtils.cast(def.getNamespaces(), String.class, String.class)
+                                .put(ReferenceConstants.WSADDRESSING_PREFIX, typeNamespace);
                         } else if (!namespaces.contains(typeNamespace)) {
                             String prefix = getModulePrefixForNamespace(userModuleMappings, mapper, 
                                                                         typeNamespace);
@@ -583,7 +578,8 @@
                                 + prefix + ".xsd";
                             manager.addWSDLSchemaImport(def, typeNamespace, importFile);
                             manager.getImportedXmlSchemas().put(new File(importFile), schema);
-                            def.getNamespaces().put(prefix, typeNamespace);
+                            CastUtils.cast(def.getNamespaces(), String.class, String.class)
+                                .put(prefix, typeNamespace);
                         }
                     } catch (Exception ex) {
                         throw new ToolException("Unable to add schema import for namespace"

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ModuleToNSMapper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ModuleToNSMapper.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ModuleToNSMapper.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ModuleToNSMapper.java Fri Jan  4 08:40:40 2008
@@ -61,7 +61,7 @@
         return exModules;
     }
 
-    public Iterator getExcludedModules() {
+    public Iterator<String> getExcludedModules() {
         return exModules.keySet().iterator();
     }
 
@@ -96,7 +96,7 @@
                        && currentScope != currentScope.getParent()) {
                     parentURI = userMap.get(currentScope.toString(separator));
                     if (parentURI == null) {
-                        if (!uri.equals("")) {
+                        if (!"".equals(uri)) {
                             uri = "/" + uri;
                         }
                         uri = currentScope.tail() + uri;

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/OperationVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/OperationVisitor.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/OperationVisitor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/OperationVisitor.java Fri Jan  4 08:40:40 2008
@@ -59,7 +59,7 @@
     
     private static final String IN_PARAMETER = "inparameter";
     private static final String OUT_PARAMETER = "outparameter";
-    private static final String INOUT_PARAMETER = "inoutparameter";
+    //private static final String INOUT_PARAMETER = "inoutparameter";
     private static final String RETURN_PARAMETER = "return";
     
     private ExtensionRegistry extReg;
@@ -69,8 +69,6 @@
     private Message inputMsg;
     private Message outputMsg;
     
-    private Part inputPart;
-    private Part outputPart;
     
     private OperationType corbaOperation;
     
@@ -140,7 +138,7 @@
                                                                   operation.getName()),
                                                         inputWrappingSequence);
         inputMsg = generateInputMessage(operation, bindingOperation);
-        inputPart = generateInputPart(inputMsg, inputElement);
+        generateInputPart(inputMsg, inputElement);
 
         // <op_attribute>
         node = node.getFirstChild();
@@ -158,7 +156,7 @@
                                                       operation.getName() + RESPONSE_SUFFIX),
                                             outputWrappingSequence);
             outputMsg = generateOutputMessage(operation, bindingOperation);
-            outputPart = generateOutputPart(outputMsg, outputElement);           
+            generateOutputPart(outputMsg, outputElement);           
         }
         
         // <op_type_spec>

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/PortTypeVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/PortTypeVisitor.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/PortTypeVisitor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/PortTypeVisitor.java Fri Jan  4 08:40:40 2008
@@ -362,7 +362,9 @@
                                                     manager.getImportedWSDLDefinitionFile(outputNS));
                 }
                 
-                for (Iterator<Fault> faults = op.getFaults().values().iterator(); faults.hasNext();) {
+                for (Iterator<Fault> faults = CastUtils.cast(op.getFaults().values().iterator());
+                    faults.hasNext();) {
+                    
                     String faultNS = faults.next().getMessage().getQName().getNamespaceURI();
                     manager.addWSDLDefinitionNamespace(definition, mapper.mapNSToPrefix(faultNS), faultNS);
                     // Make sure we import the wsdl for the fault namespace
@@ -379,7 +381,8 @@
             }
 
             //add all the binding extensions of the inherited corba binding
-            for (Iterator<BindingOperation> it = inheritedBinding.getBindingOperations().iterator();
+            for (Iterator<BindingOperation> it = 
+                    CastUtils.cast(inheritedBinding.getBindingOperations().iterator());
                  it.hasNext();) {
                 binding.addBindingOperation(it.next());
             }
@@ -387,8 +390,8 @@
         }
         
         if ((!inheritedScopes.isEmpty()) 
-            && (wsdlVisitor.getTreeMap() != null)) {
-            wsdlVisitor.getTreeMap().put(childScope, inheritedScopes);             
+            && (wsdlVisitor.getInheritedScopeMap() != null)) {
+            wsdlVisitor.getInheritedScopeMap().put(childScope, inheritedScopes);             
         }
         
         return interfaceInheritanceSpecNode.getNextSibling();

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/Scope.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/Scope.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/Scope.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/Scope.java Fri Jan  4 08:40:40 2008
@@ -117,7 +117,7 @@
     }
 
     public boolean equals(Object otherScope) {
-        if (otherScope != null && otherScope instanceof Scope) {
+        if (otherScope instanceof Scope) {
             return toString().equals(((Scope)otherScope).toString());   
         } else {
             return false;

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ScopedNameVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ScopedNameVisitor.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ScopedNameVisitor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/ScopedNameVisitor.java Fri Jan  4 08:40:40 2008
@@ -374,7 +374,7 @@
                                                           VisitorTypeHolder holder) {
 
         boolean result = false;                
-        List<Scope> baseScopes = (List<Scope>)wsdlVisitor.getTreeMap().get(scope);
+        List<Scope> baseScopes = (List<Scope>)wsdlVisitor.getInheritedScopeMap().get(scope);
         if (baseScopes != null) {
             List<Scope> scopeList = new ArrayList<Scope>();
             for (Scope scopeName : baseScopes) {
@@ -406,7 +406,7 @@
                 result = findScopeSchemaType(scopedName, schemaRef, wsdlVisitor, holder);
                 if (!result) {
                     inheritedList.remove(inheritScope);
-                    List<Scope> scopes = (List<Scope>)wsdlVisitor.getTreeMap().get(inheritScope);
+                    List<Scope> scopes = wsdlVisitor.getInheritedScopeMap().get(inheritScope);
                     if (scopes != null) {
                         for (Scope scopeName : scopes) {
                             inheritedList.add(scopeName);
@@ -541,13 +541,11 @@
     }     
     
     protected static boolean isFullyScopedName(AST node) {
-        if (node.getType() == IDLTokenTypes.IDENT) {
-            if (node.getFirstChild() != null) {
-                if ((node.getFirstChild().getType() == IDLTokenTypes.SCOPEOP)
-                    || (node.getFirstChild().getType() == IDLTokenTypes.IDENT)) {
-                    return true;
-                }
-            }
+        if (node.getType() == IDLTokenTypes.IDENT
+            && node.getFirstChild() != null
+            && ((node.getFirstChild().getType() == IDLTokenTypes.SCOPEOP)
+                || (node.getFirstChild().getType() == IDLTokenTypes.IDENT))) {
+            return true;
         }
         return false;
     }

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/SequenceDeferredAction.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/SequenceDeferredAction.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/SequenceDeferredAction.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/SequenceDeferredAction.java Fri Jan  4 08:40:40 2008
@@ -79,11 +79,10 @@
                 element.setNillable(true);
             }
         }        
-        if (schemas != null) {
-            if (schemas.getTypeByQName(stype.getQName()) == null) {
-                schema.getItems().add(stype);
-                schema.addType(stype);
-            }
+        if (schemas != null
+            && schemas.getTypeByQName(stype.getQName()) == null) {
+            schema.getItems().add(stype);
+            schema.addType(stype);
         }
     }
         

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/WSDLASTVisitor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/WSDLASTVisitor.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/WSDLASTVisitor.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/WSDLASTVisitor.java Fri Jan  4 08:40:40 2008
@@ -51,7 +51,7 @@
 import org.apache.yoko.tools.common.WSDLUtils;
 import org.apache.yoko.wsdl.CorbaConstants;
 
-public class WSDLASTVisitor implements ASTVisitor {
+public final class WSDLASTVisitor implements ASTVisitor {
 
     Definition definition;    
     XmlSchema schema;
@@ -73,7 +73,7 @@
     private boolean schemaGenerated;
     private ModuleToNSMapper moduleToNSMapper;    
     private WSDLSchemaManager manager;
-    private Map treeMap;
+    private Map<Scope, List<Scope>> inheritScopeMap;
 
     public WSDLASTVisitor(String tns, String schemans, String corbatypemaptns)
         throws WSDLException, JAXBException {
@@ -82,7 +82,7 @@
 
         definition = manager.createWSDLDefinition(tns);
         
-        treeMap = new TreeMap();
+        inheritScopeMap = new TreeMap<Scope, List<Scope>>();
 
         targetNamespace = tns;
         schemas = new XmlSchemaCollection();
@@ -164,8 +164,8 @@
         return idlFile;
     }
     
-    public Map getTreeMap() {
-        return treeMap;
+    public Map<Scope, List<Scope>> getInheritedScopeMap() {
+        return inheritScopeMap;
     }
     
     public void setOutputDir(String outDir) {
@@ -378,7 +378,7 @@
         while (iter.hasNext()) {
             String namespace = (String)iter.next();
             String prefix = definition.getPrefix(namespace);
-            if (!prefix.equals("corba")) {
+            if (!"corba".equals(prefix)) {
                 def.addNamespace(prefix, namespace);
             } else {
                 def.removeNamespace(prefix);

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/WSDLSchemaManager.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/WSDLSchemaManager.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/WSDLSchemaManager.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/idl/WSDLSchemaManager.java Fri Jan  4 08:40:40 2008
@@ -40,6 +40,7 @@
 import javax.xml.bind.JAXBException;
 import javax.xml.namespace.QName;
 
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.wsdl.JAXBExtensionHelper;
 import org.apache.cxf.wsdl.WSDLConstants;
 import org.apache.schemas.yoko.bindings.corba.AddressType;
@@ -238,10 +239,9 @@
         if (!wsdlSchema.getImports().containsKey(tns)) {
             SchemaImport schemaimport =  wsdlSchema.createImport();
             schemaimport.setNamespaceURI(tns);
-            if (file != null) {
-                if (!ignoreImports) {
-                    schemaimport.setSchemaLocationURI(file.toURI().toString());
-                }
+            if (file != null
+                && !ignoreImports) {
+                schemaimport.setSchemaLocationURI(file.toURI().toString());
             }
             wsdlSchema.addImport(schemaimport);
         }
@@ -316,14 +316,13 @@
         wsdlSchema.setElement(el);
         
         XmlSchemaObjectCollection imports = schema.getIncludes();
-        for (java.util.Iterator<XmlSchemaObject> it = imports.getIterator(); it.hasNext();) {
+        for (java.util.Iterator<XmlSchemaObject> it = CastUtils.cast(imports.getIterator()); it.hasNext();) {
             XmlSchemaImport xmlSchemaImport = (XmlSchemaImport) it.next();
             SchemaImport schemaimport =  wsdlSchema.createImport();
             schemaimport.setNamespaceURI(xmlSchemaImport.getNamespace());
-            if (xmlSchemaImport.getSchemaLocation() != null) {
-                if (!ignoreImports) {
-                    schemaimport.setSchemaLocationURI(xmlSchemaImport.getSchemaLocation());
-                }
+            if (xmlSchemaImport.getSchemaLocation() != null
+                && !ignoreImports) {
+                schemaimport.setSchemaLocationURI(xmlSchemaImport.getSchemaLocation());
             }
             wsdlSchema.addImport(schemaimport);  
         }

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLParameter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLParameter.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLParameter.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLParameter.java Fri Jan  4 08:40:40 2008
@@ -385,27 +385,23 @@
 
                 while (it.hasNext()) {
                     ParamType d3 = (ParamType) it.next();
-                    if (!d3.getName().equals(d2.getName())) {
-                        if ((!simpleOrdering)
-                                && (!d3.getMode().value().equals("inout"))) {
-                            // the in/outs are in a different order in the
-                            // output than the input
-                            // we'll try and use the input oder for the INOUT's,
-                            // but also try and
-                            // maintain some sort of ordering for the OUT's
-                            it.remove();
-                            inputit.previous();
-                            inputit.add(d3);
-                            inputit.next();
-                        }
+                    if (!d3.getName().equals(d2.getName()) 
+                        && (!simpleOrdering)
+                        && (!d3.getMode().value().equals("inout"))) {
+                        // the in/outs are in a different order in the
+                        // output than the input
+                        // we'll try and use the input oder for the INOUT's,
+                        // but also try and
+                        // maintain some sort of ordering for the OUT's
+                        it.remove();
+                        inputit.previous();
+                        inputit.add(d3);
+                        inputit.next();
                     }
                 }
             }
         }
-        ListIterator<ParamType> it = outputs.listIterator();
-        while (it.hasNext()) {
-            ParamType d3 = (ParamType) it.next();
-
+        for (ParamType d3 : outputs) {
             inputs.add(d3);
         }
     }

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaBinding.java Fri Jan  4 08:40:40 2008
@@ -51,6 +51,7 @@
 import org.w3c.dom.NodeList;
 
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.tools.common.ToolException;
 import org.apache.cxf.wsdl.JAXBExtensionHelper;
 import org.apache.schemas.yoko.bindings.corba.AddressType;
@@ -96,7 +97,7 @@
     String address;
     String addressFile;
     WSDLParameter wsdlParameter;
-    List<Object> bindingNames;
+    List<String> bindingNames;
     List<XmlSchema> xmlSchemaList;
     WSDLToTypeProcessor typeProcessor = new WSDLToTypeProcessor();
     private boolean allbindings;
@@ -268,7 +269,7 @@
             addExtensions(extReg);
         }
 
-        bindingNames = new ArrayList<Object>();
+        bindingNames = new ArrayList<String>();
         String interfaceName = portType.getQName().getLocalPart();
         String bname = getMappedBindingName(interfaceName);
     
@@ -284,14 +285,14 @@
             setBindingName(bname);
             bqname = new QName(definition.getTargetNamespace(), bname, prefix);
             int count = 0;
-            while (helper.queryBinding(definition, bqname)) {
+            while (WSDLToCorbaHelper.queryBinding(definition, bqname)) {
                 bname = bname + count;
                 bqname = new QName(definition.getTargetNamespace(), bname, prefix);
             }
         } else {
             bqname = new QName(definition.getTargetNamespace(), bname, prefix);
             // Check if the Binding with name already exists
-            if (helper.queryBinding(definition, bqname)) {
+            if (WSDLToCorbaHelper.queryBinding(definition, bqname)) {
                 String msgStr = "Binding " + bqname.getLocalPart() 
                     + " already exists in WSDL.";
                 org.apache.cxf.common.i18n.Message msg = 
@@ -321,9 +322,9 @@
         try {
             bindingType = (BindingType)extReg
                 .createExtension(Binding.class, CorbaConstants.NE_CORBA_BINDING);
-            bindingType.setRepositoryID(helper.REPO_STRING
+            bindingType.setRepositoryID(WSDLToCorbaHelper.REPO_STRING
                                         + binding.getPortType().getQName().getLocalPart().replace('.', '/')
-                                        + helper.IDL_VERSION);
+                                        + WSDLToCorbaHelper.IDL_VERSION);
 
             binding.addExtensibilityElement(bindingType);
         } catch (WSDLException ex) {
@@ -409,7 +410,7 @@
     private void addBindingOperations(Definition definition, PortType portType, Binding binding) 
         throws Exception {
         
-        List<Operation> ops = (List<javax.wsdl.Operation>)portType.getOperations();
+        List<Operation> ops = CastUtils.cast(portType.getOperations());
         for (Operation op : ops) {
             BindingOperation bindingOperation = definition.createBindingOperation();
             addCorbaOperationExtElement(bindingOperation, op);
@@ -562,10 +563,9 @@
             boolean anonymous = WSDLTypes.isAnonymous(type.getName());
             corbaTypeImpl = helper.convertSchemaToCorbaType(type, type.getQName(), null, 
                                                             null, anonymous);
-            if (corbaTypeImpl != null) {
-                if (!helper.isDuplicate(corbaTypeImpl)) {
-                    typeMappingType.getStructOrExceptionOrUnion().add(corbaTypeImpl);
-                } 
+            if (corbaTypeImpl != null
+                && !helper.isDuplicate(corbaTypeImpl)) {
+                typeMappingType.getStructOrExceptionOrUnion().add(corbaTypeImpl);
             }                   
         }
         addCorbaElements(corbaTypeImpl, xmlSchemaTypes);
@@ -638,10 +638,9 @@
                                                                isQualified);
                 } 
 
-                if (corbaTypeImpl != null) { 
-                    if (!helper.isDuplicate(corbaTypeImpl)) {
-                        typeMappingType.getStructOrExceptionOrUnion().add(corbaTypeImpl);
-                    }
+                if (corbaTypeImpl != null
+                    && !helper.isDuplicate(corbaTypeImpl)) {
+                    typeMappingType.getStructOrExceptionOrUnion().add(corbaTypeImpl);
                 }
             }                   
         }
@@ -710,7 +709,9 @@
         } else {
             // Set the repository ID for Exception
             // add to CorbaTypeMapping
-            String repoId = helper.REPO_STRING + corbaex.getName().replace('.', '/') + helper.IDL_VERSION;
+            String repoId = WSDLToCorbaHelper.REPO_STRING 
+                + corbaex.getName().replace('.', '/') 
+                + WSDLToCorbaHelper.IDL_VERSION;
             corbaex.setRepositoryID(repoId);
             CorbaTypeImpl corbaTypeImpl = (CorbaTypeImpl)corbaex;
             if (!helper.isDuplicate(corbaTypeImpl)) {
@@ -740,10 +741,10 @@
             corbaex.setType(helper.checkPrefix(schemaTypeName));
             corbaex.setName(schemaTypeName.getLocalPart());
 
-            corbaex.setRepositoryID(helper.REPO_STRING
+            corbaex.setRepositoryID(WSDLToCorbaHelper.REPO_STRING
                                     + "/"
                                     + defaultName.getLocalPart()
-                                    + helper.IDL_VERSION);
+                                    + WSDLToCorbaHelper.IDL_VERSION);
             String uri = defaultName.getNamespaceURI();
             List attributeMembers = helper.processAttributesAsMembers(complex.getAttributes().getIterator(),
                                                                       uri);
@@ -823,7 +824,7 @@
         return (String)bindingNameMap.get(interfaceName);
     }
 
-    public List getGeneratedBindingNames() {
+    public List<String> getGeneratedBindingNames() {
         return bindingNames;
     }
 

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaHelper.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaHelper.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaHelper.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToCorbaHelper.java Fri Jan  4 08:40:40 2008
@@ -183,10 +183,9 @@
                 CorbaTypeImpl memberType =
                     processSequenceType(sequence, defaultName, schemaTypeName);          
                 QName typeName = memberType.getQName();
-                if (memberType instanceof Struct) {
-                    if (memberType != null && !isDuplicate(memberType)) {
-                        typeMappingType.getStructOrExceptionOrUnion().add(memberType);
-                    }                    
+                if (memberType instanceof Struct
+                    && !isDuplicate(memberType)) {
+                    typeMappingType.getStructOrExceptionOrUnion().add(memberType);
                 }                
                 MemberType member = new MemberType(); 
                 member.setName(memberType.getName() + "_f");
@@ -210,13 +209,7 @@
                 members.add(member);
             } else if (container instanceof XmlSchemaElement) {
                 XmlSchemaElement element = (XmlSchemaElement)container;
-                //REVISIT, passing ns uri because of a bug in XmlSchema (Bug: WSCOMMONS-69)
-                String uri;
-                if (schemaTypeName != null) {
-                    uri = schemaTypeName.getNamespaceURI();
-                } else {
-                    uri = defaultName.getNamespaceURI();
-                }
+
                 CorbaTypeImpl corbatype = processLocalElement(element, schemaTypeName.getNamespaceURI());
                 QName elName = element.getQName();
                 if (elName == null) {
@@ -292,10 +285,9 @@
                 createArray(name, corbatype.getQName(), corbatype.getQName(),
                             choice.getMaxOccurs(), choice.getMinOccurs(), false);
             
-            if (arrayType != null) {
-                if (!isDuplicate(arrayType)) {
-                    typeMappingType.getStructOrExceptionOrUnion().add(arrayType);
-                }
+            if (arrayType != null
+                && !isDuplicate(arrayType)) {
+                typeMappingType.getStructOrExceptionOrUnion().add(arrayType);
             }
         }
         return corbatype;
@@ -337,10 +329,9 @@
                                           elementQualified);
             memName = createQNameCorbaNamespace(memtype.getQName().getLocalPart());
                                     
-            if (memtype != null) {                          
-                if (!isDuplicate(memtype)) {
-                    typeMappingType.getStructOrExceptionOrUnion().add(memtype);
-                }
+            if (memtype != null
+                && !isDuplicate(memtype)) {
+                typeMappingType.getStructOrExceptionOrUnion().add(memtype);
             }
             membertype.setQName(memName);
             membertype.setName(memtype.getName());
@@ -370,10 +361,9 @@
             membertype.setQName(arraytype.getQName());
             membertype.setType(arraytype.getType());
                         
-            if (arraytype != null) {                
-                if (!isDuplicate(arraytype)) {
-                    typeMappingType.getStructOrExceptionOrUnion().add(arraytype);               
-                }                
+            if (arraytype != null
+                && !isDuplicate(arraytype)) {
+                typeMappingType.getStructOrExceptionOrUnion().add(arraytype);               
             }                   
         }
         membertype.setQualified(elementQualified);
@@ -438,10 +428,9 @@
             CorbaTypeImpl atype = createArray(name, type.getQName(), type.getQName(),
                                               seq.getMaxOccurs(), seq.getMinOccurs(), false);
             
-            if (atype != null) {
-                if (!isDuplicate(atype)) {
-                    typeMappingType.getStructOrExceptionOrUnion().add(atype);               
-                }
+            if (atype != null
+                && !isDuplicate(atype)) {
+                typeMappingType.getStructOrExceptionOrUnion().add(atype);               
             }
         }
         
@@ -500,10 +489,9 @@
                 type = WSDLTypes.getOctetCorbaType(name, typeName, 0);
                 corbatype = WSDLTypes.getOctetCorbaType(name, typeName, 0);
             }
-            if (type != null) {
-                if (!isDuplicate(type)) {
-                    typeMappingType.getStructOrExceptionOrUnion().add(type);
-                }
+            if (type != null
+                && !isDuplicate(type)) {
+                typeMappingType.getStructOrExceptionOrUnion().add(type);
             }
         }
         return corbatype;
@@ -892,10 +880,11 @@
                     // it's a literal array
                     array = true;
                 }                
-                if (el.getMaxOccurs() == 1 && el.getMinOccurs() == 1) {
-                    if (type.getName() != null &&  WSDLTypes.isAnonymous(type.getName())) {                
-                        array = true;
-                    }
+                if (el.getMaxOccurs() == 1 
+                    && el.getMinOccurs() == 1
+                    && type.getName() != null 
+                    &&  WSDLTypes.isAnonymous(type.getName())) {                
+                    array = true;
                 }
             }
         }
@@ -1350,10 +1339,9 @@
                                             arrayType.getQName(),
                                             isQualified);
             typeName = createQNameCorbaNamespace(arrayType.getQName().getLocalPart());
-            if (arrayType != null) {
-                if (!isDuplicate(arrayType)) {
-                    typeMappingType.getStructOrExceptionOrUnion().add(arrayType);
-                }
+            if (arrayType != null
+                && !isDuplicate(arrayType)) {
+                typeMappingType.getStructOrExceptionOrUnion().add(arrayType);
             }
         }
         
@@ -1543,10 +1531,9 @@
             while (i.hasNext()) {
                 CorbaTypeImpl type = (CorbaTypeImpl)i.next();
                 if (corbaName.equals(type.getName())
-                                     && corbaType.equals(type.getType().getLocalPart())) {                    
-                    if (type instanceof Struct) {                        
-                        return type;
-                    }
+                    && corbaType.equals(type.getType().getLocalPart())
+                    && type instanceof Struct) {                        
+                    return type;
                 }
             }
         }
@@ -1598,13 +1585,10 @@
     }
     
     private boolean isAddressingNamespace(QName typeName) {
-        if ((typeName != null) && (!isIDLObjectType(typeName))) {
-            if (typeName.getNamespaceURI().equals(ReferenceConstants.REFERENCE_NAMESPACE)
-                || typeName.getNamespaceURI().equals(ReferenceConstants.WSADDRESSING_NAMESPACE)) {
-                return true;
-            }
-        }
-        return false;
+        return (typeName != null) 
+                && (!isIDLObjectType(typeName))
+                && (typeName.getNamespaceURI().equals(ReferenceConstants.REFERENCE_NAMESPACE)
+                || typeName.getNamespaceURI().equals(ReferenceConstants.WSADDRESSING_NAMESPACE));
     }
 
     protected static boolean queryBinding(Definition definition, QName bqname) {

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToIDLAction.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToIDLAction.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToIDLAction.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLToIDLAction.java Fri Jan  4 08:40:40 2008
@@ -99,8 +99,8 @@
     private static String bindingName;
     private static String wsdlFileName;
     private static String namespace;
-    private static boolean verboseOn;
     private String outputFile;
+    private boolean verboseOn;
     private PrintWriter printWriter;
     private OutputStreamFactory factory = new FileOutputStreamFactory();
     private Definition def;
@@ -480,10 +480,10 @@
             // since it is not a type we need to define in our IDL.  This only happens when the 
             // name is "CORBA", we have a name array of length 2 and we are at the beginning of the
             // name array.
-            if (dotScopedName.equals("CORBA") && name.length == 2 && i == 0) {
-                if (name[i + 1].equals("Object")) {
-                    break;
-                }
+            if ("CORBA".equals(dotScopedName)
+                && name.length == 2 && i == 0
+                && name[1].equals("Object")) {
+                break;
             }
             
             IdlDefn idlDef = scope.lookup(name[i]);
@@ -547,10 +547,9 @@
             result = checkAnon(corbaTypeImpl, scope, local);                                    
         } 
         
-        if (result == null) {
-            if (corbaTypeImpl instanceof Object) {
-                result = createInterface(corbaTypeImpl, scope, local);            
-            }
+        if (result == null
+            && corbaTypeImpl instanceof Object) {
+            result = createInterface(corbaTypeImpl, scope, local);            
         }
         
         return result; 
@@ -582,7 +581,7 @@
         if (binding != null) {
             IdlDefn defn = scope.lookup(local);
 
-            if (defn != null && defn instanceof IdlInterface) {
+            if (defn instanceof IdlInterface) {
                 return (IdlInterface)defn;
             } else if (defn == null) {
                 try {
@@ -889,6 +888,9 @@
 
     public void setVerboseOn(boolean verbose) {
         verboseOn = verbose;
+    }
+    public boolean isVerboseOn() {
+        return verboseOn;
     }
 
     public void setBindingName(String bindName) {

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLTypes.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLTypes.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLTypes.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/processors/wsdl/WSDLTypes.java Fri Jan  4 08:40:40 2008
@@ -63,7 +63,7 @@
 
 public final class WSDLTypes {
     
-    protected static final Logger LOG = LogUtils.getL7dLogger(WSDLTypes.class);
+    private static final Logger LOG = LogUtils.getL7dLogger(WSDLTypes.class);
 
     private WSDLTypes() {
     }
@@ -433,11 +433,10 @@
             StringTokenizer strtok = new StringTokenizer(typeName, ".");
             for (int i = 0; strtok.hasMoreTokens(); ++i) {
                 String token = strtok.nextToken();
-                if (token.startsWith("_")) {                    
-                    if (Character.isDigit(token.charAt(1))) {
-                        anonymous = true;
-                        break;
-                    }                    
+                if (token.startsWith("_")
+                    && Character.isDigit(token.charAt(1))) {
+                    anonymous = true;
+                    break;
                 }
             }
         }

Modified: incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/utils/FileOutputStreamFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/utils/FileOutputStreamFactory.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/utils/FileOutputStreamFactory.java (original)
+++ incubator/cxf/trunk/tools/corba/src/main/java/org/apache/yoko/tools/utils/FileOutputStreamFactory.java Fri Jan  4 08:40:40 2008
@@ -115,7 +115,7 @@
         throws IOException {
         String packageDirName = convertPackageNameToDirectory(packageName);
 
-        if ((!packageDirName.equals("")) && (!packageDirName.endsWith(File.separator))) {
+        if ((!"".equals(packageDirName)) && (!packageDirName.endsWith(File.separator))) {
             packageDirName += File.separator;
         }
 
@@ -129,7 +129,7 @@
         throws IOException {
         String packageDirName = convertPackageNameToDirectory(packageName);
 
-        if ((!packageDirName.equals("")) && (!packageDirName.endsWith(File.separator))) {
+        if ((!"".equals(packageDirName)) && (!packageDirName.endsWith(File.separator))) {
             packageDirName += File.separator;
         }
 
@@ -139,7 +139,7 @@
             dname = dirName + packageDirName;
         }
         
-        if ((!dname.equals("")) && (!dname.equals("."))) {
+        if ((!"".equals(dname)) && (!".".equals(dname))) {
             File file = new File(dname);
             file.mkdirs();
         }
@@ -193,7 +193,7 @@
     public boolean isOutputStreamExists(String packageName, String name) {
         String dname = getClassDirectory(packageName);
 
-        if ((!dname.equals("")) && (!dname.endsWith(File.separator))) {
+        if ((!"".equals(dname)) && (!dname.endsWith(File.separator))) {
             dname += File.separator;
         }
 

Modified: incubator/cxf/trunk/tools/corba/src/test/java/org/apache/yoko/tools/idlpreprocessor/IdlPreprocessorReaderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/test/java/org/apache/yoko/tools/idlpreprocessor/IdlPreprocessorReaderTest.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/test/java/org/apache/yoko/tools/idlpreprocessor/IdlPreprocessorReaderTest.java (original)
+++ incubator/cxf/trunk/tools/corba/src/test/java/org/apache/yoko/tools/idlpreprocessor/IdlPreprocessorReaderTest.java Fri Jan  4 08:40:40 2008
@@ -35,8 +35,7 @@
 
     private URL findTestResource(String spec) {
         String location = "/idlpreprocessor/" + spec;
-        URL url = getClass().getResource(location);
-        return url;
+        return getClass().getResource(location);
     }
 
     private class ClassPathIncludeResolver implements IncludeResolver {

Modified: incubator/cxf/trunk/tools/corba/src/test/java/org/apache/yoko/tools/utils/TestWSDLCorbaWriterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/test/java/org/apache/yoko/tools/utils/TestWSDLCorbaWriterImpl.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/test/java/org/apache/yoko/tools/utils/TestWSDLCorbaWriterImpl.java (original)
+++ incubator/cxf/trunk/tools/corba/src/test/java/org/apache/yoko/tools/utils/TestWSDLCorbaWriterImpl.java Fri Jan  4 08:40:40 2008
@@ -29,6 +29,9 @@
 
 import com.ibm.wsdl.xml.WSDLWriterImpl;
 
+import org.apache.cxf.helpers.CastUtils;
+
+
  /*
   * This class is extending the wsdl4j RI class to print out the 
   * maps in a particular order
@@ -38,65 +41,67 @@
 
     private TestComparator comparator = new TestComparator();
 
-    protected void printBindingFaults(java.util.Map bindingFaults, Definition def, java.io.PrintWriter pw)
+    protected void printBindingFaults(Map bindingFaults,
+                                      Definition def,
+                                      java.io.PrintWriter pw)
         throws WSDLException {
-        Map bfaults = new TreeMap(comparator);
-        bfaults.putAll(bindingFaults);
+        Map<Object, Object> bfaults = new TreeMap<Object, Object>(comparator);
+        bfaults.putAll(CastUtils.cast(bindingFaults));
         super.printBindingFaults(bfaults, def, pw);
     }
 
     protected void printBindings(java.util.Map bindings, Definition def, java.io.PrintWriter pw)
         throws WSDLException {
-        Map map = new TreeMap(comparator);
-        map.putAll(bindings);
+        Map<Object, Object> map = new TreeMap<Object, Object>(comparator);
+        map.putAll(CastUtils.cast(bindings));
         super.printBindings(map, def, pw);
     }
     
     protected void printFaults(java.util.Map faults, Definition def, java.io.PrintWriter pw) 
         throws WSDLException {
-        Map map = new TreeMap(comparator);
-        map.putAll(faults);
+        Map<Object, Object> map = new TreeMap<Object, Object>(comparator);
+        map.putAll(CastUtils.cast(faults));
         super.printFaults(map, def, pw);
     }
 
     protected void printImports(java.util.Map imports, Definition def, java.io.PrintWriter pw) 
         throws WSDLException {
-        Map map = new TreeMap(comparator);
-        map.putAll(imports);
+        Map<Object, Object> map = new TreeMap<Object, Object>(comparator);
+        map.putAll(CastUtils.cast(imports));
         super.printImports(map, def, pw);
     }
 
     protected void printMessages(java.util.Map messages, Definition def, java.io.PrintWriter pw) 
         throws WSDLException {
-        Map map = new TreeMap(comparator);
-        map.putAll(messages);
+        Map<Object, Object> map = new TreeMap<Object, Object>(comparator);
+        map.putAll(CastUtils.cast(messages));
         super.printMessages(map, def, pw);
     }
 
     protected void printNamespaceDeclarations(java.util.Map namespaces, java.io.PrintWriter pw) 
         throws WSDLException {
-        Map map = new TreeMap(comparator);
-        map.putAll(namespaces);
+        Map<Object, Object> map = new TreeMap<Object, Object>(comparator);
+        map.putAll(CastUtils.cast(namespaces));
         super.printNamespaceDeclarations(map, pw);
     }
 
     protected void printPorts(java.util.Map ports, Definition def, java.io.PrintWriter pw) 
         throws WSDLException {
-        Map map = new TreeMap(comparator);
-        map.putAll(ports);
+        Map<Object, Object> map = new TreeMap<Object, Object>(comparator);
+        map.putAll(CastUtils.cast(ports));
         super.printPorts(map, def, pw);
     }
     protected void printPortTypes(java.util.Map portTypes, Definition def, java.io.PrintWriter pw) 
         throws WSDLException {
         Map<QName, PortType> map = new TreeMap<QName, PortType>(comparator);
-        map.putAll(portTypes);
+        map.putAll(CastUtils.cast(portTypes, QName.class, PortType.class));
         super.printPortTypes(map, def, pw);
     }
            
     protected void printServices(java.util.Map services, Definition def, java.io.PrintWriter pw) 
         throws WSDLException {
-        Map map = new TreeMap(comparator);
-        map.putAll(services);
+        Map<Object, Object> map = new TreeMap<Object, Object>(comparator);
+        map.putAll(CastUtils.cast(services));
         super.printServices(map, def, pw);
     }
 

Modified: incubator/cxf/trunk/tools/corba/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/corba/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java?rev=608913&r1=608912&r2=608913&view=diff
==============================================================================
--- incubator/cxf/trunk/tools/corba/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java (original)
+++ incubator/cxf/trunk/tools/corba/src/test/java/org/apache/yoko/tools/utils/WSDLGenerationTester.java Fri Jan  4 08:40:40 2008
@@ -39,6 +39,7 @@
 import junit.framework.Assert;
 
 import org.apache.cxf.wsdl.JAXBExtensionHelper;
+import org.apache.schemas.yoko.bindings.corba.BindingType;
 import org.apache.schemas.yoko.bindings.corba.TypeMappingType;
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaCollection;



Mime
View raw message