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 1e52121408be7b346c600eb9dda72c1566a3d52e Author: Claus Ibsen <[email protected]> AuthorDate: Tue Aug 19 13:29:48 2025 +0200 CAMEL-22354: dataformats - Align all data formats getter setters to model --- .../component/snakeyaml/SnakeYAMLDataFormat.java | 38 ---------------------- 1 file changed, 38 deletions(-) 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 7d50f7efdfc..4c839f850fd 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 @@ -22,10 +22,6 @@ import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Reader; import java.lang.ref.WeakReference; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; -import java.util.concurrent.CopyOnWriteArrayList; import org.apache.camel.CamelContext; import org.apache.camel.CamelContextAware; @@ -38,7 +34,6 @@ import org.apache.camel.support.PatternHelper; import org.apache.camel.support.service.ServiceSupport; import org.yaml.snakeyaml.DumperOptions; import org.yaml.snakeyaml.LoaderOptions; -import org.yaml.snakeyaml.TypeDescription; import org.yaml.snakeyaml.Yaml; import org.yaml.snakeyaml.constructor.BaseConstructor; import org.yaml.snakeyaml.constructor.Constructor; @@ -63,7 +58,6 @@ public final class SnakeYAMLDataFormat extends ServiceSupport implements DataFor private ClassLoader classLoader; private String unmarshalTypeName; private Class<?> unmarshalType; - private List<TypeDescription> typeDescriptions; private boolean useApplicationContextClassLoader = true; private boolean prettyFlow; private boolean allowAnyType; @@ -238,32 +232,6 @@ public final class SnakeYAMLDataFormat extends ServiceSupport implements DataFor this.unmarshalType = unmarshalType; } - public List<TypeDescription> getTypeDescriptions() { - return typeDescriptions; - } - - public void setTypeDescriptions(List<TypeDescription> typeDescriptions) { - this.typeDescriptions = new CopyOnWriteArrayList<>(typeDescriptions); - } - - public void addTypeDescriptions(Collection<TypeDescription> typeDescriptions) { - if (this.typeDescriptions == null) { - this.typeDescriptions = new CopyOnWriteArrayList<>(); - } - this.typeDescriptions.addAll(typeDescriptions); - } - - public void addTypeDescriptions(TypeDescription... typeDescriptions) { - addTypeDescriptions(Arrays.asList(typeDescriptions)); - } - - public void addTypeDescription(Class<?> type, Tag tag) { - if (this.typeDescriptions == null) { - this.typeDescriptions = new CopyOnWriteArrayList<>(); - } - this.typeDescriptions.add(new TypeDescription(type, tag)); - } - public boolean isUseApplicationContextClassLoader() { return useApplicationContextClassLoader; } @@ -326,12 +294,6 @@ public final class SnakeYAMLDataFormat extends ServiceSupport implements DataFor } else { yamlConstructor = new SafeConstructor(options); } - - if (typeDescriptions != null && yamlConstructor instanceof Constructor con) { - for (TypeDescription typeDescription : typeDescriptions) { - con.addTypeDescription(typeDescription); - } - } return yamlConstructor; }
