camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lburgazz...@apache.org
Subject camel git commit: CAMEL-10575: snakeyaml: add an option to filter classes the yaml parser can construct
Date Fri, 09 Dec 2016 14:57:58 GMT
Repository: camel
Updated Branches:
  refs/heads/master 65a56ad90 -> 6b979d07f


CAMEL-10575: snakeyaml: add an option to filter classes the yaml parser can construct


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6b979d07
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6b979d07
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6b979d07

Branch: refs/heads/master
Commit: 6b979d07fd4be6ac913368f2abeae690d3325d37
Parents: 65a56ad
Author: lburgazzoli <lburgazzoli@gmail.com>
Authored: Fri Dec 9 15:57:51 2016 +0100
Committer: lburgazzoli <lburgazzoli@gmail.com>
Committed: Fri Dec 9 15:57:51 2016 +0100

----------------------------------------------------------------------
 .../apache/camel/component/snakeyaml/SnakeYAMLDataFormat.java  | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/6b979d07/components/camel-snakeyaml/src/main/java/org/apache/camel/component/snakeyaml/SnakeYAMLDataFormat.java
----------------------------------------------------------------------
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 24fd0da..e88994b 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
@@ -51,7 +51,7 @@ import org.yaml.snakeyaml.resolver.Resolver;
  * 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;
@@ -77,7 +77,9 @@ public final class SnakeYAMLDataFormat extends ServiceSupport implements
DataFor
         this.allowAnyType = false;
 
         if (type != null) {
-            setUnmarshalType(type);
+            this.unmarshalType = type;
+            this.typeFilters = new CopyOnWriteArrayList<>();
+            this.typeFilters.add(TypeFilters.types(type));
         }
     }
 


Mime
View raw message