maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1058774 - in /maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src: main/java/org/apache/maven/scm/provider/starteam/ main/java/org/apache/maven/scm/provider/starteam/command/ main/java/org/apache/maven/scm/provider/starteam...
Date Thu, 13 Jan 2011 22:51:52 GMT
Author: olamy
Date: Thu Jan 13 22:51:51 2011
New Revision: 1058774

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

Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/StarteamScmProvider.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/StarteamCommandLineUtils.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/remove/StarteamRemoveConsumer.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/add/StarteamAddConsumerTest.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogConsumerTest.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkin/StarteamCheckInConsumerTest.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkout/StarteamCheckOutConsumerTest.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/diff/StarteamDiffConsumerTest.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/edit/StarteamEditConsumerTest.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/remove/StarteamRemoveConsumerTest.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/status/StarteamStatusConsumerTest.java
    maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/unedit/StarteamUnEditConsumerTest.java

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/StarteamScmProvider.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/StarteamScmProvider.java?rev=1058774&r1=1058773&r2=1058774&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/StarteamScmProvider.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/StarteamScmProvider.java
Thu Jan 13 22:51:51 2011
@@ -19,6 +19,11 @@ package org.apache.maven.scm.provider.st
  * under the License.
  */
 
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.maven.scm.CommandParameters;
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFileSet;
@@ -50,10 +55,6 @@ import org.apache.maven.scm.provider.sta
 import org.apache.maven.scm.repository.ScmRepositoryException;
 import org.codehaus.plexus.util.StringUtils;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Arrays;
