commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chtom...@apache.org
Subject [5/8] [text] added arg list to instance variable
Date Thu, 29 Jun 2017 02:11:45 GMT
added arg list to instance variable


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

Branch: refs/heads/master
Commit: f9177e204d608e7fa708d57fabf0029746f7774a
Parents: b7ac42b
Author: Amey Jadiye <ameyjadiye@gmail.com>
Authored: Fri Jun 23 11:22:21 2017 +0530
Committer: Amey Jadiye <ameyjadiye@gmail.com>
Committed: Fri Jun 23 11:22:21 2017 +0530

----------------------------------------------------------------------
 .../java/org/apache/commons/text/RandomStringGenerator.java  | 4 ++--
 .../org/apache/commons/text/RandomStringGeneratorTest.java   | 8 ++++++++
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-text/blob/f9177e20/src/main/java/org/apache/commons/text/RandomStringGenerator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/text/RandomStringGenerator.java b/src/main/java/org/apache/commons/text/RandomStringGenerator.java
index 620b99e..0111746 100644
--- a/src/main/java/org/apache/commons/text/RandomStringGenerator.java
+++ b/src/main/java/org/apache/commons/text/RandomStringGenerator.java
@@ -434,9 +434,9 @@ public final class RandomStringGenerator {
          * @return {@code this}, to allow method chaining
          */
         public Builder selectFromList(List<Character> characterList) {
-            characterList = new ArrayList<Character>();
+            this.characterList = new ArrayList<Character>();
             for (char c : characterList) {
-                characterList.add(c);
+                this.characterList.add(c);
             }
             return this;
         }

http://git-wip-us.apache.org/repos/asf/commons-text/blob/f9177e20/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
index 501284c..3769be2 100644
--- a/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
+++ b/src/test/java/org/apache/commons/text/RandomStringGeneratorTest.java
@@ -232,6 +232,14 @@ public class RandomStringGeneratorTest {
         assertEquals("", generator.generate(0));
     }
 
+
+
+
+
+
+
+
+    
     @Test
     public void testSelectFromList() {
         List<Character> list = new ArrayList<Character>();


Mime
View raw message