maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r749586 - /maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java
Date Tue, 03 Mar 2009 11:48:20 GMT
Author: bentmann
Date: Tue Mar  3 11:48:20 2009
New Revision: 749586

URL: http://svn.apache.org/viewvc?rev=749586&view=rev
Log:
o Added generics

Modified:
    maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java

Modified: maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java?rev=749586&r1=749585&r2=749586&view=diff
==============================================================================
--- maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java
(original)
+++ maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/execution/DefaultMavenExecutionRequestPopulator.java
Tue Mar  3 11:48:20 2009
@@ -193,7 +193,7 @@
 
         request.setPluginGroups( settings.getPluginGroups() );
 
-        List settingsProfiles = settings.getProfiles();
+        List<org.apache.maven.settings.Profile> settingsProfiles = settings.getProfiles();
 
         List<String> settingsActiveProfileIds = settings.getActiveProfiles();
 
@@ -207,9 +207,9 @@
 
         if ( ( settingsProfiles != null ) && !settingsProfiles.isEmpty() )
         {
-            for ( Iterator it = settings.getProfiles().iterator(); it.hasNext(); )
+            for ( Iterator<org.apache.maven.settings.Profile> it = settings.getProfiles().iterator();
it.hasNext(); )
             {
-                org.apache.maven.settings.Profile rawProfile = (org.apache.maven.settings.Profile)
it.next();
+                org.apache.maven.settings.Profile rawProfile = it.next();
 
                 Profile profile = SettingsUtils.convertFromSettingsProfile( rawProfile );
 
@@ -217,9 +217,9 @@
 
                 // We need to convert profile repositories to artifact repositories     
          
                 
-                for ( Iterator j = profile.getRepositories().iterator(); j.hasNext(); )
+                for ( Iterator<Repository> j = profile.getRepositories().iterator();
j.hasNext(); )
                 {
-                    Repository r = (Repository) j.next();
+                    Repository r = j.next();
 
                     ArtifactRepository ar;
                     try
@@ -432,9 +432,9 @@
                 repositorySystem.addProxy( proxy.getProtocol(), proxy.getHost(), proxy.getPort(),
proxy.getUsername(), proxy.getPassword(), proxy.getNonProxyHosts() );
             }
 
-            for ( Iterator i = settings.getServers().iterator(); i.hasNext(); )
+            for ( Iterator<Server> i = settings.getServers().iterator(); i.hasNext();
)
             {
-                Server server = (Server) i.next();
+                Server server = i.next();
                 
                 String pass;
                 String phrase;
@@ -455,9 +455,9 @@
 
             RepositoryPermissions defaultPermissions = new RepositoryPermissions();
             
-            for ( Iterator i = settings.getMirrors().iterator(); i.hasNext(); )
+            for ( Iterator<Mirror> i = settings.getMirrors().iterator(); i.hasNext();
)
             {
-                Mirror mirror = (Mirror) i.next();
+                Mirror mirror = i.next();
 
                 repositorySystem.addMirror( mirror.getId(), mirror.getMirrorOf(), mirror.getUrl()
);
             }
@@ -469,7 +469,6 @@
      * @param settings settings to process
      * @throws IOException 
      */
-    @SuppressWarnings("unchecked")
     private void decrypt( Settings settings )
     	throws IOException
     {



Mime
View raw message