Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/themes/ThemeFactory.java @ 3555:b1912514e0f5
s/container.size() == 0/container.isEmpty()/
flys-artifacts/trunk@5149 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Sat, 28 Jul 2012 21:48:15 +0000 |
parents | 0b9b2a0c4e64 |
children | 8e713e9bb4d7 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/themes/ThemeFactory.java Sat Jul 28 20:58:42 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/themes/ThemeFactory.java Sat Jul 28 21:48:15 2012 +0000 @@ -74,7 +74,10 @@ String output, String groupName) { - logger.debug("Search theme for: " + name + " - pattern: " + pattern); + if (logger.isDebugEnabled()) { + logger.debug( + "Search theme for: " + name + " - pattern: " + pattern); + } if (c == null || name == null) { logger.warn("Cannot search for theme."); @@ -92,8 +95,9 @@ ThemeGroup group = null; for (ThemeGroup tg: tgs) { - if(tg.getName().equals(groupName)) { + if (tg.getName().equals(groupName)) { group = tg; + break; } } @@ -105,7 +109,7 @@ FLYSArtifact artifact = (FLYSArtifact) c.get(FLYSContext.ARTIFACT_KEY); - if (map == null || map.size() == 0 || t == null || t.size() == 0) { + if (map == null || map.isEmpty() || t == null || t.isEmpty()) { logger.warn("No mappings or themes found. Cannot retrieve theme!"); return null; }