camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1179301 - in /camel/trunk/components: camel-ahc/src/main/java/org/apache/camel/component/ahc/ camel-ahc/src/main/java/org/apache/camel/component/ahc/helper/ camel-csv/src/main/java/org/apache/camel/dataformat/csv/ camel-flatpack/src/main/j...
Date Wed, 05 Oct 2011 16:24:34 GMT
Author: dkulp
Date: Wed Oct  5 16:24:34 2011
New Revision: 1179301

URL: http://svn.apache.org/viewvc?rev=1179301&view=rev
Log:
Fix a bunch of calls to a deprecated method to remove compiler warnings

Modified:
    camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/DefaultAhcBinding.java
    camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/helper/AhcHelper.java
    camel/trunk/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java
    camel/trunk/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/DelimitedEndpoint.java
    camel/trunk/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackDataFormat.java
    camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
    camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpHelper.java
    camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java
    camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
    camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
    camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConsumer.java
    camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaProducer.java
    camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java
    camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java
    camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/XStreamDataFormat.java

Modified: camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/DefaultAhcBinding.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/DefaultAhcBinding.java?rev=1179301&r1=1179300&r2=1179301&view=diff
==============================================================================
--- camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/DefaultAhcBinding.java
(original)
+++ camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/DefaultAhcBinding.java
Wed Oct  5 16:24:34 2011
@@ -109,7 +109,7 @@ public class DefaultAhcBinding implement
 
         String contentType = ExchangeHelper.getContentType(exchange);
         BodyGenerator body = in.getBody(BodyGenerator.class);
-        String charset = IOConverter.getCharsetName(exchange, false);
+        String charset = IOHelper.getCharsetName(exchange, false);
 
         if (body == null) {
             try {

Modified: camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/helper/AhcHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/helper/AhcHelper.java?rev=1179301&r1=1179300&r2=1179301&view=diff
==============================================================================
--- camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/helper/AhcHelper.java
(original)
+++ camel/trunk/components/camel-ahc/src/main/java/org/apache/camel/component/ahc/helper/AhcHelper.java
Wed Oct  5 16:24:34 2011
@@ -85,7 +85,7 @@ public final class AhcHelper {
             int index = contentType.indexOf("charset=");
             if (index > 0) {
                 String charset = contentType.substring(index + 8);
-                exchange.setProperty(Exchange.CHARSET_NAME, IOConverter.normalizeCharset(charset));
+                exchange.setProperty(Exchange.CHARSET_NAME, IOHelper.normalizeCharset(charset));
             }
         }
     }

Modified: camel/trunk/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java?rev=1179301&r1=1179300&r2=1179301&view=diff
==============================================================================
--- camel/trunk/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java
(original)
+++ camel/trunk/components/camel-csv/src/main/java/org/apache/camel/dataformat/csv/CsvDataFormat.java
Wed Oct  5 16:24:34 2011
@@ -31,6 +31,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.converter.IOConverter;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.util.ExchangeHelper;
+import org.apache.camel.util.IOHelper;
 import org.apache.commons.csv.CSVParser;
 import org.apache.commons.csv.CSVStrategy;
 import org.apache.commons.csv.writer.CSVConfig;
@@ -59,7 +60,7 @@ public class CsvDataFormat implements Da
             config.setDelimiter(delimiter.charAt(0));
         }
 
-        OutputStreamWriter out = new OutputStreamWriter(outputStream, IOConverter.getCharsetName(exchange));
+        OutputStreamWriter out = new OutputStreamWriter(outputStream, IOHelper.getCharsetName(exchange));
         CSVWriter csv = new CSVWriter(config);
         csv.setWriter(out);
 
