This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch df2 in repository https://gitbox.apache.org/repos/asf/camel.git
commit 135a110f6fd4566bf2f2aceb89263e90de069bfa Author: Claus Ibsen <[email protected]> AuthorDate: Tue Aug 19 13:30:59 2025 +0200 CAMEL-22354: dataformats - Align all data formats getter setters to model --- .../org/apache/camel/component/snakeyaml/SnakeYAMLDataFormat.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/camel-snakeyaml/src/main/java/org/apache/camel/component/snakeyaml/SnakeYAMLDataFormat.java b/components/camel-snakeyaml/src/main/java/org/apache/camel/component/snakeyaml/SnakeYAMLDataFormat.java index 4c839f850fd..a8a3937f3e3 100644 --- a/components/camel-snakeyaml/src/main/java/org/apache/camel/component/snakeyaml/SnakeYAMLDataFormat.java +++ b/components/camel-snakeyaml/src/main/java/org/apache/camel/component/snakeyaml/SnakeYAMLDataFormat.java @@ -148,7 +148,13 @@ public final class SnakeYAMLDataFormat extends ServiceSupport implements DataFor } } - protected Yaml getYaml() { + @Override + protected void doStop() throws Exception { + super.doStop(); + yamlCache.remove(); + } + + private Yaml getYaml() { Yaml yaml = null; WeakReference<Yaml> ref = yamlCache.get();
