diff --git a/archaius2-archaius1-bridge/build.gradle b/archaius2-archaius1-bridge/build.gradle index 4dc9196dc..dba19d7ef 100644 --- a/archaius2-archaius1-bridge/build.gradle +++ b/archaius2-archaius1-bridge/build.gradle @@ -20,7 +20,7 @@ dependencies { api project(':archaius2-core') compileOnly project(':archaius2-guice') api project(':archaius2-commons-configuration') - api 'com.netflix.archaius:archaius-core:0.7.8' + api 'com.netflix.archaius:archaius-core:0.7.12' testImplementation project(':archaius2-guice') } diff --git a/archaius2-archaius1-bridge/src/main/java/com/netflix/archaius/bridge/AbstractConfigurationBridge.java b/archaius2-archaius1-bridge/src/main/java/com/netflix/archaius/bridge/AbstractConfigurationBridge.java index c6a7ea1e5..36e9ad178 100644 --- a/archaius2-archaius1-bridge/src/main/java/com/netflix/archaius/bridge/AbstractConfigurationBridge.java +++ b/archaius2-archaius1-bridge/src/main/java/com/netflix/archaius/bridge/AbstractConfigurationBridge.java @@ -2,6 +2,8 @@ import java.util.ArrayList; import java.util.HashSet; + +import com.netflix.config.util.InstrumentationAware; import org.apache.commons.configuration.AbstractConfiguration; import org.apache.commons.configuration.Configuration; import org.apache.commons.configuration.HierarchicalConfiguration; @@ -32,7 +34,7 @@ * @see StaticArchaiusBridgeModule */ @Singleton -class AbstractConfigurationBridge extends AbstractConfiguration implements AggregatedConfiguration, DynamicPropertySupport { +class AbstractConfigurationBridge extends AbstractConfiguration implements AggregatedConfiguration, DynamicPropertySupport, InstrumentationAware { private final Config config; private final SettableConfig settable; @@ -94,6 +96,11 @@ public Object getProperty(String key) { return config.getRawProperty(key); // Should interpolate } + @Override + public Object getPropertyUninstrumented(String key) { + return config.getRawPropertyUninstrumented(key); + } + @Override public Iterator getKeys() { return config.getKeys(); diff --git a/archaius2-archaius1-bridge/src/main/java/com/netflix/archaius/bridge/StaticAbstractConfiguration.java b/archaius2-archaius1-bridge/src/main/java/com/netflix/archaius/bridge/StaticAbstractConfiguration.java index e0bc4e067..f54bf673c 100644 --- a/archaius2-archaius1-bridge/src/main/java/com/netflix/archaius/bridge/StaticAbstractConfiguration.java +++ b/archaius2-archaius1-bridge/src/main/java/com/netflix/archaius/bridge/StaticAbstractConfiguration.java @@ -11,6 +11,7 @@ import javax.inject.Inject; import javax.inject.Singleton; +import com.netflix.config.util.InstrumentationAware; import org.apache.commons.configuration.AbstractConfiguration; import org.apache.commons.configuration.Configuration; import org.apache.commons.configuration.event.ConfigurationEvent; @@ -27,7 +28,7 @@ * @see StaticArchaiusBridgeModule */ @Singleton -public class StaticAbstractConfiguration extends AbstractConfiguration implements AggregatedConfiguration, DynamicPropertySupport { +public class StaticAbstractConfiguration extends AbstractConfiguration implements AggregatedConfiguration, DynamicPropertySupport, InstrumentationAware { private static volatile AbstractConfigurationBridge delegate; @@ -143,6 +144,16 @@ public Object getProperty(String key) { return delegate.getProperty(key); } + @Override + public Object getPropertyUninstrumented(String key) { + if (delegate == null) { + System.out.println( + "[getPropertyUninstrumented(" + key + ")] StaticAbstractConfiguration not initialized yet."); + return null; + } + return delegate.getPropertyUninstrumented(key); + } + @Override public Iterator getKeys() { if (delegate == null) {