@@ -89,7 +90,7 @@ public class CsvDataFormat implements Da
     }
 
     public Object unmarshal(Exchange exchange, InputStream inputStream) throws Exception
{
-        InputStreamReader in = new InputStreamReader(inputStream, IOConverter.getCharsetName(exchange));
+        InputStreamReader in = new InputStreamReader(inputStream, IOHelper.getCharsetName(exchange));
         if (delimiter != null) {
             strategy.setDelimiter(delimiter.charAt(0));
         }

Modified: camel/trunk/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/DelimitedEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/DelimitedEndpoint.java?rev=1179301&r1=1179300&r2=1179301&view=diff
==============================================================================
--- camel/trunk/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/DelimitedEndpoint.java
(original)
+++ camel/trunk/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/DelimitedEndpoint.java
Wed Oct  5 16:24:34 2011
@@ -27,6 +27,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.InvalidPayloadException;
 import org.apache.camel.converter.IOConverter;
 import org.apache.camel.util.ExchangeHelper;
+import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.ResourceHelper;
 
@@ -52,7 +53,7 @@ public class DelimitedEndpoint extends F
             return getParserFactory().newDelimitedParser(bodyReader, delimiter, textQualifier);
         } else {
             InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(),
definition);
-            InputStreamReader reader = new InputStreamReader(is, IOConverter.getCharsetName(exchange));
+            InputStreamReader reader = new InputStreamReader(is, IOHelper.getCharsetName(exchange));
             return getParserFactory().newDelimitedParser(reader, bodyReader, delimiter, textQualifier,
ignoreFirstRecord);
         }
     }

Modified: camel/trunk/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackDataFormat.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackDataFormat.java?rev=1179301&r1=1179300&r2=1179301&view=diff
==============================================================================
--- camel/trunk/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackDataFormat.java
(original)
+++ camel/trunk/components/camel-flatpack/src/main/java/org/apache/camel/component/flatpack/FlatpackDataFormat.java
Wed Oct  5 16:24:34 2011
@@ -36,6 +36,7 @@ import net.sf.flatpack.writer.Writer;
 import org.apache.camel.Exchange;
 import org.apache.camel.converter.IOConverter;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.ObjectHelper;
 import org.apache.camel.util.ResourceHelper;
 import org.jdom.JDOMException;
@@ -97,7 +98,7 @@ public class FlatpackDataFormat implemen
     }
 
     public Object unmarshal(Exchange exchange, InputStream stream) throws Exception {
-        InputStreamReader reader = new InputStreamReader(stream, IOConverter.getCharsetName(exchange));
+        InputStreamReader reader = new InputStreamReader(stream, IOHelper.getCharsetName(exchange));
         try {
             Parser parser = createParser(exchange, reader);
             DataSet dataSet = parser.parse();
@@ -164,14 +165,14 @@ public class FlatpackDataFormat implemen
     protected Parser createParser(Exchange exchange, Reader bodyReader) throws IOException
{
         if (isFixed()) {
             InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext().getClassResolver(),
getDefinition());
-            InputStreamReader reader = new InputStreamReader(is, IOConverter.getCharsetName(exchange));
+            InputStreamReader reader = new InputStreamReader(is, IOHelper.getCharsetName(exchange));
             return getParserFactory().newFixedLengthParser(reader, bodyReader);
         } else {
             if (ObjectHelper.isEmpty(getDefinition())) {
                 return getParserFactory().newDelimitedParser(bodyReader, delimiter, textQualifier);
             } else {
                 InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext().getClassResolver(),
getDefinition());
-                InputStreamReader reader = new InputStreamReader(is, IOConverter.getCharsetName(exchange));
+                InputStreamReader reader = new InputStreamReader(is, IOHelper.getCharsetName(exchange));
                 return getParserFactory().newDelimitedParser(reader, bodyReader, delimiter,
textQualifier, ignoreFirstRecord);
             }
         }
@@ -180,9 +181,9 @@ public class FlatpackDataFormat implemen
     private Writer createWriter(Exchange exchange, Map<String, Object> firstRow, OutputStream
stream) throws JDOMException, IOException {
         if (isFixed()) {
             InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext().getClassResolver(),
getDefinition());
-            InputStreamReader reader = new InputStreamReader(is, IOConverter.getCharsetName(exchange));
+            InputStreamReader reader = new InputStreamReader(is, IOHelper.getCharsetName(exchange));
             FixedWriterFactory factory = new FixedWriterFactory(reader);
-            return factory.createWriter(new OutputStreamWriter(stream, IOConverter.getCharsetName(exchange)));
+            return factory.createWriter(new OutputStreamWriter(stream, IOHelper.getCharsetName(exchange)));
         } else {
             if (getDefinition() == null) {
                 DelimiterWriterFactory factory = new DelimiterWriterFactory(delimiter, textQualifier);
@@ -190,12 +191,12 @@ public class FlatpackDataFormat implemen
                 for (String key : firstRow.keySet()) {
                     factory.addColumnTitle(key);
                 }
-                return factory.createWriter(new OutputStreamWriter(stream, IOConverter.getCharsetName(exchange)));
+                return factory.createWriter(new OutputStreamWriter(stream, IOHelper.getCharsetName(exchange)));
             } else {
                 InputStream is = ResourceHelper.resolveMandatoryResourceAsInputStream(exchange.getContext().getClassResolver(),
getDefinition());
-                InputStreamReader reader = new InputStreamReader(is, IOConverter.getCharsetName(exchange));
+                InputStreamReader reader = new InputStreamReader(is, IOHelper.getCharsetName(exchange));
                 DelimiterWriterFactory factory = new DelimiterWriterFactory(reader, delimiter,
textQualifier);
-                return factory.createWriter(new OutputStreamWriter(stream, IOConverter.getCharsetName(exchange)));
+                return factory.createWriter(new OutputStreamWriter(stream, IOHelper.getCharsetName(exchange)));
             }
         }
     }

