camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/3] git commit: CAMEL-7459: Fixed using RAW(xxx) in uris when xxx was ending with ). Thanks to Matthew Gill for the patch.
Date Fri, 23 May 2014 06:59:54 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.12.x c17b1dd14 -> 6369450f3
  refs/heads/camel-2.13.x 86e9e8281 -> c4b2c8280
  refs/heads/master 01b3cc097 -> 57ba1bdea


CAMEL-7459: Fixed using RAW(xxx) in uris when xxx was ending with ). Thanks to Matthew Gill
for the patch.


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

Branch: refs/heads/master
Commit: 57ba1bdeaa0172ae4927e92a5b074be623141e04
Parents: 01b3cc0
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri May 23 08:58:42 2014 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri May 23 08:58:42 2014 +0200

----------------------------------------------------------------------
 camel-core/src/main/java/org/apache/camel/util/URISupport.java   | 2 +-
 .../org/apache/camel/issues/EndpointWithRawUriParameterTest.java | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/57ba1bde/camel-core/src/main/java/org/apache/camel/util/URISupport.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/util/URISupport.java b/camel-core/src/main/java/org/apache/camel/util/URISupport.java
index 4b06a13..0f37a2c 100644
--- a/camel-core/src/main/java/org/apache/camel/util/URISupport.java
+++ b/camel-core/src/main/java/org/apache/camel/util/URISupport.java
@@ -155,7 +155,7 @@ public final class URISupport {
                 char ch = uri.charAt(i);
                 // look ahead of the next char
                 char next;
-                if (i < uri.length() - 2) {
+                if (i <= uri.length() - 2) {
                     next = uri.charAt(i + 1);
                 } else {
                     next = '\u0000';

http://git-wip-us.apache.org/repos/asf/camel/blob/57ba1bde/camel-core/src/test/java/org/apache/camel/issues/EndpointWithRawUriParameterTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/issues/EndpointWithRawUriParameterTest.java
b/camel-core/src/test/java/org/apache/camel/issues/EndpointWithRawUriParameterTest.java
index da21b39..b4bfcf5 100644
--- a/camel-core/src/test/java/org/apache/camel/issues/EndpointWithRawUriParameterTest.java
+++ b/camel-core/src/test/java/org/apache/camel/issues/EndpointWithRawUriParameterTest.java
@@ -92,7 +92,7 @@ public class EndpointWithRawUriParameterTest extends ContextTestSupport
{
     public void testRawUriParameter() throws Exception {
         getMockEndpoint("mock:result").expectedMessageCount(1);
         getMockEndpoint("mock:result").expectedHeaderReceived("username", "scott");
-        getMockEndpoint("mock:result").expectedHeaderReceived("password", "++%%w?rd");
+        getMockEndpoint("mock:result").expectedHeaderReceived("password", "++%%w?rd)");
 
         template.sendBody("direct:start", "Hello World");
 
@@ -108,7 +108,7 @@ public class EndpointWithRawUriParameterTest extends ContextTestSupport
{
                 context.addComponent("mycomponent", new MyComponent());
 
                 from("direct:start")
-                    .to("mycomponent:foo?password=RAW(++%%w?rd)&username=scott")
+                    .to("mycomponent:foo?username=scott&password=RAW(++%%w?rd))")
                     .to("mock:result");
             }
         };


Mime
View raw message