commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [1/5] commons-collections git commit: Revert "Use final for locals."
Date Wed, 11 Oct 2017 22:37:14 GMT
Repository: commons-collections
Updated Branches:
  refs/heads/master 712ddb1e1 -> eed8a7adb


http://git-wip-us.apache.org/repos/asf/commons-collections/blob/992ab3c9/src/test/java/org/apache/commons/collections4/sequence/SequencesComparatorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/sequence/SequencesComparatorTest.java
b/src/test/java/org/apache/commons/collections4/sequence/SequencesComparatorTest.java
index 88bb25a..f2795ec 100644
--- a/src/test/java/org/apache/commons/collections4/sequence/SequencesComparatorTest.java
+++ b/src/test/java/org/apache/commons/collections4/sequence/SequencesComparatorTest.java
@@ -130,7 +130,7 @@ public class SequencesComparatorTest {
         final ExecutionVisitor<String> ev = new ExecutionVisitor<>();
 
         for (int i = 0; i < shadokSentences.size(); ++i) {
-            for (final List<String> shadokSentence : shadokSentences) {
+            for (List<String> shadokSentence : shadokSentences) {
                 ev.setList(shadokSentences.get(i));
                 new SequencesComparator<>(shadokSentences.get(i),
                         shadokSentence).getScript().visit(ev);

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/992ab3c9/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java b/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java
index 089b919..cea912a 100644
--- a/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java
@@ -62,7 +62,7 @@ public abstract class AbstractSetTest<E> extends AbstractCollectionTest<E>
{
         assertEquals("Sets should have equal hashCodes",
                      getConfirmed().hashCode(), getCollection().hashCode());
         final Collection<E> set = makeConfirmedCollection();
-        for (final E element : getCollection()) {
+        for (E element : getCollection()) {
             assertTrue("Set.iterator should only return unique elements", set.add(element));
         }
     }

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/992ab3c9/src/test/java/org/apache/commons/collections4/trie/PatriciaTrieTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/collections4/trie/PatriciaTrieTest.java b/src/test/java/org/apache/commons/collections4/trie/PatriciaTrieTest.java
index 2660b12..88919a3 100755
--- a/src/test/java/org/apache/commons/collections4/trie/PatriciaTrieTest.java
+++ b/src/test/java/org/apache/commons/collections4/trie/PatriciaTrieTest.java
@@ -331,7 +331,7 @@ public class PatriciaTrieTest<V> extends AbstractSortedMapTest<String,
V> {
 
     public void testPrefixMapSizes() {
         // COLLECTIONS-525
-        final PatriciaTrie<String> aTree = new PatriciaTrie<>();
+        PatriciaTrie<String> aTree = new PatriciaTrie<>();
         aTree.put("点评", "测试");
         aTree.put("书评", "测试");
         assertTrue(aTree.prefixMap("点").containsKey("点评"));
@@ -370,7 +370,7 @@ public class PatriciaTrieTest<V> extends AbstractSortedMapTest<String,
V> {
     }
 
     public void testPrefixMapClear() {
-        final Trie<String, Integer> trie = new PatriciaTrie<>();
+        Trie<String, Integer> trie = new PatriciaTrie<>();
         trie.put("Anna", 1);
         trie.put("Anael", 2);
         trie.put("Analu", 3);
@@ -378,7 +378,7 @@ public class PatriciaTrieTest<V> extends AbstractSortedMapTest<String,
V> {
         trie.put("Andrea", 5);
         trie.put("Andres", 6);
         trie.put("Anatole", 7);
-        final SortedMap<String, Integer> prefixMap = trie.prefixMap("And");
+        SortedMap<String, Integer> prefixMap = trie.prefixMap("And");
         assertEquals(new HashSet<>(Arrays.asList("Andrea", "Andreas", "Andres")), prefixMap.keySet());
         assertEquals(Arrays.asList(5, 4, 6), new ArrayList<>(prefixMap.values()));
 
@@ -391,8 +391,8 @@ public class PatriciaTrieTest<V> extends AbstractSortedMapTest<String,
V> {
     }
 
     public void testPrefixMapClearNothing() {
-        final Trie<String, Integer> trie = new PatriciaTrie<>();
-        final SortedMap<String, Integer> prefixMap = trie.prefixMap("And");
+        Trie<String, Integer> trie = new PatriciaTrie<>();
+        SortedMap<String, Integer> prefixMap = trie.prefixMap("And");
         assertEquals(new HashSet<String>(), prefixMap.keySet());
         assertEquals(new ArrayList<Integer>(0), new ArrayList<>(prefixMap.values()));
 
@@ -405,7 +405,7 @@ public class PatriciaTrieTest<V> extends AbstractSortedMapTest<String,
V> {
     }
 
     public void testPrefixMapClearUsingRemove() {
-        final Trie<String, Integer> trie = new PatriciaTrie<>();
+        Trie<String, Integer> trie = new PatriciaTrie<>();
         trie.put("Anna", 1);
         trie.put("Anael", 2);
         trie.put("Analu", 3);
@@ -413,11 +413,11 @@ public class PatriciaTrieTest<V> extends AbstractSortedMapTest<String,
V> {
         trie.put("Andrea", 5);
         trie.put("Andres", 6);
         trie.put("Anatole", 7);
-        final SortedMap<String, Integer> prefixMap = trie.prefixMap("And");
+        SortedMap<String, Integer> prefixMap = trie.prefixMap("And");
         assertEquals(new HashSet<>(Arrays.asList("Andrea", "Andreas", "Andres")), prefixMap.keySet());
         assertEquals(Arrays.asList(5, 4, 6), new ArrayList<>(prefixMap.values()));
 
-        final Set<String> keys = new HashSet<>(prefixMap.keySet());
+        Set<String> keys = new HashSet<>(prefixMap.keySet());
         for (final String key : keys) {
             prefixMap.remove(key);
         }


Mime
View raw message