[GitHub] rosti-il commented on a change in pull request #392: LANG-1410: eliminate one unnecessary local int variable and add more tests

2018-12-20 Thread GitBox
rosti-il commented on a change in pull request #392: LANG-1410: eliminate one 
unnecessary local int variable and add more tests
URL: https://github.com/apache/commons-lang/pull/392#discussion_r243349505
 
 

 ##
 File path: src/main/java/org/apache/commons/lang3/StringUtils.java
 ##
 @@ -338,15 +338,17 @@ public static boolean isAllEmpty(final CharSequence... 
css) {
  * @since 3.0 Changed signature from isBlank(String) to 
isBlank(CharSequence)
  */
 public static boolean isBlank(final CharSequence cs) {
-int strLen;
 
 Review comment:
   So what name do you think is better in this case? `index`, `idx` or 
something else?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rosti-il commented on a change in pull request #392: LANG-1410: eliminate one unnecessary local int variable and add more tests

2018-12-19 Thread GitBox
rosti-il commented on a change in pull request #392: LANG-1410: eliminate one 
unnecessary local int variable and add more tests
URL: https://github.com/apache/commons-lang/pull/392#discussion_r243110330
 
 

 ##
 File path: src/main/java/org/apache/commons/lang3/StringUtils.java
 ##
 @@ -338,15 +338,17 @@ public static boolean isAllEmpty(final CharSequence... 
css) {
  * @since 3.0 Changed signature from isBlank(String) to 
isBlank(CharSequence)
  */
 public static boolean isBlank(final CharSequence cs) {
-int strLen;
 
 Review comment:
   Or `idx`? But aren't we spend too much time for a discussion of one variable 
name? :-)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rosti-il commented on a change in pull request #392: LANG-1410: eliminate one unnecessary local int variable and add more tests

2018-12-18 Thread GitBox
rosti-il commented on a change in pull request #392: LANG-1410: eliminate one 
unnecessary local int variable and add more tests
URL: https://github.com/apache/commons-lang/pull/392#discussion_r242720230
 
 

 ##
 File path: 
src/test/java/org/apache/commons/lang3/StringUtilsEmptyBlankTest.java
 ##
 @@ -99,6 +110,7 @@ public void testIsNotBlank() {
 assertFalse(StringUtils.isNotBlank(null));
 assertFalse(StringUtils.isNotBlank(""));
 assertFalse(StringUtils.isNotBlank(StringUtilsTest.WHITESPACE));
+assertTrue(StringUtils.isNotBlank("a"));
 
 Review comment:
   Done in second commit.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rosti-il commented on a change in pull request #392: LANG-1410: eliminate one unnecessary local int variable and add more tests

2018-12-18 Thread GitBox
rosti-il commented on a change in pull request #392: LANG-1410: eliminate one 
unnecessary local int variable and add more tests
URL: https://github.com/apache/commons-lang/pull/392#discussion_r242720230
 
 

 ##
 File path: 
src/test/java/org/apache/commons/lang3/StringUtilsEmptyBlankTest.java
 ##
 @@ -99,6 +110,7 @@ public void testIsNotBlank() {
 assertFalse(StringUtils.isNotBlank(null));
 assertFalse(StringUtils.isNotBlank(""));
 assertFalse(StringUtils.isNotBlank(StringUtilsTest.WHITESPACE));
+assertTrue(StringUtils.isNotBlank("a"));
 
 Review comment:
   Done in the second commit.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rosti-il commented on a change in pull request #392: LANG-1410: eliminate one unnecessary local int variable and add more tests

2018-12-17 Thread GitBox
rosti-il commented on a change in pull request #392: LANG-1410: eliminate one 
unnecessary local int variable and add more tests
URL: https://github.com/apache/commons-lang/pull/392#discussion_r242423165
 
 

 ##
 File path: src/main/java/org/apache/commons/lang3/StringUtils.java
 ##
 @@ -338,15 +338,17 @@ public static boolean isAllEmpty(final CharSequence... 
css) {
  * @since 3.0 Changed signature from isBlank(String) to 
isBlank(CharSequence)
  */
 public static boolean isBlank(final CharSequence cs) {
-int strLen;
 
 Review comment:
   @MarkDacek, this and also the `isWhitespace()` methods are just string scan 
methods. They don't need the string length except the very beginning. Thus the 
original value returned by `cs.length()` doesn't need to be memorized.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] rosti-il commented on a change in pull request #392: LANG-1410: eliminate one unnecessary local int variable and add more tests

2018-12-17 Thread GitBox
rosti-il commented on a change in pull request #392: LANG-1410: eliminate one 
unnecessary local int variable and add more tests
URL: https://github.com/apache/commons-lang/pull/392#discussion_r242420905
 
 

 ##
 File path: 
src/test/java/org/apache/commons/lang3/StringUtilsEmptyBlankTest.java
 ##
 @@ -99,6 +110,7 @@ public void testIsNotBlank() {
 assertFalse(StringUtils.isNotBlank(null));
 assertFalse(StringUtils.isNotBlank(""));
 assertFalse(StringUtils.isNotBlank(StringUtilsTest.WHITESPACE));
+assertTrue(StringUtils.isNotBlank("a"));
 
 Review comment:
   This is a special case that fails if you accidentally use `index > 0` 
instead of `index >= 0` in the expression of the down going loop. The next line 
will not fail in this case.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services