Author: ningjiang
Date: Fri Feb 10 06:24:37 2012
New Revision: 1242694
URL: http://svn.apache.org/viewvc?rev=1242694&view=rev
Log:
CAMEL-4954 revert the patch
Modified:
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/URISupport.java
camel/branches/camel-2.8.x/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
Modified:
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/URISupport.java
URL:
http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/URISupport.java?rev=1242694&r1=1242693&r2=1242694&view=diff
==============================================================================
---
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/URISupport.java
(original)
+++
camel/branches/camel-2.8.x/camel-core/src/main/java/org/apache/camel/util/URISupport.java
Fri Feb 10 06:24:37 2012
@@ -74,10 +74,8 @@ public final class URISupport {
for (String parameter : parameters) {
int p = parameter.indexOf("=");
if (p >= 0) {
- // The replaceAll is an ugly workaround for
CAMEL-4954, awaiting a cleaner fix once CAMEL-4425
- // is fully resolved in all components
String name = URLDecoder.decode(parameter.substring(0,
p), CHARSET);
- String value = URLDecoder.decode(parameter.substring(p
+ 1).replaceAll("%", "%25"), CHARSET);
+ String value = URLDecoder.decode(parameter.substring(p
+ 1), CHARSET);
// does the key already exist?
if (rc.containsKey(name)) {
Modified:
camel/branches/camel-2.8.x/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
URL:
http://svn.apache.org/viewvc/camel/branches/camel-2.8.x/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java?rev=1242694&r1=1242693&r2=1242694&view=diff
==============================================================================
---
camel/branches/camel-2.8.x/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
(original)
+++
camel/branches/camel-2.8.x/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
Fri Feb 10 06:24:37 2012
@@ -126,13 +126,6 @@ public class URISupportTest extends Cont
assertEquals("jms://queue:foo?foo=bar&selector=somekey%3D%27somevalue%27", out);
}
- public void testNormalizeEndpointWithPercentSignInParameter() throws
Exception {
- String out =
URISupport.normalizeUri("http://someendpoint?username=james&password=%25test");
- assertNotNull(out);
- // Camel will safe encode the URI
- assertEquals("http://someendpoint?password=%25test&username=james",
out);
- }
-
public void testParseParameters() throws Exception {
URI u = new URI("quartz:myGroup/myTimerName?cron=0+0+*+*+*+?");
Map<String, Object> params = URISupport.parseParameters(u);