camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [3/3] git commit: CAMEL-7876 Fixed the build error and unicode encoding issue
Date Sun, 28 Sep 2014 06:18:23 GMT
CAMEL-7876 Fixed the build error and unicode encoding issue


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a3e20778
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a3e20778
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a3e20778

Branch: refs/heads/master
Commit: a3e20778c37adcb420f214f34bbdaa28e6c2d10b
Parents: 164d65e
Author: Willem Jiang <willem.jiang@gmail.com>
Authored: Sun Sep 28 14:17:52 2014 +0800
Committer: Willem Jiang <willem.jiang@gmail.com>
Committed: Sun Sep 28 14:17:52 2014 +0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/util/GroupIterator.java     | 2 +-
 .../src/test/java/org/apache/camel/util/GroupIteratorTest.java | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/a3e20778/camel-core/src/main/java/org/apache/camel/util/GroupIterator.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/GroupIterator.java b/camel-core/src/main/java/org/apache/camel/util/GroupIterator.java
index d03e717..b241d18 100644
--- a/camel-core/src/main/java/org/apache/camel/util/GroupIterator.java
+++ b/camel-core/src/main/java/org/apache/camel/util/GroupIterator.java
@@ -155,7 +155,7 @@ public final class GroupIterator implements Iterator<Object>, Closeable
{
                 bos.write(bytes);
             } else if (data != null) {
                 // convert to input stream
-                InputStream is = context.getTypeConverter().mandatoryConvertTo(InputStream.class,
data);
+                InputStream is = camelContext.getTypeConverter().mandatoryConvertTo(InputStream.class,
data);
                 IOHelper.copy(is, bos);
             }
 

http://git-wip-us.apache.org/repos/asf/camel/blob/a3e20778/camel-core/src/test/java/org/apache/camel/util/GroupIteratorTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/util/GroupIteratorTest.java b/camel-core/src/test/java/org/apache/camel/util/GroupIteratorTest.java
index fb5c5c7..2aeef2f 100644
--- a/camel-core/src/test/java/org/apache/camel/util/GroupIteratorTest.java
+++ b/camel-core/src/test/java/org/apache/camel/util/GroupIteratorTest.java
@@ -72,7 +72,7 @@ public class GroupIteratorTest extends TestSupport {
             return;
         }
 
-        byte[] buf = "£1\n£2\n".getBytes(StandardCharsets.UTF_8);
+        byte[] buf = "\u00A31\n\u00A32\n".getBytes(StandardCharsets.UTF_8);
 
         ByteArrayInputStream in = new ByteArrayInputStream(buf);
 
@@ -83,8 +83,8 @@ public class GroupIteratorTest extends TestSupport {
         GroupIterator gi = new GroupIterator(exchange, scanner, "\n", 1);
 
         assertTrue(gi.hasNext());
-        assertEquals("£1", gi.next());
-        assertEquals("£2", gi.next());
+        assertEquals("\u00A31", gi.next());
+        assertEquals("\u00A32", gi.next());
         assertFalse(gi.hasNext());
 
         IOHelper.close(gi);


Mime
View raw message