commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chtom...@apache.org
Subject [4/5] [text] TEXT-23: Removing dependency on ArrayUtils
Date Sun, 13 Nov 2016 20:30:18 GMT
TEXT-23: Removing dependency on ArrayUtils


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

Branch: refs/heads/master
Commit: e330798a8b3762ef8acd354cff5f152639839f08
Parents: 8425829
Author: Rob Tompkins <chtompki@gmail.com>
Authored: Tue Nov 8 10:21:59 2016 -0500
Committer: Rob Tompkins <chtompki@gmail.com>
Committed: Tue Nov 8 10:21:59 2016 -0500

----------------------------------------------------------------------
 .../apache/commons/text/translate/AggregateTranslator.java   | 8 +++++---
 .../java/org/apache/commons/text/AlphabetConverterTest.java  | 2 +-
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-text/blob/e330798a/src/main/java/org/apache/commons/text/translate/AggregateTranslator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/text/translate/AggregateTranslator.java b/src/main/java/org/apache/commons/text/translate/AggregateTranslator.java
index d550037..d8b50e8 100644
--- a/src/main/java/org/apache/commons/text/translate/AggregateTranslator.java
+++ b/src/main/java/org/apache/commons/text/translate/AggregateTranslator.java
@@ -16,8 +16,6 @@
  */
 package org.apache.commons.text.translate;
 
-import org.apache.commons.lang3.ArrayUtils;
-
 import java.io.IOException;
 import java.io.Writer;
 
@@ -37,7 +35,11 @@ public class AggregateTranslator extends CharSequenceTranslator {
      * @param translators CharSequenceTranslator array to aggregate
      */
     public AggregateTranslator(final CharSequenceTranslator... translators) {
-        this.translators = ArrayUtils.clone(translators);
+        if (translators != null) {
+            this.translators = translators.clone();
+        } else {
+            this.translators = null;
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/commons-text/blob/e330798a/src/test/java/org/apache/commons/text/AlphabetConverterTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/text/AlphabetConverterTest.java b/src/test/java/org/apache/commons/text/AlphabetConverterTest.java
index ac98052..21c137c 100644
--- a/src/test/java/org/apache/commons/text/AlphabetConverterTest.java
+++ b/src/test/java/org/apache/commons/text/AlphabetConverterTest.java
@@ -26,7 +26,7 @@ import org.junit.Test;
 import org.junit.rules.ExpectedException;
 
 /**
- * Unit tests for {@link org.apache.commons.lang3.text.AlphabetConverter}.
+ * Unit tests for {@link org.apache.commons.text.AlphabetConverter}.
  */
 public class AlphabetConverterTest {
 


Mime
View raw message