maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1058791 - in /maven/scm/trunk/maven-scm-test/src: main/java/org/apache/maven/scm/ main/java/org/apache/maven/scm/manager/ main/java/org/apache/maven/scm/provider/ main/java/org/apache/maven/scm/tck/command/branch/ main/java/org/apache/mave...
Date Thu, 13 Jan 2011 23:18:21 GMT
Author: olamy
Date: Thu Jan 13 23:18:20 2011
New Revision: 1058791

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

Modified:
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/ScmTckTestCase.java
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/ScmTestCase.java
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/manager/ScmManagerStub.java
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/provider/ScmProviderStub.java
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/branch/BranchCommandTckTest.java
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/checkin/CheckInCommandTckTest.java
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/checkout/CheckOutCommandTckTest.java
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/diff/DiffCommandTckTest.java
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/list/ListCommandTckTest.java
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/status/StatusCommandTckTest.java
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/tag/TagCommandTckTest.java
    maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/update/UpdateCommandTckTest.java
    maven/scm/trunk/maven-scm-test/src/test/java/org/apache/maven/scm/manager/ScmManagerStubTest.java

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/ScmTckTestCase.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/ScmTckTestCase.java?rev=1058791&r1=1058790&r2=1058791&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/ScmTckTestCase.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/ScmTckTestCase.java
Thu Jan 13 23:18:20 2011
@@ -54,7 +54,7 @@ public abstract class ScmTckTestCase
 {
     private ScmRepository scmRepository;
 
-    private List scmFileNames;
+    private List<String> scmFileNames;
 
     /**
      * @return A provider spesific and valid url for the repository
@@ -76,7 +76,7 @@ public abstract class ScmTckTestCase
      *
      * @return {@link List} of {@link String} objects
      */
-    protected List getScmFileNames()
+    protected List<String> getScmFileNames()
     {
         return scmFileNames;
     }
@@ -108,16 +108,16 @@ public abstract class ScmTckTestCase
 
         checkOut( getWorkingCopy(), getScmRepository() );
 
-        scmFileNames = new ArrayList( 4 );
+        scmFileNames = new ArrayList<String>( 4 );
         scmFileNames.add( "/pom.xml" );
         scmFileNames.add( "/readme.txt" );
         scmFileNames.add( "/src/main/java/Application.java" );
         scmFileNames.add( "/src/test/java/Test.java" );
 
-        Iterator it = getScmFileNames().iterator();
+        Iterator<String> it = getScmFileNames().iterator();
         while ( it.hasNext() )
         {
-            assertFile( getWorkingCopy(), (String) it.next() );
+            assertFile( getWorkingCopy(), it.next() );
         }
     }
 
@@ -160,7 +160,7 @@ public abstract class ScmTckTestCase
 
         assertTrue( "Check result was successful, output: " + result.getCommandOutput(),
result.isSuccess() );
 
