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 2019/05/01 10:36:06 UTC
[camel] branch camel-2.x updated: CAMEL-13474: Deprecate
string/serialization data formats
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.x by this push:
new e491042 CAMEL-13474: Deprecate string/serialization data formats
e491042 is described below
commit e491042c2b71a5288de0067a07bdca6bbcbfb83e
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Wed May 1 12:35:53 2019 +0200
CAMEL-13474: Deprecate string/serialization data formats
---
camel-core/src/main/docs/serialization-dataformat.adoc | 5 ++---
camel-core/src/main/docs/string-dataformat.adoc | 5 ++---
.../src/main/java/org/apache/camel/builder/DataFormatClause.java | 3 +++
.../org/apache/camel/model/dataformat/SerializationDataFormat.java | 1 +
.../java/org/apache/camel/model/dataformat/StringDataFormat.java | 1 +
5 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/camel-core/src/main/docs/serialization-dataformat.adoc b/camel-core/src/main/docs/serialization-dataformat.adoc
index 7071ff8..52b744e 100644
--- a/camel-core/src/main/docs/serialization-dataformat.adoc
+++ b/camel-core/src/main/docs/serialization-dataformat.adoc
@@ -1,5 +1,4 @@
-[[serialization-dataformat]]
-== Java Object Serialization DataFormat
+== Java Object Serialization DataFormat (deprecated)
*Available as of Camel version 2.12*
@@ -33,4 +32,4 @@ The Java Object Serialization dataformat supports 1 options, which are listed be
=== Dependencies
This data format is provided in *camel-core* so no additional
-dependencies is needed.
+dependencies is needed.
\ No newline at end of file
diff --git a/camel-core/src/main/docs/string-dataformat.adoc b/camel-core/src/main/docs/string-dataformat.adoc
index 0402fa8..1dde92d 100644
--- a/camel-core/src/main/docs/string-dataformat.adoc
+++ b/camel-core/src/main/docs/string-dataformat.adoc
@@ -1,5 +1,4 @@
-[[string-dataformat]]
-== String Encoding DataFormat
+== String Encoding DataFormat (deprecated)
*Available as of Camel version 2.12*
@@ -45,4 +44,4 @@ from("jms://queue/order").unmarshal().string("UTF-8").processRef("newOrder");
=== Dependencies
This data format is provided in *camel-core* so no additional
-dependencies is needed.
+dependencies is needed.
\ No newline at end of file
diff --git a/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java b/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java
index f29ba8c..91420b0 100644
--- a/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java
+++ b/camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java
@@ -759,6 +759,7 @@ public class DataFormatClause<T extends ProcessorDefinition<?>> {
/**
* Uses the Java Serialization data format
*/
+ @Deprecated
public T serialization() {
return dataFormat(new SerializationDataFormat());
}
@@ -830,6 +831,7 @@ public class DataFormatClause<T extends ProcessorDefinition<?>> {
/**
* Uses the String data format
*/
+ @Deprecated
public T string() {
return string(null);
}
@@ -837,6 +839,7 @@ public class DataFormatClause<T extends ProcessorDefinition<?>> {
/**
* Uses the String data format supporting encoding using given charset
*/
+ @Deprecated
public T string(String charset) {
StringDataFormat sdf = new StringDataFormat();
sdf.setCharset(charset);
diff --git a/camel-core/src/main/java/org/apache/camel/model/dataformat/SerializationDataFormat.java b/camel-core/src/main/java/org/apache/camel/model/dataformat/SerializationDataFormat.java
index 7d88c37..83ff992 100644
--- a/camel-core/src/main/java/org/apache/camel/model/dataformat/SerializationDataFormat.java
+++ b/camel-core/src/main/java/org/apache/camel/model/dataformat/SerializationDataFormat.java
@@ -31,6 +31,7 @@ import org.apache.camel.spi.RouteContext;
*/
@Metadata(firstVersion = "2.12.0", label = "dataformat,transformation,core", title = "Java Object Serialization")
@XmlRootElement(name = "serialization")
+@Deprecated
public class SerializationDataFormat extends DataFormatDefinition {
public SerializationDataFormat() {
diff --git a/camel-core/src/main/java/org/apache/camel/model/dataformat/StringDataFormat.java b/camel-core/src/main/java/org/apache/camel/model/dataformat/StringDataFormat.java
index da23c67..510c8f8 100644
--- a/camel-core/src/main/java/org/apache/camel/model/dataformat/StringDataFormat.java
+++ b/camel-core/src/main/java/org/apache/camel/model/dataformat/StringDataFormat.java
@@ -34,6 +34,7 @@ import org.apache.camel.spi.RouteContext;
@Metadata(firstVersion = "2.12.0", label = "dataformat,transformation,core", title = "String Encoding")
@XmlRootElement(name = "string")
@XmlAccessorType(XmlAccessType.FIELD)
+@Deprecated
public class StringDataFormat extends DataFormatDefinition {
@XmlAttribute
private String charset;