verhas commented on a change in pull request #416: Add support of lambda value
evaluation for defaulting methods
URL: https://github.com/apache/commons-lang/pull/416#discussion_r341740827
##########
File path: src/test/java/org/apache/commons/lang3/StringUtilsTest.java
##########
@@ -676,45 +677,45 @@ public void testDefaultIfBlank_StringString() {
assertEquals("NULL", StringUtils.defaultIfBlank("", "NULL"));
assertEquals("NULL", StringUtils.defaultIfBlank(" ", "NULL"));
assertEquals("abc", StringUtils.defaultIfBlank("abc", "NULL"));
- assertNull(StringUtils.defaultIfBlank("", (String) null));
+ assertNull(StringUtils.defaultIfBlank("", null));
// Tests compatibility for the API return type
final String s = StringUtils.defaultIfBlank("abc", "NULL");
assertEquals("abc", s);
}
@Test
- public void testDefaultIfBlank_StringStringSupplier() {
- assertEquals("NULL", StringUtils.<String>defaultIfBlank(null, () ->
"NULL"));
- assertEquals("NULL", StringUtils.<String>defaultIfBlank("", () ->
"NULL"));
- assertEquals("NULL", StringUtils.<String>defaultIfBlank(" ", () ->
"NULL"));
- assertEquals("abc", StringUtils.<String>defaultIfBlank("abc", () ->
"NULL"));
- assertNull(StringUtils.<String>defaultIfBlank("", () -> null));
- assertNull(StringUtils.defaultIfBlank("", (Supplier<String>) null));
+ public void testGetIfBlank_StringStringSupplier() {
+ assertEquals("NULL", StringUtils.getIfBlank(null, () -> "NULL"));
+ assertEquals("NULL", StringUtils.getIfBlank("", () -> "NULL"));
Review comment:
There is an extra space on the line.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services