Modified: camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java?rev=1179301&r1=1179300&r2=1179301&view=diff
==============================================================================
--- camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
(original)
+++ camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java
Wed Oct  5 16:24:34 2011
@@ -409,7 +409,7 @@ public class HttpProducer extends Defaul
                         // so we only do an instanceof check and accept String if the body
is really a String
                         // do not fallback to use the default charset as it can influence
the request
                         // (for example application/x-www-form-urlencoded forms being sent)
-                        String charset = IOConverter.getCharsetName(exchange, false);
+                        String charset = IOHelper.getCharsetName(exchange, false);
                         StringEntity entity = new StringEntity((String) data, charset);
                         entity.setContentType(contentType);
                         answer = entity;

Modified: camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpHelper.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpHelper.java?rev=1179301&r1=1179300&r2=1179301&view=diff
==============================================================================
--- camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpHelper.java
(original)
+++ camel/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/helper/HttpHelper.java
Wed Oct  5 16:24:34 2011
@@ -53,7 +53,7 @@ public final class HttpHelper {
             int index = contentType.indexOf("charset=");
             if (index > 0) {
                 String charset = contentType.substring(index + 8);
-                exchange.setProperty(Exchange.CHARSET_NAME, IOConverter.normalizeCharset(charset));
+                exchange.setProperty(Exchange.CHARSET_NAME, IOHelper.normalizeCharset(charset));
             }
         }
     }

