maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r1044851 - /maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/TestsToRun.java
Date Sun, 12 Dec 2010 16:58:08 GMT
Author: krosenvold
Date: Sun Dec 12 16:58:08 2010
New Revision: 1044851

URL: http://svn.apache.org/viewvc?rev=1044851&view=rev
Log:
o Made underlying collection unmodifyable

Modified:
    maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/TestsToRun.java

Modified: maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/TestsToRun.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/TestsToRun.java?rev=1044851&r1=1044850&r2=1044851&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/TestsToRun.java
(original)
+++ maven/surefire/trunk/surefire-api/src/main/java/org/apache/maven/surefire/util/TestsToRun.java
Sun Dec 12 16:58:08 2010
@@ -22,6 +22,7 @@ package org.apache.maven.surefire.util;
 import org.apache.maven.surefire.testset.TestSetFailedException;
 
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
@@ -44,7 +45,7 @@ public class TestsToRun
      */
     public TestsToRun( List locatedClasses )
     {
-        this.locatedClasses = locatedClasses;
+        this.locatedClasses = Collections.unmodifiableList( locatedClasses);
         Set testSets = new HashSet();
 
         for ( Iterator iterator = locatedClasses.iterator(); iterator.hasNext(); )
@@ -83,6 +84,7 @@ public class TestsToRun
 
     /**
      * Returns an iterator over the located java.lang.Class objects
+     * @return an unmodifiable iterator
      */
     public Iterator iterator()
     {



Mime
View raw message