You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/11/03 08:06:19 UTC

[camel] branch master updated: CAMEL-15745: rest-dsl for type/outType using class should set that as well so camel binding uses the class and do not attempt to load it via a string name. Otherwise there may be problems in OSGi.

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new 802d1ba  CAMEL-15745: rest-dsl for type/outType using class should set that as well so camel binding uses the class and do not attempt to load it via a string name. Otherwise there may be problems in OSGi.
802d1ba is described below

commit 802d1ba7bb7838e355111e488e5e7dfcc3aa099d
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Tue Nov 3 09:05:46 2020 +0100

    CAMEL-15745: rest-dsl for type/outType using class should set that as well so camel binding uses the class and do not attempt to load it via a string name. Otherwise there may be problems in OSGi.
---
 .../src/main/java/org/apache/camel/model/rest/RestDefinition.java       | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java
index 09dd1ed..6c5face 100644
--- a/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java
+++ b/core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestDefinition.java
@@ -454,6 +454,7 @@ public class RestDefinition extends OptionalIdentifiedDefinition<RestDefinition>
         }
 
         VerbDefinition verb = getVerbs().get(getVerbs().size() - 1);
+        verb.setTypeClass(classType);
         verb.setType(asTypeName(classType));
         return this;
     }
@@ -465,6 +466,7 @@ public class RestDefinition extends OptionalIdentifiedDefinition<RestDefinition>
         }
 
         VerbDefinition verb = getVerbs().get(getVerbs().size() - 1);
+        verb.setOutTypeClass(classType);
         verb.setOutType(asTypeName(classType));
         return this;
     }