maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1057018 - in /maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src: main/java/org/apache/maven/scm/provider/local/command/checkout/ main/java/org/apache/maven/scm/provider/local/command/list/ main/java/org/apache/maven/scm/prov...
Date Sun, 09 Jan 2011 20:12:29 GMT
Author: olamy
Date: Sun Jan  9 20:12:29 2011
New Revision: 1057018

URL: http://svn.apache.org/viewvc?rev=1057018&view=rev
Log:
[SCM-591] Move to Java 1.5 : fix some generics warning in local provider

Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/checkout/LocalCheckOutScmResult.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/list/LocalListScmResult.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateScmResult.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/metadata/LocalScmMetadataUtils.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/repository/LocalScmProviderRepository.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/test/java/org/apache/maven/scm/provider/local/command/checkout/LocalCheckOutCommandTckTest.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/test/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommandTckTest.java

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/checkout/LocalCheckOutScmResult.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/checkout/LocalCheckOutScmResult.java?rev=1057018&r1=1057017&r2=1057018&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/checkout/LocalCheckOutScmResult.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/checkout/LocalCheckOutScmResult.java
Sun Jan  9 20:12:29 2011
@@ -19,10 +19,11 @@ package org.apache.maven.scm.provider.lo
  * under the License.
  */
 
-import org.apache.maven.scm.command.checkout.CheckOutScmResult;
-
 import java.util.List;
 
