diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/performance/InefficientEmptyStringCheckRule.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/performance/InefficientEmptyStringCheckRule.java index f6c1023425..4f84d1f058 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/performance/InefficientEmptyStringCheckRule.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/rule/performance/InefficientEmptyStringCheckRule.java @@ -13,7 +13,7 @@ import net.sourceforge.pmd.lang.java.symboltable.JavaNameOccurrence; * This rule finds code which inefficiently determines empty strings. This code * *
- *         if(str.trim().length()==0){....
+ * str.trim().length()==0
  * 
* *

@@ -22,8 +22,16 @@ import net.sourceforge.pmd.lang.java.symboltable.JavaNameOccurrence; *

* *
- * Character.isWhitespace(str.charAt(i));
+ * private boolean checkTrimEmpty(String str) {
+ *     for(int i=0; i
+ * or Apache commons-lang's StringUtils.isBlank.
  *
  * @author acaplan
  */