Skip to content

Commit

Permalink
FELIX-6165 : Rename org.apache.felix.configadmin.plugin.interpolation…
Browse files Browse the repository at this point in the history
….dir

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1872594 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
cziegeler committed Jan 10, 2020
1 parent eacb4f6 commit 8c8861c
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@

@Header(name=Constants.BUNDLE_ACTIVATOR, value="${@class}")
public class Activator implements BundleActivator {
static final String DIR_PROPERTY = "org.apache.felix.configadmin.plugin.interpolation.dir";
static final String DEPRECATED_DIR_PROPERTY = "org.apache.felix.configadmin.plugin.interpolation.dir";
static final String DIR_PROPERTY = "org.apache.felix.configadmin.plugin.interpolation.secretsdir";
static final String ENCODING_PROPERTY = "org.apache.felix.configadmin.plugin.interpolation.file.encoding";

static final String PLUGIN_ID = "org.apache.felix.configadmin.plugin.interpolation";
Expand All @@ -41,6 +42,13 @@ public class Activator implements BundleActivator {
@Override
public void start(BundleContext context) throws Exception {
String directory = context.getProperty(DIR_PROPERTY);
if (directory == null) {
directory = context.getProperty(DEPRECATED_DIR_PROPERTY);
if (directory != null) {
LOG.warn("Deprecated property is used for configuration, switch from using '" + DEPRECATED_DIR_PROPERTY
+ "' to the new '" + DIR_PROPERTY + "'.");
}
}
String encoding = context.getProperty(ENCODING_PROPERTY);

ConfigurationPlugin plugin = new InterpolationConfigurationPlugin(context, directory, encoding);
Expand Down

0 comments on commit 8c8861c

Please sign in to comment.