Skip to content

Commit

Permalink
CAMEL-10575: snakeyaml: add an option to filter classes the yaml pars…
Browse files Browse the repository at this point in the history
…er can construct
  • Loading branch information
lburgazzoli committed Dec 9, 2016
1 parent 65a56ad commit 6b979d0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
* A <a href="http://camel.apache.org/data-format.html">data format</a> ({@link DataFormat})
* using <a href="http://www.snakeyaml.org">SnakeYAML</a> to marshal to and from YAML.
*/
public final class SnakeYAMLDataFormat extends ServiceSupport implements DataFormat, DataFormatName {
public class SnakeYAMLDataFormat extends ServiceSupport implements DataFormat, DataFormatName {
private final ThreadLocal<WeakReference<Yaml>> yamlCache;
private BaseConstructor constructor;
private Representer representer;
Expand All @@ -77,7 +77,9 @@ public SnakeYAMLDataFormat(Class<?> type) {
this.allowAnyType = false;

if (type != null) {
setUnmarshalType(type);
this.unmarshalType = type;
this.typeFilters = new CopyOnWriteArrayList<>();
this.typeFilters.add(TypeFilters.types(type));
}
}

Expand Down

0 comments on commit 6b979d0

Please # to comment.