You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2021/01/17 12:52:19 UTC

[GitHub] [commons-text] garydgregory commented on a change in pull request #196: Minor Improvement:

garydgregory commented on a change in pull request #196:
URL: https://github.com/apache/commons-text/pull/196#discussion_r559177247



##########
File path: src/main/java/org/apache/commons/text/StrTokenizer.java
##########
@@ -124,10 +124,12 @@
     private StrMatcher trimmerMatcher = StrMatcher.noneMatcher();
 
     /** Whether to return empty tokens as null. */
-    private boolean emptyAsNull = false;
+    private boolean emptyAsNull;
     /** Whether to ignore empty tokens. */
     private boolean ignoreEmptyTokens = true;
 
+    private static final String[] EMPTY_STRING_ARRAY = new String[0];

Review comment:
       -1, reuse ArrayUtils.

##########
File path: src/main/java/org/apache/commons/text/StringTokenizer.java
##########
@@ -130,10 +130,12 @@
     private StringMatcher trimmerMatcher = StringMatcherFactory.INSTANCE.noneMatcher();
 
     /** Whether to return empty tokens as null. */
-    private boolean emptyAsNull = false;
+    private boolean emptyAsNull;
     /** Whether to ignore empty tokens. */
     private boolean ignoreEmptyTokens = true;
 
+    private static final String[] EMPTY_STRING_ARRAY = new String[0];

Review comment:
       -1, reuse ArrayUtils.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org