commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject [5/6] [text] Remove redundant type arguments.
Date Sat, 19 Nov 2016 18:36:09 GMT
Remove redundant type arguments.

Project: http://git-wip-us.apache.org/repos/asf/commons-text/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-text/commit/4c38c532
Tree: http://git-wip-us.apache.org/repos/asf/commons-text/tree/4c38c532
Diff: http://git-wip-us.apache.org/repos/asf/commons-text/diff/4c38c532

Branch: refs/heads/master
Commit: 4c38c532e84f20b8367b01788cad7884a74a9ef6
Parents: eb5e153
Author: Gary Gregory <ggregory@apache.org>
Authored: Sat Nov 19 10:34:18 2016 -0800
Committer: Gary Gregory <ggregory@apache.org>
Committed: Sat Nov 19 10:34:18 2016 -0800

----------------------------------------------------------------------
 .../org/apache/commons/text/translate/LookupTranslator.java  | 4 ++--
 .../similarity/ParameterizedSimilarityScoreFromTest.java     | 2 +-
 .../org/apache/commons/text/translate/EntityArraysTest.java  | 8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-text/blob/4c38c532/src/main/java/org/apache/commons/text/translate/LookupTranslator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/text/translate/LookupTranslator.java b/src/main/java/org/apache/commons/text/translate/LookupTranslator.java
index f73f312..df8161d 100644
--- a/src/main/java/org/apache/commons/text/translate/LookupTranslator.java
+++ b/src/main/java/org/apache/commons/text/translate/LookupTranslator.java
@@ -41,8 +41,8 @@ public class LookupTranslator extends CharSequenceTranslator {
      * @param lookup CharSequence[][] table of size [*][2]
      */
     public LookupTranslator(final CharSequence[]... lookup) {
-        lookupMap = new HashMap<String, String>();
-        prefixSet = new HashSet<Character>();
+        lookupMap = new HashMap<>();
+        prefixSet = new HashSet<>();
         int _shortest = Integer.MAX_VALUE;
         int _longest = 0;
         if (lookup != null) {

http://git-wip-us.apache.org/repos/asf/commons-text/blob/4c38c532/src/test/java/org/apache/commons/text/similarity/ParameterizedSimilarityScoreFromTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/text/similarity/ParameterizedSimilarityScoreFromTest.java
b/src/test/java/org/apache/commons/text/similarity/ParameterizedSimilarityScoreFromTest.java
index 0ac3ea2..747f748 100644
--- a/src/test/java/org/apache/commons/text/similarity/ParameterizedSimilarityScoreFromTest.java
+++ b/src/test/java/org/apache/commons/text/similarity/ParameterizedSimilarityScoreFromTest.java
@@ -59,7 +59,7 @@ public class ParameterizedSimilarityScoreFromTest<R> {
 
     @Test
     public void test() {
-        final SimilarityScoreFrom<R> similarityScoreFrom = new SimilarityScoreFrom<R>(similarityScore,
left);
+        final SimilarityScoreFrom<R> similarityScoreFrom = new SimilarityScoreFrom<>(similarityScore,
left);
         assertThat(similarityScoreFrom.apply(right), equalTo(distance));
     }
 }

http://git-wip-us.apache.org/repos/asf/commons-text/blob/4c38c532/src/test/java/org/apache/commons/text/translate/EntityArraysTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/text/translate/EntityArraysTest.java b/src/test/java/org/apache/commons/text/translate/EntityArraysTest.java
index f61dd72..dee161d 100644
--- a/src/test/java/org/apache/commons/text/translate/EntityArraysTest.java
+++ b/src/test/java/org/apache/commons/text/translate/EntityArraysTest.java
@@ -38,8 +38,8 @@ public class EntityArraysTest  {
     // LANG-659 - check arrays for duplicate entries
     @Test
     public void testHTML40_EXTENDED_ESCAPE(){
-        final Set<String> col0 = new HashSet<String>();
-        final Set<String> col1 = new HashSet<String>();
+        final Set<String> col0 = new HashSet<>();
+        final Set<String> col1 = new HashSet<>();
         final String [][] sa = org.apache.commons.text.translate.EntityArrays.HTML40_EXTENDED_ESCAPE();
         for(int i =0; i <sa.length; i++){
             assertTrue("Already added entry 0: "+i+" "+sa[i][0],col0.add(sa[i][0]));
@@ -50,8 +50,8 @@ public class EntityArraysTest  {
    // LANG-658 - check arrays for duplicate entries
     @Test
     public void testISO8859_1_ESCAPE(){
-        final Set<String> col0 = new HashSet<String>();
-        final Set<String> col1 = new HashSet<String>();
+        final Set<String> col0 = new HashSet<>();
+        final Set<String> col1 = new HashSet<>();
         final String [][] sa = EntityArrays.ISO8859_1_ESCAPE();
         boolean success = true;
         for(int i =0; i <sa.length; i++){


Mime
View raw message