File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
internal-api/src/main/java/datadog/trace/bootstrap/config/provider/stableconfig Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 11package datadog .trace .bootstrap .config .provider .stableconfig ;
22
33import static java .util .Collections .emptyList ;
4+ import static java .util .Collections .emptyMap ;
45import static java .util .Collections .unmodifiableList ;
56import static java .util .Collections .unmodifiableMap ;
67import static java .util .stream .Collectors .toList ;
78
9+ import java .util .ArrayList ;
810import java .util .List ;
911import java .util .Map ;
1012
@@ -18,13 +20,20 @@ public StableConfig(Object yaml) {
1820 this .configId = String .valueOf (map .get ("config_id" ));
1921 this .apmConfigurationDefault =
2022 unmodifiableMap (
21- (Map <String , Object >) map .getOrDefault ("apm_configuration_default" , emptyList ()));
23+ (Map <String , Object >) map .getOrDefault ("apm_configuration_default" , emptyMap ()));
2224 this .apmConfigurationRules =
2325 unmodifiableList (
2426 ((List <Object >) map .getOrDefault ("apm_configuration_rules" , emptyList ()))
2527 .stream ().map (Rule ::new ).collect (toList ()));
2628 }
2729
30+ // test only
31+ private StableConfig (String configId , Map <String , Object > apmConfigurationDefault ) {
32+ this .configId = configId ;
33+ this .apmConfigurationDefault = apmConfigurationDefault ;
34+ this .apmConfigurationRules = new ArrayList <>();
35+ }
36+
2837 public String getConfigId () {
2938 return configId ;
3039 }
You can’t perform that action at this time.
0 commit comments