This is an automated email from the ASF dual-hosted git repository. heneveld pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git
commit a34afe39f3145f061b8a00349dbcec404a0b844c Author: Alex Heneveld <[email protected]> AuthorDate: Wed Nov 11 17:39:40 2020 +0000 allow DSL objects to be deserialized ignoring type as the custom DSL parsing logic will apply later; this isn't the cleanest way but it is safe enough --- .../resolve/jackson/BrooklynRegisteredTypeJacksonSerialization.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/java/org/apache/brooklyn/core/resolve/jackson/BrooklynRegisteredTypeJacksonSerialization.java b/core/src/main/java/org/apache/brooklyn/core/resolve/jackson/BrooklynRegisteredTypeJacksonSerialization.java index c2245a1..bf5915e 100644 --- a/core/src/main/java/org/apache/brooklyn/core/resolve/jackson/BrooklynRegisteredTypeJacksonSerialization.java +++ b/core/src/main/java/org/apache/brooklyn/core/resolve/jackson/BrooklynRegisteredTypeJacksonSerialization.java @@ -146,6 +146,10 @@ public class BrooklynRegisteredTypeJacksonSerialization { return _baseType; } + if (id!=null && id.startsWith("org.apache.brooklyn.camp.brooklyn.spi.dsl.")) { + // allow DSL objects to be treated as objects even if we can't instantiate the types + return context.constructType(Object.class); + } // copied from super if it fails to find the type if (context instanceof DeserializationContext) { return ((DeserializationContext) context).handleUnknownTypeId(_baseType, id, this, "no such class found");
