You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2014/05/23 08:59:56 UTC
[3/3] git commit: CAMEL-7459: Fixed using RAW(xxx) in uris when xxx
was ending with ). Thanks to Matthew Gill for the patch.
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/6369450f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6369450f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6369450f
Branch: refs/heads/camel-2.12.x
Commit: 6369450f3473b4b3bcad7d7d4cecc255a3d177e9
Parents: c17b1dd
Author: Claus Ibsen <da...@apache.org>
Authored: Fri May 23 08:58:42 2014 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri May 23 08:59:39 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/6369450f/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/6369450f/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");
}
};