Modified: camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java?rev=1179301&r1=1179300&r2=1179301&view=diff
==============================================================================
--- camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java
(original)
+++ camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/FallbackTypeConverter.java
Wed Oct  5 16:24:34 2011
@@ -195,7 +195,7 @@ public class FallbackTypeConverter imple
         try {
             if (value instanceof InputStream) {
                 if (needFiltering(exchange)) {
-                    return unmarshaller.unmarshal(new NonXmlFilterReader(new InputStreamReader((InputStream)value,
IOConverter.getCharsetName(exchange))));
+                    return unmarshaller.unmarshal(new NonXmlFilterReader(new InputStreamReader((InputStream)value,
IOHelper.getCharsetName(exchange))));
                 }
                 return unmarshaller.unmarshal((InputStream)value);
             } else if (value instanceof Reader) {

Modified: camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java?rev=1179301&r1=1179300&r2=1179301&view=diff
==============================================================================
--- camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
(original)
+++ camel/trunk/components/camel-jaxb/src/main/java/org/apache/camel/converter/jaxb/JaxbDataFormat.java
Wed Oct  5 16:24:34 2011
@@ -40,6 +40,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.converter.IOConverter;
 import org.apache.camel.spi.DataFormat;
 import org.apache.camel.support.ServiceSupport;
+import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -163,7 +164,7 @@ public class JaxbDataFormat extends Serv
     }
 
     private NonXmlFilterReader createNonXmlFilterReader(Exchange exchange, InputStream stream)
throws UnsupportedEncodingException {
-        return new NonXmlFilterReader(new InputStreamReader(stream, IOConverter.getCharsetName(exchange)));
+        return new NonXmlFilterReader(new InputStreamReader(stream, IOHelper.getCharsetName(exchange)));
     }
 
     protected boolean needFiltering(Exchange exchange) {

Modified: camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java?rev=1179301&r1=1179300&r2=1179301&view=diff
==============================================================================
--- camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
(original)
+++ camel/trunk/components/camel-mail/src/main/java/org/apache/camel/component/mail/MailBinding.java
Wed Oct  5 16:24:34 2011
@@ -47,6 +47,7 @@ import org.apache.camel.converter.Object
 import org.apache.camel.impl.DefaultHeaderFilterStrategy;
 import org.apache.camel.spi.HeaderFilterStrategy;
 import org.apache.camel.util.CollectionHelper;
+import org.apache.camel.util.IOHelper;
 import org.apache.camel.util.ObjectHelper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -92,7 +93,7 @@ public class MailBinding {
         // and headers the headers win.
         String subject = endpoint.getConfiguration().getSubject();
         if (subject != null) {
-            mimeMessage.setSubject(subject, IOConverter.getCharsetName(exchange, false));
+            mimeMessage.setSubject(subject, IOHelper.getCharsetName(exchange, false));
         }
 
         // append the rest of the headers (no recipients) that could be subject, reply-to
etc.
@@ -155,7 +156,7 @@ public class MailBinding {
         // look for charset
         String charset = MailUtils.getCharSetFromContentType(contentType);
         if (charset != null) {
-            charset = IOConverter.normalizeCharset(charset);
+            charset = IOHelper.normalizeCharset(charset);
             if (charset != null) {
                 boolean supported;
                 try {
@@ -175,7 +176,7 @@ public class MailBinding {
         }
 
         // Using the charset header of exchange as a fall back
-        return IOConverter.getCharsetName(exchange, false);
+        return IOHelper.getCharsetName(exchange, false);
     }
 
     protected String populateContentOnMimeMessage(MimeMessage part, MailConfiguration configuration,
Exchange exchange)
@@ -329,7 +330,7 @@ public class MailBinding {
                 if (headerFilterStrategy != null
                         && !headerFilterStrategy.applyFilterToCamelHeaders(headerName,
headerValue, exchange)) {
                     if (headerName.equalsIgnoreCase("subject")) {
-                        mimeMessage.setSubject(asString(exchange, headerValue), IOConverter.getCharsetName(exchange,
false));
+                        mimeMessage.setSubject(asString(exchange, headerValue), IOHelper.getCharsetName(exchange,
false));
                         continue;
                     }
                     if (isRecipientHeader(headerName)) {

Modified: camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConsumer.java?rev=1179301&r1=1179300&r2=1179301&view=diff
==============================================================================
--- camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConsumer.java
(original)
+++ camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaConsumer.java
Wed Oct  5 16:24:34 2011
@@ -25,6 +25,7 @@ import org.apache.camel.converter.IOConv
 import org.apache.camel.impl.DefaultConsumer;
 import org.apache.camel.util.CamelLogger;
 import org.apache.camel.util.ExchangeHelper;
+import org.apache.camel.util.IOHelper;
 import org.apache.mina.common.IoAcceptor;
 import org.apache.mina.common.IoHandler;
 import org.apache.mina.common.IoHandlerAdapter;
@@ -106,7 +107,7 @@ public class MinaConsumer extends Defaul
             Exchange exchange = getEndpoint().createExchange(session, object);
             //Set the exchange charset property for converting
             if (getEndpoint().getConfiguration().getCharsetName() != null) {
-                exchange.setProperty(Exchange.CHARSET_NAME, IOConverter.normalizeCharset(getEndpoint().getConfiguration().getCharsetName()));
+                exchange.setProperty(Exchange.CHARSET_NAME, IOHelper.normalizeCharset(getEndpoint().getConfiguration().getCharsetName()));
             }
 
             try {

Modified: camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaProducer.java?rev=1179301&r1=1179300&r2=1179301&view=diff
==============================================================================
--- camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaProducer.java
(original)
+++ camel/trunk/components/camel-mina/src/main/java/org/apache/camel/component/mina/MinaProducer.java
Wed Oct  5 16:24:34 2011
@@ -28,6 +28,7 @@ import org.apache.camel.converter.IOConv
 import org.apache.camel.impl.DefaultProducer;
 import org.apache.camel.util.CamelLogger;
 import org.apache.camel.util.ExchangeHelper;
+import org.apache.camel.util.IOHelper;
 import org.apache.mina.common.ConnectFuture;
 import org.apache.mina.common.IoConnector;
 import org.apache.mina.common.IoHandler;
@@ -82,7 +83,7 @@ public class MinaProducer extends Defaul
 
         // set the exchange encoding property
         if (getEndpoint().getConfiguration().getCharsetName() != null) {
-            exchange.setProperty(Exchange.CHARSET_NAME, IOConverter.normalizeCharset(getEndpoint().getConfiguration().getCharsetName()));
+            exchange.setProperty(Exchange.CHARSET_NAME, IOHelper.normalizeCharset(getEndpoint().getConfiguration().getCharsetName()));
         }
 
         Object body = MinaPayloadHelper.getIn(getEndpoint(), exchange);

Modified: camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java?rev=1179301&r1=1179300&r2=1179301&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java
(original)
+++ camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/NettyProducer.java
Wed Oct  5 16:24:34 2011
@@ -31,6 +31,7 @@ import org.apache.camel.impl.DefaultAsyn
 import org.apache.camel.impl.DefaultExchange;
 import org.apache.camel.util.CamelLogger;
 import org.apache.camel.util.ExchangeHelper;
+import org.apache.camel.util.IOHelper;
 import org.jboss.netty.bootstrap.ClientBootstrap;
 import org.jboss.netty.bootstrap.ConnectionlessBootstrap;
 import org.jboss.netty.channel.Channel;
@@ -142,7 +143,7 @@ public class NettyProducer extends Defau
 
         // set the exchange encoding property
         if (getConfiguration().getCharsetName() != null) {
-            exchange.setProperty(Exchange.CHARSET_NAME, IOConverter.normalizeCharset(getConfiguration().getCharsetName()));
+            exchange.setProperty(Exchange.CHARSET_NAME, IOHelper.normalizeCharset(getConfiguration().getCharsetName()));
         }
 
         ChannelFuture channelFuture;

Modified: camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java?rev=1179301&r1=1179300&r2=1179301&view=diff
==============================================================================
--- camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java
(original)
+++ camel/trunk/components/camel-netty/src/main/java/org/apache/camel/component/netty/handlers/ServerChannelHandler.java
Wed Oct  5 16:24:34 2011
@@ -25,6 +25,7 @@ import org.apache.camel.component.netty.
 import org.apache.camel.converter.IOConverter;
 import org.apache.camel.util.CamelLogger;
 import org.apache.camel.util.ExchangeHelper;
+import org.apache.camel.util.IOHelper;
 import org.jboss.netty.channel.ChannelHandler;
 import org.jboss.netty.channel.ChannelHandlerContext;
 import org.jboss.netty.channel.ChannelStateEvent;
@@ -84,7 +85,7 @@ public class ServerChannelHandler extend
         }
         // set the exchange charset property for converting
         if (consumer.getConfiguration().getCharsetName() != null) {
-            exchange.setProperty(Exchange.CHARSET_NAME, IOConverter.normalizeCharset(consumer.getConfiguration().getCharsetName()));
+            exchange.setProperty(Exchange.CHARSET_NAME, IOHelper.normalizeCharset(consumer.getConfiguration().getCharsetName()));
         }
 
         try {

Modified: camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/XStreamDataFormat.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/XStreamDataFormat.java?rev=1179301&r1=1179300&r2=1179301&view=diff
==============================================================================
--- camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/XStreamDataFormat.java
(original)
+++ camel/trunk/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/XStreamDataFormat.java
Wed Oct  5 16:24:34 2011
@@ -34,6 +34,7 @@ import org.apache.camel.Exchange;
 import org.apache.camel.converter.IOConverter;
 import org.apache.camel.spi.ClassResolver;
 import org.apache.camel.spi.DataFormat;
+import org.apache.camel.util.IOHelper;
 
 /**
  * A <a href="http://camel.apache.org/data-format.html">data format</a>
@@ -86,7 +87,7 @@ public class XStreamDataFormat extends A
     // just make sure the exchange property can override the xmlstream encoding setting
     protected void updateCharactorEncodingInfo(Exchange exchange) {
         if (exchange.getProperty(Exchange.CHARSET_NAME) == null && encoding != null)
{
-            exchange.setProperty(Exchange.CHARSET_NAME, IOConverter.normalizeCharset(encoding));
+            exchange.setProperty(Exchange.CHARSET_NAME, IOHelper.normalizeCharset(encoding));
         }
     }
 



Mime
View raw message