maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1034585 - in /maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site: AbstractSiteDeployWebDavTest.java AuthAsyncProxyServlet.java SimpleDavServerHandler.java SiteMojoTest.java
Date Fri, 12 Nov 2010 22:20:06 GMT
Author: olamy
Date: Fri Nov 12 22:20:05 2010
New Revision: 1034585

URL: http://svn.apache.org/viewvc?rev=1034585&view=rev
Log:
fix generics warnings.

Modified:
    maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/AbstractSiteDeployWebDavTest.java
    maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/AuthAsyncProxyServlet.java
    maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/SimpleDavServerHandler.java
    maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/SiteMojoTest.java

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/AbstractSiteDeployWebDavTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/AbstractSiteDeployWebDavTest.java?rev=1034585&r1=1034584&r2=1034585&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/AbstractSiteDeployWebDavTest.java
(original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/AbstractSiteDeployWebDavTest.java
Fri Nov 12 22:20:05 2010
@@ -1,8 +1,8 @@
 package org.apache.maven.plugins.site;
 
 import java.io.File;
-import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -160,7 +160,7 @@ public abstract class AbstractSiteDeploy
         FileUtils.cleanDirectory( siteTargetPath );
         //SimpleDavServerHandler simpleDavServerHandler = new SimpleDavServerHandler( siteTargetPath
);
         
-        Map authentications = new HashMap();
+        Map<String, String> authentications = new HashMap<String, String>();
         authentications.put( "foo", "titi" );
         
         AuthAsyncProxyServlet servlet = new  AuthAsyncProxyServlet(authentications, siteTargetPath);
@@ -211,15 +211,15 @@ public abstract class AbstractSiteDeploy
             else
             {
                 ArtifactRepositoryFactory artifactRepositoryFactory = getContainer().lookup(
ArtifactRepositoryFactory.class );
-                ;
+                
                 setVariableValueToObject( mojo, "stagingDirectory", inputDirectory );
-                setVariableValueToObject( mojo, "reactorProjects", new ArrayList() );
+                setVariableValueToObject( mojo, "reactorProjects", Collections.emptyList()
);
                 setVariableValueToObject( mojo, "localRepository",
                                           artifactRepositoryFactory.createArtifactRepository(
"local", "foo", "default",
                                                                                         
     null, null ) );
                 setVariableValueToObject( mojo, "siteTool", getContainer().lookup( SiteTool.class
) );
                 setVariableValueToObject( mojo, "siteDirectory", new File("foo") );
-                setVariableValueToObject( mojo, "repositories", new ArrayList() );
+                setVariableValueToObject( mojo, "repositories", Collections.emptyList() );
             }
             mojo.execute();
             

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/AuthAsyncProxyServlet.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/AuthAsyncProxyServlet.java?rev=1034585&r1=1034584&r2=1034585&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/AuthAsyncProxyServlet.java
(original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/AuthAsyncProxyServlet.java
Fri Nov 12 22:20:05 2010
@@ -48,7 +48,7 @@ import org.slf4j.LoggerFactory;
 public class AuthAsyncProxyServlet
 extends AsyncProxyServlet
 {
-    private Map authentications;
+    private Map<String, String> authentications;
 
     private long sleepTime = 0;
 
@@ -72,7 +72,7 @@ extends AsyncProxyServlet
      * 
      * @param authentications a map of user/password
      */
-    public AuthAsyncProxyServlet( Map authentications, File siteTargetPath )
+    public AuthAsyncProxyServlet( Map<String, String> authentications, File siteTargetPath
)
     {
         this( siteTargetPath );
 
@@ -85,7 +85,7 @@ extends AsyncProxyServlet
      * @param authentications a map of user/password
      * @param sleepTime a positive time to sleep the service thread (for timeout)
      */
-    public AuthAsyncProxyServlet( Map authentications, long sleepTime, File siteTargetPath
)
+    public AuthAsyncProxyServlet( Map<String, String> authentications, long sleepTime,
File siteTargetPath )
     {
         this( siteTargetPath );
 
@@ -138,6 +138,7 @@ extends AsyncProxyServlet
                     rq.method = request.getMethod();
                     rq.path = targetPath;
 
+                    @SuppressWarnings( "rawtypes" )
                     Enumeration headerNames = request.getHeaderNames();
                     while ( headerNames.hasMoreElements() )
                     {

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/SimpleDavServerHandler.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/SimpleDavServerHandler.java?rev=1034585&r1=1034584&r2=1034585&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/SimpleDavServerHandler.java
(original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/SimpleDavServerHandler.java
Fri Nov 12 22:20:05 2010
@@ -76,6 +76,7 @@ public class SimpleDavServerHandler
                 rq.method = request.getMethod();
                 rq.path = targetPath;
 
+                @SuppressWarnings( "rawtypes" )
                 Enumeration headerNames = request.getHeaderNames();
                 while (headerNames.hasMoreElements())
                 {

Modified: maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/SiteMojoTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/SiteMojoTest.java?rev=1034585&r1=1034584&r2=1034585&view=diff
==============================================================================
--- maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/SiteMojoTest.java
(original)
+++ maven/plugins/branches/maven-site-plugin-3.x/src/test/java/org/apache/maven/plugins/site/SiteMojoTest.java
Fri Nov 12 22:20:05 2010
@@ -50,6 +50,7 @@ public class SiteMojoTest
      *
      * @throws Exception
      */
+    @SuppressWarnings( "rawtypes" )
     @Test
     public void testGetInterpolatedSiteDescriptorContent()
         throws Exception



Mime
View raw message