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:05:40 UTC

[GitHub] [commons-text] arturobernalg opened a new pull request #196: Minor Improvement:

arturobernalg opened a new pull request #196:
URL: https://github.com/apache/commons-text/pull/196


   * Remove redundant initializer
   *  Use Empty array


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
arturobernalg commented on a change in pull request #196:
URL: https://github.com/apache/commons-text/pull/196#discussion_r559182562



##########
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:
       True. Changed for ArrayUtils.EMPTY_STRING_ARRAY

##########
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:
       Changed  for ArrayUtils.EMPTY_STRING_ARRAY




----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
arturobernalg commented on a change in pull request #196:
URL: https://github.com/apache/commons-text/pull/196#discussion_r559182562



##########
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:
       True. Change it for ArrayUtils.EMPTY_STRING_ARRAY




----------------------------------------------------------------
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



[GitHub] [commons-text] garydgregory merged pull request #196: Minor Improvements

Posted by GitBox <gi...@apache.org>.
garydgregory merged pull request #196:
URL: https://github.com/apache/commons-text/pull/196


   


----------------------------------------------------------------
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



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

Posted by GitBox <gi...@apache.org>.
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



[GitHub] [commons-text] coveralls commented on pull request #196: Minor Improvements

Posted by GitBox <gi...@apache.org>.
coveralls commented on pull request #196:
URL: https://github.com/apache/commons-text/pull/196#issuecomment-761814375


   
   [![Coverage Status](https://coveralls.io/builds/36382066/badge)](https://coveralls.io/builds/36382066)
   
   Coverage decreased (-0.0007%) to 98.687% when pulling **1cab6c0552de36ce5176c2feb139094a451d0fa6 on arturobernalg:feature/minor_improvements** into **f0f6347040618a04c6b9bc4351dd8dff84b178be on apache:master**.
   


----------------------------------------------------------------
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