camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r943776 - in /camel/trunk/camel-core/src/main/java/org/apache/camel: Exchange.java converter/IOConverter.java converter/jaxp/XmlConverter.java
Date Thu, 13 May 2010 02:47:14 GMT
Author: ningjiang
Date: Thu May 13 02:47:14 2010
New Revision: 943776

URL: http://svn.apache.org/viewvc?rev=943776&view=rev
Log:
CAMEL-2712 Using the same system property for default charset as XmlConverter does

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/converter/IOConverter.java
    camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java?rev=943776&r1=943775&r2=943776&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/Exchange.java Thu May 13 02:47:14
2010
@@ -55,6 +55,7 @@ public interface Exchange {
     String CORRELATION_ID   = "CamelCorrelationId";
 
     String DATASET_INDEX = "CamelDataSetIndex";
+    String DEFAULT_CHARSET_PROPERTY = "org.apache.camel.default.charset";
 
     String EXCEPTION_CAUGHT     = "CamelExceptionCaught";
     String ERRORHANDLER_HANDLED = "CamelErrorHandlerHandled";

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/converter/IOConverter.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/IOConverter.java?rev=943776&r1=943775&r2=943776&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/converter/IOConverter.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/converter/IOConverter.java Thu May
13 02:47:14 2010
@@ -338,7 +338,7 @@ public final class IOConverter {
     }
     
     public static String getDefaultCharsetName() {
-        return "UTF-8";
+        return ObjectHelper.getSystemProperty(Exchange.DEFAULT_CHARSET_PROPERTY, "UTF-8");
     }
     
     /**

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java?rev=943776&r1=943775&r2=943776&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/converter/jaxp/XmlConverter.java
Thu May 13 02:47:14 2010
@@ -63,9 +63,11 @@ import org.apache.camel.util.ObjectHelpe
  */
 @Converter
 public class XmlConverter {
+    @Deprecated
+    //It will be removed in Camel 3.0, please use the Exchange.DEFAULT_CHARSET 
     public static final String DEFAULT_CHARSET_PROPERTY = "org.apache.camel.default.charset";
-
-    public static String defaultCharset = ObjectHelper.getSystemProperty(DEFAULT_CHARSET_PROPERTY,
"UTF-8");
+    
+    public static String defaultCharset = ObjectHelper.getSystemProperty(Exchange.DEFAULT_CHARSET_PROPERTY,
"UTF-8");
 
     /*
      * When converting a DOM tree to a SAXSource, we try to use Xalan internal DOM parser
if



Mime
View raw message