felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vvalc...@apache.org
Subject svn commit: r1329251 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
Date Mon, 23 Apr 2012 14:12:26 GMT
Author: vvalchev
Date: Mon Apr 23 14:12:26 2012
New Revision: 1329251

URL: http://svn.apache.org/viewvc?rev=1329251&view=rev
Log:
Fixed FELIX-3473 web console config manager plugin no longer works with J9
https://issues.apache.org/jira/browse/FELIX-3473

Modified:
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java?rev=1329251&r1=1329250&r2=1329251&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
(original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/compendium/ConfigManager.java
Mon Apr 23 14:12:26 2012
@@ -91,13 +91,6 @@ public class ConfigManager extends Confi
      */
     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 @@ public class ConfigManager extends Confi
         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;
         }



Mime
View raw message