-
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -321,21 +322,27 @@ public class StarteamScmProvider
         throws ScmException
     {
         ScmFileSet newFileSet = null;
+        
         try
         {
             File basedir = getAbsoluteFilePath( currentFileSet.getBasedir() );
 
-            File[] files = currentFileSet.getFiles();
+            List<File> files = currentFileSet.getFileList();
 
-            for ( int i = 0; i < files.length; ++i )
+            List<File> relPathFiles = new ArrayList<File>(files.size());
+            
+            for ( File file : files )
             {
-                if ( files[i].isAbsolute() )
+                if ( file.isAbsolute() )
                 {
-                    files[i] = new File( getRelativePath( basedir, files[i] ) );
+                    relPathFiles.add( new File( getRelativePath( basedir, file ) ));
+                } else {
+                    relPathFiles.add( file );
                 }
+                
             }
 
-            newFileSet = new ScmFileSet( basedir, Arrays.asList( files ) );
+            newFileSet = new ScmFileSet( basedir, relPathFiles );
         }
         catch ( IOException e )
         {

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/StarteamCommandLineUtils.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/StarteamCommandLineUtils.java?rev=1058774&r1=1058773&r2=1058774&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/StarteamCommandLineUtils.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/StarteamCommandLineUtils.java
Thu Jan 13 22:51:51 2011
@@ -61,16 +61,16 @@ public class StarteamCommandLineUtils
         return cl;
     }
 
-    private static Commandline addCommandlineArguments( Commandline cl, List args )
+    private static Commandline addCommandlineArguments( Commandline cl, List<String>
args )
     {
-        for ( int i = 0; args != null && i < args.size(); ++i )
+        for ( String arg : args )
         {
-            cl.createArg().setValue( (String) args.get( i ) );
+            cl.createArg().setValue( arg );
         }
         return cl;
     }
 
-    public static Commandline createStarteamCommandLine( String action, List args, ScmFileSet
scmFileSet,
+    public static Commandline createStarteamCommandLine( String action, List<String>
args, ScmFileSet scmFileSet,
                                                          StarteamScmProviderRepository repo
)
     {
         Commandline cl = StarteamCommandLineUtils.createStarteamBaseCommandLine( action,
repo );
@@ -150,7 +150,7 @@ public class StarteamCommandLineUtils
         }
     }
 
-    public static void addEOLOption( List args )
+    public static void addEOLOption( List<String> args )
     {
         if ( settings.getEol() != null  )
         {

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/remove/StarteamRemoveConsumer.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/remove/StarteamRemoveConsumer.java?rev=1058774&r1=1058773&r2=1058774&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/remove/StarteamRemoveConsumer.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/main/java/org/apache/maven/scm/provider/starteam/command/remove/StarteamRemoveConsumer.java
Thu Jan 13 22:51:51 2011
@@ -45,7 +45,7 @@ public class StarteamRemoveConsumer
      */
     private String currentDir;
 
-    private List files = new ArrayList();
+    private List<ScmFile> files = new ArrayList<ScmFile>();
 
     /**
      * Marks current directory data
@@ -100,7 +100,7 @@ public class StarteamRemoveConsumer
         }
     }
 
-    public List getRemovedFiles()
+    public List<ScmFile> getRemovedFiles()
     {
         return files;
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/add/StarteamAddConsumerTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/add/StarteamAddConsumerTest.java?rev=1058774&r1=1058773&r2=1058774&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/add/StarteamAddConsumerTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/add/StarteamAddConsumerTest.java
Thu Jan 13 22:51:51 2011
@@ -53,15 +53,15 @@ public class StarteamAddConsumerTest
             consumer.consumeLine( TEST_OUTPUT[i] );
         }
 
-        Collection entries = consumer.getAddedFiles();
+        Collection<ScmFile> entries = consumer.getAddedFiles();
 
         assertEquals( "Wrong number of entries returned", 7, entries.size() );
 
         ScmFile entry;
 
-        for ( Iterator i = entries.iterator(); i.hasNext(); )
+        for ( Iterator<ScmFile> i = entries.iterator(); i.hasNext(); )
         {
-            entry = (ScmFile) i.next();
+            entry = i.next();
 
             assertTrue( entry.getPath().startsWith( "./" ) );
 

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogConsumerTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogConsumerTest.java?rev=1058774&r1=1058773&r2=1058774&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogConsumerTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/changelog/StarteamChangeLogConsumerTest.java
Thu Jan 13 22:51:51 2011
@@ -55,7 +55,7 @@ public class StarteamChangeLogConsumerTe
         }
     }
 
-    private List parseTestFile()
+    private List<ChangeSet> parseTestFile()
         throws Exception
     {
         /* must match the working directory in the text test file */
@@ -84,30 +84,26 @@ public class StarteamChangeLogConsumerTe
     public void testNumberOfModifications()
         throws Exception
     {
-        List entries = parseTestFile();
+        List<ChangeSet> entries = parseTestFile();
 
         assertEquals( "Wrong number of entries returned", 6, entries.size() );
 
-        ChangeSet entry = null;
-
-        for ( Iterator i = entries.iterator(); i.hasNext(); )
+        for ( Iterator<ChangeSet> i = entries.iterator(); i.hasNext(); )
         {
-            entry = (ChangeSet) i.next();
-
             assertTrue( "ChangeLogEntry erroneously picked up",
-                        entry.toString().indexOf( "ChangeLogEntry.java" ) == -1 );
+                        i.next().toString().indexOf( "ChangeLogEntry.java" ) == -1 );
         }
     }
 
     public void testRelativeFilePath()
         throws Exception
     {
-        List entries = parseTestFile();
+        List<ChangeSet> entries = parseTestFile();
 
         // ensure the filename in the first ChangeSet has correct relative path
         ChangeSet entry = (ChangeSet) entries.get( 1 );
 
-        assertTrue( entry.containsFilename( "./maven/src/File2.java", null ) );
+        assertTrue( entry.containsFilename( "./maven/src/File2.java" ));
     }
 
     public void testLocales()

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkin/StarteamCheckInConsumerTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkin/StarteamCheckInConsumerTest.java?rev=1058774&r1=1058773&r2=1058774&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkin/StarteamCheckInConsumerTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkin/StarteamCheckInConsumerTest.java
Thu Jan 13 22:51:51 2011
@@ -19,15 +19,14 @@ package org.apache.maven.scm.provider.st
  * under the License.
  */
 
+import java.io.File;
+import java.util.Collection;
+
 import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileStatus;
 import org.apache.maven.scm.ScmTestCase;
 import org.apache.maven.scm.log.DefaultLog;
 
-import java.io.File;
-import java.util.Collection;
-import java.util.Iterator;
-
 /**
  * @author <a href="mailto:dantran@gmail.com">Dan T. Tran</a>
  */
@@ -53,16 +52,14 @@ public class StarteamCheckInConsumerTest
             consumer.consumeLine( TEST_OUTPUT[i] );
         }
 
-        Collection entries = consumer.getCheckedInFiles();
+        Collection<ScmFile> entries = consumer.getCheckedInFiles();
 
         assertEquals( "Wrong number of entries returned", 4, entries.size() );
 
-        ScmFile entry;
+        ;
 
-        for ( Iterator i = entries.iterator(); i.hasNext(); )
+        for ( ScmFile entry : entries )
         {
-            entry = (ScmFile) i.next();
-
             assertTrue( entry.getPath().startsWith( "./" ) );
 
             assertTrue( entry.getStatus() == ScmFileStatus.CHECKED_OUT );

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkout/StarteamCheckOutConsumerTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkout/StarteamCheckOutConsumerTest.java?rev=1058774&r1=1058773&r2=1058774&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkout/StarteamCheckOutConsumerTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/checkout/StarteamCheckOutConsumerTest.java
Thu Jan 13 22:51:51 2011
@@ -19,15 +19,14 @@ package org.apache.maven.scm.provider.st
  * under the License.
  */
 
+import java.io.File;
+import java.util.Collection;
+
 import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileStatus;
 import org.apache.maven.scm.ScmTestCase;
 import org.apache.maven.scm.log.DefaultLog;
 
-import java.io.File;
-import java.util.Collection;
-import java.util.Iterator;
-
 /**
  * @author <a href="mailto:dantran@gmail.com">Dan T. Tran</a>
  */
@@ -55,16 +54,14 @@ public class StarteamCheckOutConsumerTes
             consumer.consumeLine( TEST_OUTPUT[i] );
         }
 
-        Collection entries = consumer.getCheckedOutFiles();
+        Collection<ScmFile> entries = consumer.getCheckedOutFiles();
 
         assertEquals( "Wrong number of entries returned", 9, entries.size() );
 
-        ScmFile entry;
+        ;
 
-        for ( Iterator i = entries.iterator(); i.hasNext(); )
+        for ( ScmFile entry : entries )
         {
-            entry = (ScmFile) i.next();
-
             assertTrue( entry.getPath().startsWith( "./" ) );
 
             assertTrue( entry.getStatus() == ScmFileStatus.CHECKED_OUT );

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/diff/StarteamDiffConsumerTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/diff/StarteamDiffConsumerTest.java?rev=1058774&r1=1058773&r2=1058774&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/diff/StarteamDiffConsumerTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/diff/StarteamDiffConsumerTest.java
Thu Jan 13 22:51:51 2011
@@ -19,15 +19,16 @@ package org.apache.maven.scm.provider.st
  * under the License.
  */
 
-import org.apache.maven.scm.ScmTestCase;
-import org.apache.maven.scm.log.DefaultLog;
-
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStreamReader;
 import java.util.Collection;
 
+import org.apache.maven.scm.ScmFile;
+import org.apache.maven.scm.ScmTestCase;
+import org.apache.maven.scm.log.DefaultLog;
+
 /**
  * @author <a href="mailto:dantran@gmail.com">Dan T. Tran</a>
  */
@@ -64,7 +65,7 @@ public class StarteamDiffConsumerTest
             s = in.readLine();
         }
 
-        Collection entries = consumer.getChangedFiles();
+        Collection<ScmFile> entries = consumer.getChangedFiles();
 
         assertEquals( "Wrong number of entries returned", 3, entries.size() );
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/edit/StarteamEditConsumerTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/edit/StarteamEditConsumerTest.java?rev=1058774&r1=1058773&r2=1058774&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/edit/StarteamEditConsumerTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/edit/StarteamEditConsumerTest.java
Thu Jan 13 22:51:51 2011
@@ -19,12 +19,13 @@ package org.apache.maven.scm.provider.st
  * under the License.
  */
 
-import org.apache.maven.scm.ScmTestCase;
-import org.apache.maven.scm.log.DefaultLog;
-
 import java.io.File;
 import java.util.Collection;
 
+import org.apache.maven.scm.ScmFile;
+import org.apache.maven.scm.ScmTestCase;
+import org.apache.maven.scm.log.DefaultLog;
+
 /**
  * @author <a href="mailto:dantran@gmail.com">Dan T. Tran</a>
  */
@@ -50,7 +51,7 @@ public class StarteamEditConsumerTest
             consumer.consumeLine( TEST_OUTPUT[i] );
         }
 
