Skip to content

Commit 744c029

Browse files
committed
Replace deprecated Yaml constructor
1 parent 9988f68 commit 744c029

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

src/main/java/eu/openanalytics/shinyproxy/ShinyProxySpecProvider.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,12 @@ public List<ProxySpec> getSpecs() {
256256
log.info("Reloading specs.yaml file as it was modified");
257257
specsMap = new HashMap<>();
258258
maxInstancesCache = new HashMap<>();
259-
Representer representer = new Representer(new DumperOptions());
259+
LoaderOptions loaderOptions = new LoaderOptions();
260+
DumperOptions dumperOptions = new DumperOptions();
261+
Representer representer = new Representer(dumperOptions);
260262
representer.getPropertyUtils().setSkipMissingProperties(true);
261-
Yaml yaml = new Yaml(new Constructor(Dummy.class, new LoaderOptions()), representer);
263+
Yaml yaml = new Yaml(new Constructor(Dummy.class, loaderOptions), representer, dumperOptions,
264+
loaderOptions);
262265
specsFileTs = specsFile.lastModified();
263266
Dummy obj = yaml.load(new FileInputStream(specsFile));
264267
List<ShinyProxySpec> specsTmp = obj.getSpecs();
@@ -373,7 +376,8 @@ public List<RuntimeValue> getRuntimeValues(ProxySpec proxy) {
373376
trackAppUrl = environment.getProperty("proxy.default-track-app-url", Boolean.class, false);
374377
}
375378
runtimeValues.add(new RuntimeValue(TrackAppUrl.inst, trackAppUrl));
376-
// runtimeValues.add(new RuntimeValue(CustomAppDetailsKey.inst, new CustomAppDetails(proxy.getSpecExtension(ShinyProxySpecExtension.class).getCustomAppDetails())));
379+
// runtimeValues.add(new RuntimeValue(CustomAppDetailsKey.inst, new
380+
// CustomAppDetails(proxy.getSpecExtension(ShinyProxySpecExtension.class).getCustomAppDetails())));
377381

378382
return runtimeValues;
379383
}

0 commit comments

Comments
 (0)