Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/themes/ThemeMapping.java @ 3453:e74e707ff650
Replace string comparison with empty string with length equals zero comparison
flys-artifacts/trunk@5117 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 24 Jul 2012 09:16:00 +0000 |
parents | 9562ca537143 |
children | 8e713e9bb4d7 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/themes/ThemeMapping.java Tue Jul 24 08:03:28 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/themes/ThemeMapping.java Tue Jul 24 09:16:00 2012 +0000 @@ -84,7 +84,7 @@ * @return true if pattern matches text or pattern is empty. */ public boolean applyPattern(String text) { - if (patternStr == null || patternStr.equals("")) { + if (patternStr == null || patternStr.length() == 0) { return true; } Matcher m = pattern.matcher(text); @@ -103,7 +103,7 @@ * @return true if no condition is specified or condition is met. */ public boolean masterAttrMatches(FLYSArtifact artifact) { - if (masterAttr == null || masterAttr.equals("")) { + if (masterAttr == null || masterAttr.length() == 0) { return true; } @@ -125,7 +125,7 @@ * in parameter output. */ public boolean outputMatches(String output) { - if (this.output == null || this.output.equals("")) { + if (this.output == null || this.output.length() == 0) { return true; }