-        Collection entries = consumer.getEditedFiles();
+        Collection<ScmFile> entries = consumer.getEditedFiles();
 
         assertEquals( "Wrong number of entries returned", 7, entries.size() );
 

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/remove/StarteamRemoveConsumerTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/remove/StarteamRemoveConsumerTest.java?rev=1058774&r1=1058773&r2=1058774&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/remove/StarteamRemoveConsumerTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/remove/StarteamRemoveConsumerTest.java
Thu Jan 13 22:51:51 2011
@@ -19,15 +19,14 @@ package org.apache.maven.scm.provider.st
  * under the License.
  */
 
+import java.io.File;
+import java.util.Collection;
+
 import org.apache.maven.scm.ScmFile;
 import org.apache.maven.scm.ScmFileStatus;
 import org.apache.maven.scm.ScmTestCase;
 import org.apache.maven.scm.log.DefaultLog;
 
-import java.io.File;
-import java.util.Collection;
-import java.util.Iterator;
-
 /**
  * @author <a href="mailto:dantran@gmail.com">Dan T. Tran</a>
  */
@@ -53,15 +52,13 @@ public class StarteamRemoveConsumerTest
             consumer.consumeLine( TEST_OUTPUT[i] );
         }
 
-        Collection entries = consumer.getRemovedFiles();
+        Collection<ScmFile> entries = consumer.getRemovedFiles();
 
         assertEquals( "Wrong number of entries returned", 7, entries.size() );
 
