]> source.dussan.org Git - sonarqube.git/commitdiff
Minor: replace String#indexOf()<0 by String#contains()
authorSimon Brandhof <simon.brandhof@gmail.com>
Wed, 9 Nov 2011 16:21:55 +0000 (17:21 +0100)
committerSimon Brandhof <simon.brandhof@gmail.com>
Thu, 10 Nov 2011 12:22:26 +0000 (13:22 +0100)
sonar-core/src/main/java/org/sonar/core/i18n/RuleI18nManager.java

index 466805f54de103d16809cc5df6ef89456de0d5d5..3d1d3e917a5e94540744e9793cdd8f097a56c0d8 100644 (file)
@@ -95,7 +95,7 @@ public class RuleI18nManager implements ServerComponent {
   }
 
   static boolean isRuleProperty(String propertyKey) {
-    return StringUtils.startsWith(propertyKey, RULE_PREFIX) && StringUtils.endsWith(propertyKey, NAME_SUFFIX) && propertyKey.indexOf(".param.") < 0;
+    return StringUtils.startsWith(propertyKey, RULE_PREFIX) && StringUtils.endsWith(propertyKey, NAME_SUFFIX) && !propertyKey.contains(".param.");
   }
 
   public static class RuleKey {