File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
utils/config-utils/src/main/java/datadog/trace/bootstrap/config/provider Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,14 @@ public final class StableConfigSource extends ConfigProvider.Source {
2828 private final StableConfig config ;
2929
3030 StableConfigSource (String filePath , ConfigOrigin origin ) {
31+ StableConfig cfg = StableConfig .EMPTY ;
3132 this .fileOrigin = origin ;
32- File file = new File (filePath );
33- if (!file .exists ()) {
34- this .config = StableConfig .EMPTY ;
35- return ;
36- }
37- StableConfig cfg ;
3833 try {
34+ File file = new File (filePath );
3935 log .debug ("Stable configuration file found at path: {}" , file );
40- cfg = StableConfigParser .parse (filePath );
36+ if (file .exists ()) {
37+ cfg = StableConfigParser .parse (filePath );
38+ }
4139 } catch (Throwable e ) {
4240 if (e instanceof StableConfigMappingException
4341 || e instanceof IllegalArgumentException
@@ -55,8 +53,6 @@ public final class StableConfigSource extends ConfigProvider.Source {
5553 filePath ,
5654 e .getMessage ());
5755 }
58-
59- cfg = StableConfig .EMPTY ;
6056 }
6157 this .config = cfg ;
6258 }
You can’t perform that action at this time.
0 commit comments