Skip to content

Commit fa27316

Browse files
authored
Also add changes to ApplicationManifestUtilsCommon
1 parent 8870523 commit fa27316

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsCommon.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,12 @@ abstract class ApplicationManifestUtilsCommon {
4848

4949
static final int GIBI = 1_024;
5050

51-
static final Yaml YAML;
51+
static final DumperOptions dumperOptions;
5252

5353
static {
54-
DumperOptions dumperOptions = new DumperOptions();
54+
dumperOptions = new DumperOptions();
5555
dumperOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
5656
dumperOptions.setExplicitStart(true);
57-
58-
YAML = new Yaml(dumperOptions);
5957
}
6058

6159
static final Pattern FIND_VARIABLE_REGEX = Pattern.compile("\\(\\(([a-zA-Z]\\w+)\\)\\)");
@@ -276,10 +274,12 @@ static void asString(
276274

277275
@SuppressWarnings("unchecked")
278276
static Map<String, Object> deserialize(Path path) {
277+
Yaml yaml = new Yaml(dumperOptions);
278+
279279
AtomicReference<Map<String, Object>> root = new AtomicReference<>();
280280

281281
try (InputStream in = Files.newInputStream(path, StandardOpenOption.READ)) {
282-
root.set((Map<String, Object>) YAML.load(in));
282+
root.set((Map<String, Object>) yaml.load(in));
283283
} catch (IOException e) {
284284
throw Exceptions.propagate(e);
285285
}

0 commit comments

Comments
 (0)