This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/felix-dev.git


The following commit(s) were added to refs/heads/master by this push:
     new 7c78fc7  FELIX-6422 : Use property type password in metatype info for 
passwords
7c78fc7 is described below

commit 7c78fc71371e43e949bc89fb1ad6465c282e296b
Author: Carsten Ziegeler <[email protected]>
AuthorDate: Wed Jun 9 10:26:38 2021 +0200

    FELIX-6422 : Use property type password in metatype info for passwords
---
 http/jetty/pom.xml                                 |  6 +++---
 .../jetty/internal/ConfigMetaTypeProvider.java     | 22 +++++++++++++---------
 2 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/http/jetty/pom.xml b/http/jetty/pom.xml
index 242e06b..91f6dca 100644
--- a/http/jetty/pom.xml
+++ b/http/jetty/pom.xml
@@ -194,7 +194,7 @@
                             org.osgi.service.cm;version="[1.3,2)",             
            
                             org.osgi.service.event;version="[1.2,2)",
                             org.osgi.service.log;version="[1.3,2)",
-                            org.osgi.service.metatype;version="[1.1,2)"
+                            org.osgi.service.metatype;version="[1.4,2)"
                         </DynamicImport-Package>
                         <Provide-Capability>
                             
osgi.implementation;osgi.implementation="osgi.http";version:Version="1.1";
@@ -253,7 +253,7 @@
                                     
org.osgi.service.cm;resolution:=optional;version="[1.3,2)",
                                     
org.osgi.service.event;resolution:=optional;version="[1.2,2)",
                                     
org.osgi.service.log;resolution:=optional;version="[1.3,2)",
-                                    
org.osgi.service.metatype;resolution:=optional;version="[1.1,2)",
+                                    
org.osgi.service.metatype;resolution:=optional;version="[1.4,2)",
                                     
org.osgi.service.useradmin;resolution:=optional;version="[1.1,2)",
                                     
org.osgi.service.http;version="[1.2.1,1.3)",
                                     
org.osgi.service.http.context;version="[1.1,1.2)",
@@ -314,7 +314,7 @@
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.service.metatype</artifactId>
-            <version>1.3.0</version>
+            <version>1.4.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
diff --git 
a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/ConfigMetaTypeProvider.java
 
b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/ConfigMetaTypeProvider.java
index c92f51c..809e955 100644
--- 
a/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/ConfigMetaTypeProvider.java
+++ 
b/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/ConfigMetaTypeProvider.java
@@ -107,15 +107,11 @@ class ConfigMetaTypeProvider implements MetaTypeProvider
 
         adList.add(new 
AttributeDefinitionImpl(JettyConfig.FELIX_KEYSTORE_PASSWORD,
                 "Keystore Password",
-                "Password to access the Keystore. Only used if HTTPS is 
enabled.",
-                null,
-                
bundle.getBundleContext().getProperty(JettyConfig.FELIX_KEYSTORE_PASSWORD)));
+                "Password to access the Keystore. Only used if HTTPS is 
enabled."));
 
         adList.add(new 
AttributeDefinitionImpl(JettyConfig.FELIX_KEYSTORE_KEY_PASSWORD,
                 "Key Password",
-                "Password to unlock the secret key from the Keystore. Only 
used if HTTPS is enabled.",
-                null,
-                
bundle.getBundleContext().getProperty(JettyConfig.FELIX_KEYSTORE_KEY_PASSWORD)));
+                "Password to unlock the secret key from the Keystore. Only 
used if HTTPS is enabled."));
 
         adList.add(new AttributeDefinitionImpl(JettyConfig.FELIX_TRUSTSTORE,
                 "Truststore",
@@ -125,9 +121,7 @@ class ConfigMetaTypeProvider implements MetaTypeProvider
 
         adList.add(new 
AttributeDefinitionImpl(JettyConfig.FELIX_TRUSTSTORE_PASSWORD,
                 "Truststore Password",
-                "Password to access the Truststore. Only used if HTTPS is 
enabled.",
-                null,
-                
bundle.getBundleContext().getProperty(JettyConfig.FELIX_TRUSTSTORE_PASSWORD)));
+                "Password to access the Truststore. Only used if HTTPS is 
enabled."));
 
         adList.add(new 
AttributeDefinitionImpl(JettyConfig.FELIX_HTTPS_CLIENT_CERT,
                 "Client Certificate",
@@ -534,6 +528,16 @@ class ConfigMetaTypeProvider implements MetaTypeProvider
         private final String[] optionLabels;
         private final String[] optionValues;
 
+        /**
+         * Constructor for password properties
+         * @param id The id of the property
+         * @param name The property name
+         * @param description The property description
+         */
+        AttributeDefinitionImpl( final String id, final String name, final 
String description )
+        {
+            this( id, name, description, PASSWORD, (String[])null, 0, null, 
null, (String[])null );
+        }
 
         AttributeDefinitionImpl( final String id, final String name, final 
String description, final String defaultValue, final String overrideValue )
         {

Reply via email to