-        ScmFile entry;
 
-        for ( Iterator i = entries.iterator(); i.hasNext(); )
+        for ( ScmFile entry : entries )
         {
-            entry = (ScmFile) i.next();
 
             assertTrue( entry.getPath().startsWith( "./" ) );
 

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/status/StarteamStatusConsumerTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/status/StarteamStatusConsumerTest.java?rev=1058774&r1=1058773&r2=1058774&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/status/StarteamStatusConsumerTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/status/StarteamStatusConsumerTest.java
Thu Jan 13 22:51:51 2011
@@ -19,14 +19,13 @@ package org.apache.maven.scm.provider.st
  * under the License.
  */
 
-import org.apache.maven.scm.ScmTestCase;
-import org.apache.maven.scm.log.DefaultLog;
-
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.InputStreamReader;
-import java.util.Collection;
+
+import org.apache.maven.scm.ScmTestCase;
+import org.apache.maven.scm.log.DefaultLog;
 
 /**
  * @author <a href="mailto:dantran@gmail.com">Dan T. Tran</a>
@@ -64,10 +63,8 @@ public class StarteamStatusConsumerTest
 
             s = in.readLine();
         }
-
-        Collection entries = consumer.getChangedFiles();
-
-        assertEquals( "Wrong number of entries returned", 4, entries.size() );
+        
+        assertEquals( "Wrong number of entries returned", 4, consumer.getChangedFiles() );
 
         // TODO add more validation to the entries
     }

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/unedit/StarteamUnEditConsumerTest.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/unedit/StarteamUnEditConsumerTest.java?rev=1058774&r1=1058773&r2=1058774&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/unedit/StarteamUnEditConsumerTest.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-provider-starteam/src/test/java/org/apache/maven/scm/provider/starteam/command/unedit/StarteamUnEditConsumerTest.java
Thu Jan 13 22:51:51 2011
@@ -19,12 +19,11 @@ package org.apache.maven.scm.provider.st
  * under the License.
  */
 
+import java.io.File;
+
 import org.apache.maven.scm.ScmTestCase;
 import org.apache.maven.scm.log.DefaultLog;
 
-import java.io.File;
-import java.util.Collection;
-
 /**
  * @author <a href="mailto:dantran@gmail.com">Dan T. Tran</a>
  */
@@ -50,9 +49,7 @@ public class StarteamUnEditConsumerTest
             consumer.consumeLine( TEST_OUTPUT[i] );
         }
 
-        Collection entries = consumer.getUnEditFiles();
-
-        assertEquals( "Wrong number of entries returned", 7, entries.size() );
+        assertEquals( "Wrong number of entries returned", 7, consumer.getUnEditFiles().size()
);
 
     }
 



Mime
View raw message