aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/onap/vid/properties/FeaturesTogglingConfiguration.java
diff options
context:
space:
mode:
Diffstat (limited to 'vid-app-common/src/main/java/org/onap/vid/properties/FeaturesTogglingConfiguration.java')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/properties/FeaturesTogglingConfiguration.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/properties/FeaturesTogglingConfiguration.java b/vid-app-common/src/main/java/org/onap/vid/properties/FeaturesTogglingConfiguration.java
index ef28ea400..88bcce871 100644
--- a/vid-app-common/src/main/java/org/onap/vid/properties/FeaturesTogglingConfiguration.java
+++ b/vid-app-common/src/main/java/org/onap/vid/properties/FeaturesTogglingConfiguration.java
@@ -24,16 +24,18 @@ public class FeaturesTogglingConfiguration {
public FeatureManager featureManager(ServletContext servletContext, Environment environment) {
final String defaultFilename = "features.properties";
- String filename = environment.getProperty("featureFlags.filename");
+ String filename = environment.getProperty("features.set.filename");
if (StringUtils.isBlank(filename)) {
filename = defaultFilename;
}
+ filename = StringUtils.trimToNull(filename);
+
return new FeatureManagerBuilder()
.featureEnum(Features.class)
.stateRepository(new FileBasedStateRepository(
- new File(servletContext.getRealPath("/WEB-INF/conf/" + filename))
+ new File(filename.startsWith("/")? filename : servletContext.getRealPath("/WEB-INF/conf/" + filename))
))
.build();
}