You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2019/10/30 09:08:14 UTC
[camel] 03/07: CAMEL-14101 - Use Boolean and not boolean in
JsonDataFormat
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
commit 83ec8ebaddad38b81301f9e53ee121130fe016ea
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Oct 30 09:24:20 2019 +0100
CAMEL-14101 - Use Boolean and not boolean in JsonDataFormat
---
.../camel-jackson/src/main/docs/json-jackson-dataformat.adoc | 2 +-
.../camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc | 2 +-
.../java/org/apache/camel/model/dataformat/JsonDataFormat.java | 7 ++++---
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc b/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc
index 86d7fb8..0053ed0 100644
--- a/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc
+++ b/components/camel-jackson/src/main/docs/json-jackson-dataformat.adoc
@@ -43,7 +43,7 @@ The JSon Jackson dataformat supports 20 options, which are listed below.
| permissions | | String | Adds permissions that controls which Java packages and classes XStream is allowed to use during unmarshal from xml/json to Java beans. A permission must be configured either here or globally using a JVM system property. The permission can be specified in a syntax where a plus sign is allow, and minus sign is deny. Wildcards is supported by using . as prefix. For example to allow com.foo and all subpackages then specfy com.foo.. Multiple permissions can be conf [...]
| allowUnmarshallType | false | Boolean | If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used.
| timezone | | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. This option will have no effect on the others Json DataFormat, like gson, fastjson and xstream.
-| autoDiscoverObjectMapper | false | boolean | If set to true then Jackson will lookup for an objectMapper into the registry
+| autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry
| contentTypeHeader | false | Boolean | Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSon etc.
|===
// dataformat options: END
diff --git a/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc b/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc
index 4939fc6..b8d25a5 100644
--- a/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc
+++ b/components/camel-johnzon/src/main/docs/json-johnzon-dataformat.adoc
@@ -43,7 +43,7 @@ The JSon Johnzon dataformat supports 20 options, which are listed below.
| permissions | | String | Adds permissions that controls which Java packages and classes XStream is allowed to use during unmarshal from xml/json to Java beans. A permission must be configured either here or globally using a JVM system property. The permission can be specified in a syntax where a plus sign is allow, and minus sign is deny. Wildcards is supported by using . as prefix. For example to allow com.foo and all subpackages then specfy com.foo.. Multiple permissions can be conf [...]
| allowUnmarshallType | false | Boolean | If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header during the unmarshalling. This should only be enabled when desired to be used.
| timezone | | String | If set then Jackson will use the Timezone when marshalling/unmarshalling. This option will have no effect on the others Json DataFormat, like gson, fastjson and xstream.
-| autoDiscoverObjectMapper | false | boolean | If set to true then Jackson will lookup for an objectMapper into the registry
+| autoDiscoverObjectMapper | false | Boolean | If set to true then Jackson will lookup for an objectMapper into the registry
| contentTypeHeader | false | Boolean | Whether the data format should set the Content-Type header with the type from the data format if the data format is capable of doing so. For example application/xml for data formats marshalling to XML, or application/json for data formats marshalling to JSon etc.
|===
// dataformat options: END
diff --git a/core/camel-core-engine/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java b/core/camel-core-engine/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
index cde365e..06f350f 100644
--- a/core/camel-core-engine/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
+++ b/core/camel-core-engine/src/main/java/org/apache/camel/model/dataformat/JsonDataFormat.java
@@ -77,7 +77,8 @@ public class JsonDataFormat extends DataFormatDefinition {
@XmlAttribute
private String timezone;
@XmlAttribute
- private boolean autoDiscoverObjectMapper;
+ @Metadata(defaultValue = "false")
+ private Boolean autoDiscoverObjectMapper;
public JsonDataFormat() {
@@ -369,14 +370,14 @@ public class JsonDataFormat extends DataFormatDefinition {
this.timezone = timezone;
}
- public boolean isAutoDiscoverObjectMapper() {
+ public Boolean isAutoDiscoverObjectMapper() {
return autoDiscoverObjectMapper;
}
/**
* If set to true then Jackson will lookup for an objectMapper into the registry
*/
- public void setAutoDiscoverObjectMapper(boolean autoDiscoverObjectMapper) {
+ public void setAutoDiscoverObjectMapper(Boolean autoDiscoverObjectMapper) {
this.autoDiscoverObjectMapper = autoDiscoverObjectMapper;
}