You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2011/05/14 15:59:29 UTC

svn commit: r1103114 - /axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java

Author: veithen
Date: Sat May 14 13:59:29 2011
New Revision: 1103114

URL: http://svn.apache.org/viewvc?rev=1103114&view=rev
Log:
Fixed some Java 5 warnings.

Modified:
    axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java

Modified: axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java?rev=1103114&r1=1103113&r2=1103114&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java (original)
+++ axis/axis2/java/core/trunk/modules/tool/axis2-wsdl2code-maven-plugin/src/main/java/org/apache/axis2/maven2/wsdl2code/WSDL2CodeMojo.java Sat May 14 13:59:29 2011
@@ -241,8 +241,8 @@ public class WSDL2CodeMojo extends Abstr
     private NamespaceURIMapping[] namespaceURIs = null;
 
     /** Fills the option map. This map is passed onto the code generation API to generate the code. */
-    private Map fillOptionMap() throws MojoFailureException {
-        Map optionMap = new HashMap();
+    private Map<String,CommandLineOption> fillOptionMap() throws MojoFailureException {
+        Map<String,CommandLineOption> optionMap = new HashMap<String,CommandLineOption>();
 
         ////////////////////////////////////////////////////////////////
         //WSDL file name
@@ -479,9 +479,7 @@ public class WSDL2CodeMojo extends Abstr
         }
 
         if(options != null) {
-            Iterator iterator = options.entrySet().iterator();
-            while (iterator.hasNext()) {
-                Map.Entry entry = (Map.Entry) iterator.next();
+            for (Map.Entry<?,?> entry : options.entrySet()) {
                 String key = CommandLineOptionConstants.WSDL2JavaConstants.EXTRA_OPTIONTYPE_PREFIX + entry.getKey();
                 String value = (String) entry.getValue();
                 optionMap.put(
@@ -560,7 +558,7 @@ public class WSDL2CodeMojo extends Abstr
         fixCompileSourceRoots();
         showDependencies();
 
-        Map commandLineOptions = this.fillOptionMap();
+        Map<String,CommandLineOption> commandLineOptions = this.fillOptionMap();
         CommandLineOptionParser parser =
                 new CommandLineOptionParser(commandLineOptions);
         try {
@@ -581,14 +579,14 @@ public class WSDL2CodeMojo extends Abstr
             return;
         }
         log.debug("The projects dependency artifacts are: ");
-        for (Iterator iter = project.getDependencyArtifacts().iterator(); iter.hasNext();) {
+        for (Iterator<?> iter = project.getDependencyArtifacts().iterator(); iter.hasNext();) {
             Artifact artifact = (Artifact)iter.next();
             log.debug("    " + artifact.getGroupId() + ":" + artifact.getArtifactId() +
                     ":" + artifact.getVersion() + ":" + artifact.getClassifier() +
                     ":" + artifact.getScope() + ":" + artifact.getType());
         }
         log.debug("The projects transitive artifacts are: ");
-        for (Iterator iter = project.getArtifacts().iterator(); iter.hasNext();) {
+        for (Iterator<?> iter = project.getArtifacts().iterator(); iter.hasNext();) {
             Artifact artifact = (Artifact)iter.next();
             log.debug("    " + artifact.getGroupId() + ":" + artifact.getArtifactId() +
                     ":" + artifact.getVersion() + ":" + artifact.getClassifier() +