Fixed FELIX-3473 web console config manager plugin no longer works with J9
https://issues.apache.org/jira/browse/FELIX-3473

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1329251 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
index a806e6a..73f9404 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
@@ -91,13 +91,6 @@
      */
     private static final String PASSWORD_PLACEHOLDER_VALUE = "unmodified";
 
-    /**
-     * A regular expression pattern to match against property names to
-     * decide whether the property is hidden or not.
-     */
-    private static final Pattern PASSWORD_PROPERTY = Pattern.compile("password", Pattern.CASE_INSENSITIVE
-        | Pattern.UNICODE_CASE);
-
     // templates
     private final String TEMPLATE;
 
@@ -1130,10 +1123,14 @@
         return new PlaceholderAttributeDefinition( id, attrType, attrCardinality );
    }
 
+    private static boolean isPasswordProperty(String name)
+    {
+        return name == null ? false : name.toLowerCase().indexOf("password") != -1; //$NON-NLS-1$
+    }
 
     private static int getAttributeType( final AttributeDefinition ad )
     {
-        if ( ad.getType() == AttributeDefinition.STRING && PASSWORD_PROPERTY.matcher( ad.getID() ).find() )
+        if ( ad.getType() == AttributeDefinition.STRING && isPasswordProperty( ad.getID() ) )
         {
             return ATTRIBUTE_TYPE_PASSWORD;
         }