-        List addedFiles = result.getAddedFiles();
+        List<ScmFile> addedFiles = result.getAddedFiles();
 
         if ( new File( workingDirectory, file.getPath() ).isFile() )
         {
@@ -181,15 +181,15 @@ public abstract class ScmTckTestCase
      * @param files List with {@code ScmFile}s
      * @return Map key=pathName, value=ScmFile
      */
-    protected Map/*<String, ScmFile>*/ mapFilesByPath( List/*<ScmFile>*/ files
)
+    protected Map<String, ScmFile> mapFilesByPath( List<ScmFile> files )
     {
         if ( files == null )
         {
             return null;
         }
         
-        Map mappedFiles = new TreeMap();
-        Iterator it = files.iterator();
+        Map<String,ScmFile> mappedFiles = new TreeMap<String,ScmFile>();
+        Iterator<ScmFile> it = files.iterator();
         while ( it.hasNext() )
         {
             ScmFile scmFile = (ScmFile) it.next();

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/ScmTestCase.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/ScmTestCase.java?rev=1058791&r1=1058790&r2=1058791&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/ScmTestCase.java (original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/ScmTestCase.java Thu
Jan 13 23:18:20 2011
@@ -230,7 +230,7 @@ public abstract class ScmTestCase
 
         cl.setWorkingDirectory( workingDirectory.getAbsolutePath() );
 
-        cl.addArguments( Commandline.translateCommandline( arguments ) );
+        cl.addArguments( CommandLineUtils.translateCommandline( arguments ) );
 
         StringStreamConsumer stdout = new CommandLineUtils.StringStreamConsumer();
 

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/manager/ScmManagerStub.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/manager/ScmManagerStub.java?rev=1058791&r1=1058790&r2=1058791&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/manager/ScmManagerStub.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/manager/ScmManagerStub.java
Thu Jan 13 23:18:20 2011
@@ -67,7 +67,7 @@ public class ScmManagerStub
 
     private ScmProvider scmProvider;
 
-    private List messages;
+    private List<String> messages;
 
     /**
      * Creates a new stub with stub repository and provider, and empty list of messages
@@ -76,7 +76,7 @@ public class ScmManagerStub
     {
         setScmRepository( new ScmRepositoryStub() );
         setScmProvider( new ScmProviderStub() );
-        setMessages( new ArrayList( 0 ) );
+        setMessages( new ArrayList<String>( 0 ) );
     }
 
     public void setScmProvider( ScmProvider scmProvider )
@@ -116,7 +116,7 @@ public class ScmManagerStub
      *
      * @param messages <code>List</code> of <code>String</code> objects
      */
-    public void setMessages( List messages )
+    public void setMessages( List<String> messages )
     {
         this.messages = messages;
     }
@@ -126,7 +126,7 @@ public class ScmManagerStub
      *
      * @return <code>List</code> of <code>String</code> objects
      */
-    public List getMessages()
+    public List<String> getMessages()
     {
         return messages;
     }
@@ -151,7 +151,7 @@ public class ScmManagerStub
      * @param scmUrl ignored
      * @return <code>List</code> of <code>String</code> objects,
the same list returned by getMessages()
      */
-    public List validateScmRepository( String scmUrl )
+    public List<String> validateScmRepository( String scmUrl )
     {
         return getMessages();
     }
@@ -192,6 +192,7 @@ public class ScmManagerStub
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings( "deprecation" )
     public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName
)
         throws ScmException
     {
@@ -199,6 +200,7 @@ public class ScmManagerStub
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings( "deprecation" )
     public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName,
String message )
         throws ScmException
     {
@@ -349,6 +351,7 @@ public class ScmManagerStub
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings( "deprecation" )
     public TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName
)
         throws ScmException
     {
@@ -356,6 +359,7 @@ public class ScmManagerStub
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings( "deprecation" )
     public TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName,
String message )
         throws ScmException
     {

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/provider/ScmProviderStub.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/provider/ScmProviderStub.java?rev=1058791&r1=1058790&r2=1058791&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/provider/ScmProviderStub.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/provider/ScmProviderStub.java
Thu Jan 13 23:18:20 2011
@@ -19,9 +19,16 @@ package org.apache.maven.scm.provider;
  * under the License.
  */
 
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+
 import org.apache.maven.scm.ScmBranch;
 import org.apache.maven.scm.ScmBranchParameters;
 import org.apache.maven.scm.ScmException;
+import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmTagParameters;
 import org.apache.maven.scm.ScmVersion;
@@ -46,12 +53,6 @@ import org.apache.maven.scm.repository.S
 import org.apache.maven.scm.repository.ScmRepositoryException;
 import org.apache.maven.scm.repository.UnknownRepositoryStructure;
 
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Date;
-import java.util.List;
-
 /**
  * Stub implementation of ScmProvider for unit testing purposes. 
  * It allows setting the expected results that the different methods will return.
@@ -66,13 +67,13 @@ public class ScmProviderStub
 
     private String scmType, scmSpecificFilename;
 
-    private List loggers = new ArrayList();
+    private List<ScmLogger> loggers = new ArrayList<ScmLogger>();
 
     private boolean requiresEditmode;
 
     private ScmProviderRepository scmProviderRepository = new ScmProviderRepositoryStub();
 
-    private List errors = new ArrayList();
+    private List<String> errors = new ArrayList<String>();
 
     private AddScmResult addScmResult;
 
@@ -112,8 +113,8 @@ public class ScmProviderStub
     public ScmProviderStub()
     {
         setScmSpecificFilename( "" );
-        setAddScmResult( new AddScmResult( "", Collections.EMPTY_LIST ) );
-        setBranchScmResult( new BranchScmResult( "", Collections.EMPTY_LIST ) );
+        setAddScmResult( new AddScmResult( "", Collections.<ScmFile>emptyList() ) );
+        setBranchScmResult( new BranchScmResult( "",  Collections.<ScmFile>emptyList()
) );
         setChangeLogScmResult( new ChangeLogScmResult( "", "", "", true ) );
         setCheckInScmResult( new CheckInScmResult( "", "", "", true ) );
         setCheckOutScmResult( new CheckOutScmResult( "", "", "", true ) );
@@ -337,7 +338,7 @@ public class ScmProviderStub
     }
 
     /** {@inheritDoc} */
-    public List validateScmUrl( String scmSpecificUrl, char delimiter )
+    public List<String> validateScmUrl( String scmSpecificUrl, char delimiter )
     {
         return errors;
     }

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/branch/BranchCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/branch/BranchCommandTckTest.java?rev=1058791&r1=1058790&r2=1058791&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/branch/BranchCommandTckTest.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/branch/BranchCommandTckTest.java
Thu Jan 13 23:18:20 2011
@@ -45,6 +45,7 @@ public abstract class BranchCommandTckTe
     {
         String branch = "test-branch";
 
+        @SuppressWarnings( "deprecation" )
         BranchScmResult branchResult = getScmManager().getProviderByUrl( getScmUrl() )
             .branch( getScmRepository(), new ScmFileSet( getWorkingCopy() ), branch );
 

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/checkin/CheckInCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/checkin/CheckInCommandTckTest.java?rev=1058791&r1=1058790&r2=1058791&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/checkin/CheckInCommandTckTest.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/checkin/CheckInCommandTckTest.java
Thu Jan 13 23:18:20 2011
@@ -77,13 +77,13 @@ public abstract class CheckInCommandTckT
 
         assertResultIsSuccess( result );
 
-        List files = result.getCheckedInFiles();
+        List<ScmFile> files = result.getCheckedInFiles();
 
         assertNotNull( files );
 
         assertEquals( 2, files.size() );
 
-        Map fileMap = mapFilesByPath( files );
+        Map<String,ScmFile> fileMap = mapFilesByPath( files );
         ScmFile file1 = (ScmFile) fileMap.get( "src/main/java/Foo.java" );
         assertNotNull( file1 );
         assertEquals( ScmFileStatus.CHECKED_IN, file1.getStatus() );
@@ -148,7 +148,7 @@ public abstract class CheckInCommandTckT
 
         assertResultIsSuccess( result );
 
-        List files = result.getCheckedInFiles();
+        List<ScmFile> files = result.getCheckedInFiles();
 
         assertNotNull( files );
 

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/checkout/CheckOutCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/checkout/CheckOutCommandTckTest.java?rev=1058791&r1=1058790&r2=1058791&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/checkout/CheckOutCommandTckTest.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/checkout/CheckOutCommandTckTest.java
Thu Jan 13 23:18:20 2011
@@ -47,19 +47,19 @@ public abstract class CheckOutCommandTck
 
         assertResultIsSuccess( result );
 
-        List checkedOutFiles = result.getCheckedOutFiles();
+        List<ScmFile> checkedOutFiles = result.getCheckedOutFiles();
 
         if ( checkedOutFiles.size() != 4 )
         {
-            SortedSet files = new TreeSet( checkedOutFiles );
+            SortedSet<ScmFile> files = new TreeSet<ScmFile>( checkedOutFiles
);
 
             int i = 0;
 
-            for ( Iterator it = files.iterator(); it.hasNext(); i++ )
+            for ( Iterator<ScmFile> it = files.iterator(); it.hasNext(); i++ )
             {
-                ScmFile scmFile = (ScmFile) it.next();
+                ScmFile scmFile = it.next();
 
-                System.err.println( "" + i + ": " + scmFile );
+                System.out.println( "" + i + ": " + scmFile );
             }
 
             fail( "Expected 4 files in the updated files list, was " + checkedOutFiles.size()
);

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/diff/DiffCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/diff/DiffCommandTckTest.java?rev=1058791&r1=1058790&r2=1058791&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/diff/DiffCommandTckTest.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/diff/DiffCommandTckTest.java
Thu Jan 13 23:18:20 2011
@@ -95,9 +95,9 @@ public abstract class DiffCommandTckTest
 
         assertResultIsSuccess( result );
 
-        List changedFiles = result.getChangedFiles();
+        List<ScmFile> changedFiles = result.getChangedFiles();
 
-        Map differences = result.getDifferences();
+        Map<String, CharSequence> differences = result.getDifferences();
 
         assertEquals( "Expected 3 files in the changed files list " + changedFiles, 3, changedFiles.size()
);
 
@@ -107,7 +107,7 @@ public abstract class DiffCommandTckTest
         // Assert the files in the changed files list
         // ----------------------------------------------------------------------
 
-        Iterator files = new TreeSet( changedFiles ).iterator();
+        Iterator<ScmFile> files = new TreeSet<ScmFile>( changedFiles ).iterator();
 
         //Check Foo.java
         ScmFile file = (ScmFile) files.next();

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/list/ListCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/list/ListCommandTckTest.java?rev=1058791&r1=1058790&r2=1058791&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/list/ListCommandTckTest.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/list/ListCommandTckTest.java
Thu Jan 13 23:18:20 2011
@@ -19,15 +19,16 @@ package org.apache.maven.scm.tck.command
  * under the License.
  */
 
+import java.io.File;
+import java.util.List;
+
+import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileSet;
 import org.apache.maven.scm.ScmTckTestCase;
 import org.apache.maven.scm.ScmVersion;
 import org.apache.maven.scm.command.list.ListScmResult;
 import org.apache.maven.scm.provider.ScmProvider;
 
-import java.io.File;
-import java.util.List;
-
 /**
  * This test tests the list command.
  *
@@ -42,7 +43,7 @@ public abstract class ListCommandTckTest
     {
         ScmFileSet fileSet = new ScmFileSet( new File( "." ), new File( "." ) );
 
-        List files = runList( fileSet, false );
+        List<ScmFile> files = runList( fileSet, false );
 
         assertEquals( "The result of the list command doesn't have all the files in SCM:
" + files, 3, files.size() );
     }
@@ -52,7 +53,7 @@ public abstract class ListCommandTckTest
     {
         ScmFileSet fileSet = new ScmFileSet( new File( "." ), new File( "." ) );
 
-        List files = runList( fileSet, true );
+        List<ScmFile> files = runList( fileSet, true );
 
         assertEquals( "The result of the list command doesn't have all the files in SCM:
" + files, 10, files.size() );
     }
@@ -69,7 +70,7 @@ public abstract class ListCommandTckTest
         assertFalse( "Found file when shouldn't", result.isSuccess() );
     }
 
-    private List runList( ScmFileSet fileSet, boolean recursive )
+    private List<ScmFile> runList( ScmFileSet fileSet, boolean recursive )
         throws Exception
     {
         ScmProvider provider = getScmManager().getProviderByUrl( getScmUrl() );

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/status/StatusCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/status/StatusCommandTckTest.java?rev=1058791&r1=1058790&r2=1058791&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/status/StatusCommandTckTest.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/status/StatusCommandTckTest.java
Thu Jan 13 23:18:20 2011
@@ -63,7 +63,7 @@ public abstract class StatusCommandTckTe
 
         assertTrue( "Check result was successful, output: " + result.getCommandOutput(),
result.isSuccess() );
 
-        List committedFiles = result.getCheckedInFiles();
+        List<ScmFile> committedFiles = result.getCheckedInFiles();
 
         assertEquals( "Expected 2 files in the committed files list " + committedFiles, 2,
committedFiles.size() );
     }
@@ -127,7 +127,7 @@ public abstract class StatusCommandTckTe
 
         assertResultIsSuccess( result );
 
-        List changedFiles = result.getChangedFiles();
+        List<ScmFile> changedFiles = result.getChangedFiles();
 
         assertEquals( "Expected 2 files in the updated files list " + changedFiles, 2, changedFiles.size()
);
 
@@ -135,7 +135,7 @@ public abstract class StatusCommandTckTe
         // Assert the files in the updated files list
         // ----------------------------------------------------------------------
 
-        Iterator files = new TreeSet( changedFiles ).iterator();
+        Iterator<ScmFile> files = new TreeSet<ScmFile>( changedFiles ).iterator();
 
         ScmFile file = (ScmFile) files.next();
 

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/tag/TagCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/tag/TagCommandTckTest.java?rev=1058791&r1=1058790&r2=1058791&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/tag/TagCommandTckTest.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/tag/TagCommandTckTest.java
Thu Jan 13 23:18:20 2011
@@ -45,6 +45,7 @@ public abstract class TagCommandTckTest
     {
         String tag = "test-tag";
 
+        @SuppressWarnings( "deprecation" )
         TagScmResult tagResult = getScmManager().getProviderByUrl( getScmUrl() )
             .tag( getScmRepository(), new ScmFileSet( getWorkingCopy() ), tag );
 

Modified: maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/update/UpdateCommandTckTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/update/UpdateCommandTckTest.java?rev=1058791&r1=1058790&r2=1058791&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/update/UpdateCommandTckTest.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/main/java/org/apache/maven/scm/tck/command/update/UpdateCommandTckTest.java
Thu Jan 13 23:18:20 2011
@@ -67,7 +67,7 @@ public abstract class UpdateCommandTckTe
 
         assertTrue( "Check result was successful, output: " + result.getCommandOutput(),
result.isSuccess() );
 
-        List committedFiles = result.getCheckedInFiles();
+        List<ScmFile> committedFiles = result.getCheckedInFiles();
 
         assertEquals(
             "Expected 3 files in the committed files list:\n  " + StringUtils.join( committedFiles.iterator(),
"\n  " ),
@@ -142,9 +142,9 @@ public abstract class UpdateCommandTckTe
 
         assertResultIsSuccess( result );
 
-        List updatedFiles = result.getUpdatedFiles();
+        List<ScmFile> updatedFiles = result.getUpdatedFiles();
 
-        List changedSets = result.getChanges();
+        List<ChangeSet> changedSets = result.getChanges();
 
         assertEquals( "Expected 3 files in the updated files list " + updatedFiles, 3, updatedFiles.size()
);
 
@@ -152,9 +152,9 @@ public abstract class UpdateCommandTckTe
 
         assertFalse( "The changed files list is empty ", changedSets.isEmpty() );
 
-        for ( Iterator i = changedSets.iterator(); i.hasNext(); )
+        for ( Iterator<ChangeSet> i = changedSets.iterator(); i.hasNext(); )
         {
-            ChangeSet changeSet = (ChangeSet) i.next();
+            ChangeSet changeSet = i.next();
             System.out.println( changeSet.toXML() );
         }
 
@@ -162,7 +162,7 @@ public abstract class UpdateCommandTckTe
         // Assert the files in the updated files list
         // ----------------------------------------------------------------------
 
-        Iterator files = new TreeSet( updatedFiles ).iterator();
+        Iterator<ScmFile> files = new TreeSet<ScmFile>( updatedFiles ).iterator();
 
         //Foo.java
         ScmFile file = (ScmFile) files.next();

Modified: maven/scm/trunk/maven-scm-test/src/test/java/org/apache/maven/scm/manager/ScmManagerStubTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-test/src/test/java/org/apache/maven/scm/manager/ScmManagerStubTest.java?rev=1058791&r1=1058790&r2=1058791&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-test/src/test/java/org/apache/maven/scm/manager/ScmManagerStubTest.java
(original)
+++ maven/scm/trunk/maven-scm-test/src/test/java/org/apache/maven/scm/manager/ScmManagerStubTest.java
Thu Jan 13 23:18:20 2011
@@ -41,7 +41,7 @@ public class ScmManagerStubTest
 
     private ScmManagerStub scmManagerStub;
 
-    private List messages;
+    private List<String> messages;
 
     private ScmProvider scmProvider;
 
@@ -52,7 +52,7 @@ public class ScmManagerStubTest
     {
         super.setUp();
 
-        messages = new ArrayList( 0 );
+        messages = new ArrayList<String>( 0 );
         scmProvider = new ScmProviderStub();
         scmRepository = new ScmRepositoryStub();
 
@@ -87,7 +87,7 @@ public class ScmManagerStubTest
      */
     public void testValidateScmRepository()
     {
-        List list = scmManagerStub.validateScmRepository( "" );
+        List<String> list = scmManagerStub.validateScmRepository( "" );
         assertSame( messages, list );
     }
 



Mime
View raw message