File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
components/camel-snakeyaml/src/main/java/org/apache/camel/component/snakeyaml Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 51
51
* A <a href="http://camel.apache.org/data-format.html">data format</a> ({@link DataFormat})
52
52
* using <a href="http://www.snakeyaml.org">SnakeYAML</a> to marshal to and from YAML.
53
53
*/
54
- public final class SnakeYAMLDataFormat extends ServiceSupport implements DataFormat , DataFormatName {
54
+ public class SnakeYAMLDataFormat extends ServiceSupport implements DataFormat , DataFormatName {
55
55
private final ThreadLocal <WeakReference <Yaml >> yamlCache ;
56
56
private BaseConstructor constructor ;
57
57
private Representer representer ;
@@ -77,7 +77,9 @@ public SnakeYAMLDataFormat(Class<?> type) {
77
77
this .allowAnyType = false ;
78
78
79
79
if (type != null ) {
80
- setUnmarshalType (type );
80
+ this .unmarshalType = type ;
81
+ this .typeFilters = new CopyOnWriteArrayList <>();
82
+ this .typeFilters .add (TypeFilters .types (type ));
81
83
}
82
84
}
83
85
You can’t perform that action at this time.
0 commit comments