Update documentation

This commit is contained in:
Travis CI (pmd-bot)
2017-08-22 21:48:40 +00:00
parent 9f64519b0a
commit 9a4e1fb577

View File

@ -139,8 +139,9 @@ buf.append("Hello World"); // good
String.trim().length() is an inefficient way to check if a String is really empty, as it
creates a new String object just to check its size. Consider creating a static function that
loops through a string, checking Character.isWhitespace() on each character and returning
false if a non-whitespace character is found. You can refer to Apache's StringUtils#isBlank (in commons-lang)
or Spring's StringUtils#hasText (in the Springs framework) for existing implementations.
false if a non-whitespace character is found. You can refer to Apache's StringUtils#isBlank (in commons-lang),
Spring's StringUtils#hasText (in the Spring framework) or Google's CharMatcher#whitespace (in Guava) for
existing implementations.
**This rule is defined by the following Java class:** [net.sourceforge.pmd.lang.java.rule.strings.InefficientEmptyStringCheckRule](https://github.com/pmd/pmd/blob/master/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/strings/InefficientEmptyStringCheckRule.java)