camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [2/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:55 GMT
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/c4b2c828
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/c4b2c828
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/c4b2c828

Branch: refs/heads/camel-2.13.x
Commit: c4b2c8280618eb2f1a4735a6ee1d3f90d2354f3a
Parents: 86e9e82
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:59:15 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/c4b2c828/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/c4b2c828/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