+import org.apache.maven.scm.ScmFile;
+import org.apache.maven.scm.command.checkout.CheckOutScmResult;
+
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -30,7 +31,9 @@ import java.util.List;
 public class LocalCheckOutScmResult
     extends CheckOutScmResult
 {
-    public LocalCheckOutScmResult( String commandLine, List files )
+    private static final long serialVersionUID = -2646018573623668026L;
+
+    public LocalCheckOutScmResult( String commandLine, List<ScmFile> files )
     {
         super( commandLine, files );
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/list/LocalListScmResult.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/list/LocalListScmResult.java?rev=1057018&r1=1057017&r2=1057018&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/list/LocalListScmResult.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/list/LocalListScmResult.java
Sun Jan  9 20:12:29 2011
@@ -19,10 +19,11 @@ package org.apache.maven.scm.provider.lo
  * under the License.
  */
 
-import org.apache.maven.scm.command.list.ListScmResult;
-
 import java.util.List;
 
+import org.apache.maven.scm.ScmFile;
+import org.apache.maven.scm.command.list.ListScmResult;
+
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
@@ -30,7 +31,10 @@ import java.util.List;
 public class LocalListScmResult
     extends ListScmResult
 {
-    public LocalListScmResult( String commandLine, List files )
+
+    private static final long serialVersionUID = 259954569217343901L;
+
+    public LocalListScmResult( String commandLine, List<ScmFile> files )
     {
         super( commandLine, files );
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateScmResult.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateScmResult.java?rev=1057018&r1=1057017&r2=1057018&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateScmResult.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateScmResult.java
Sun Jan  9 20:12:29 2011
@@ -19,10 +19,11 @@ package org.apache.maven.scm.provider.lo
  * under the License.
  */
 
-import org.apache.maven.scm.command.update.UpdateScmResult;
-
 import java.util.List;
 
+import org.apache.maven.scm.ScmFile;
+import org.apache.maven.scm.command.update.UpdateScmResult;
+
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -30,7 +31,9 @@ import java.util.List;
 public class LocalUpdateScmResult
     extends UpdateScmResult
 {
-    public LocalUpdateScmResult( String commandLine, List files )
+    private static final long serialVersionUID = -932254303678432167L;
+
+    public LocalUpdateScmResult( String commandLine, List<ScmFile> files )
     {
         super( commandLine, files );
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/metadata/LocalScmMetadataUtils.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/metadata/LocalScmMetadataUtils.java?rev=1057018&r1=1057017&r2=1057018&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/metadata/LocalScmMetadataUtils.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/metadata/LocalScmMetadataUtils.java
Sun Jan  9 20:12:29 2011
@@ -64,7 +64,8 @@ public class LocalScmMetadataUtils
     public LocalScmMetadata buildMetadata( File repository )
         throws IOException
     {
-        List repoFilenames = FileUtils.getFileNames( repository.getAbsoluteFile(), "**",
null, false );
+        @SuppressWarnings( "unchecked" )
+        List<String> repoFilenames = FileUtils.getFileNames( repository.getAbsoluteFile(),
"**", null, false );
         LocalScmMetadata metadata = new LocalScmMetadata();
         metadata.setRepositoryFileNames( repoFilenames );
         return metadata;

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/repository/LocalScmProviderRepository.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/repository/LocalScmProviderRepository.java?rev=1057018&r1=1057017&r2=1057018&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/repository/LocalScmProviderRepository.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/main/java/org/apache/maven/scm/provider/local/repository/LocalScmProviderRepository.java
Sun Jan  9 20:12:29 2011
@@ -35,7 +35,7 @@ public class LocalScmProviderRepository
 
     private String module;
 
-    private Set addedFiles = new HashSet();
+    private Set<String> addedFiles = new HashSet<String>();
 
     /**
      * @param root

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/test/java/org/apache/maven/scm/provider/local/command/checkout/LocalCheckOutCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/test/java/org/apache/maven/scm/provider/local/command/checkout/LocalCheckOutCommandTckTest.java?rev=1057018&r1=1057017&r2=1057018&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/test/java/org/apache/maven/scm/provider/local/command/checkout/LocalCheckOutCommandTckTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/test/java/org/apache/maven/scm/provider/local/command/checkout/LocalCheckOutCommandTckTest.java
Sun Jan  9 20:12:29 2011
@@ -19,6 +19,12 @@ package org.apache.maven.scm.provider.lo
  * under the License.
  */
 
+import java.io.File;
+import java.io.FileReader;
+import java.io.Reader;
+import java.util.List;
+
+import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.command.checkout.CheckOutScmResult;
 import org.apache.maven.scm.provider.local.metadata.LocalScmMetadata;
 import org.apache.maven.scm.provider.local.metadata.io.xpp3.LocalScmMetadataXpp3Reader;
@@ -26,11 +32,6 @@ import org.apache.maven.scm.tck.command.
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.IOUtil;
 
-import java.io.File;
-import java.io.FileReader;
-import java.io.Reader;
-import java.util.List;
-
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
@@ -74,7 +75,7 @@ public class LocalCheckOutCommandTckTest
 
         assertResultIsSuccess( result );
 
-        List checkedOutFiles = result.getCheckedOutFiles();
+        List<ScmFile> checkedOutFiles = result.getCheckedOutFiles();
 
         assertEquals( 4, checkedOutFiles.size() );
 
@@ -94,7 +95,8 @@ public class LocalCheckOutCommandTckTest
             IOUtil.close( reader );
         }
         File root = new File( getRepositoryRoot() + "/" + module );
-        List fileNames = FileUtils.getFileNames( root, "**", null, false );
+        @SuppressWarnings( "unchecked" )
+        List<String> fileNames = FileUtils.getFileNames( root, "**", null, false );
         assertEquals( fileNames, metadata.getRepositoryFileNames() );
     }
 }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/test/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/test/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommandTckTest.java?rev=1057018&r1=1057017&r2=1057018&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/test/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommandTckTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-local/src/test/java/org/apache/maven/scm/provider/local/command/update/LocalUpdateCommandTckTest.java
Sun Jan  9 20:12:29 2011
@@ -19,10 +19,17 @@ package org.apache.maven.scm.provider.lo
  * under the License.
  */
 
+import java.io.File;
+import java.io.FileReader;
+import java.io.Reader;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.TreeSet;
+
 import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmTestCase;
-import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.update.UpdateScmResult;
 import org.apache.maven.scm.manager.ScmManager;
 import org.apache.maven.scm.provider.local.metadata.LocalScmMetadata;
@@ -32,14 +39,6 @@ import org.apache.maven.scm.tck.command.
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.IOUtil;
 
-import java.io.File;
-import java.io.FileReader;
-import java.io.Reader;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
-import java.util.TreeSet;
-
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -104,7 +103,7 @@ public class LocalUpdateCommandTckTest
 
         assertResultIsSuccess( result );
 
-        List updatedFiles = result.getUpdatedFiles();
+        List<ScmFile> updatedFiles = result.getUpdatedFiles();
 
         assertEquals( "Expected 1 files in the updated files list " + updatedFiles, 1, updatedFiles.size()
);
 
@@ -112,7 +111,7 @@ public class LocalUpdateCommandTckTest
         // Assert the files in the updated files list
         // ----------------------------------------------------------------------
 
-        Iterator files = new TreeSet( updatedFiles ).iterator();
+        Iterator<ScmFile> files = new TreeSet<ScmFile>( updatedFiles ).iterator();
 
         // readme.txt
         ScmFile file = (ScmFile) files.next();
@@ -145,7 +144,8 @@ public class LocalUpdateCommandTckTest
             IOUtil.close( reader );
         }
         File root = new File( getRepositoryRoot() + "/" + moduleName );
-        List fileNames = FileUtils.getFileNames( root, "**", null, false );
+        @SuppressWarnings( "unchecked" )
+        List<String> fileNames = FileUtils.getFileNames( root, "**", null, false );
         assertEquals( fileNames, metadata.getRepositoryFileNames() );
 
     }



Mime
View raw message