camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1225767 - in /camel/branches/camel-2.8.x: ./ camel-core/src/main/java/org/apache/camel/util/URISupport.java camel-core/src/test/java/org/apache/camel/util/URISupportTest.java
Date Fri, 30 Dec 2011 07:55:53 GMT
Author: ningjiang
Date: Fri Dec 30 07:55:52 2011
New Revision: 1225767

URL: http://svn.apache.org/viewvc?rev=1225767&view=rev
Log:
Merged revisions 1225766 via svnmerge from 
https://svn.apache.org/repos/asf/camel/trunk

........
  r1225766 | ningjiang | 2011-12-30 15:22:45 +0800 (Fri, 30 Dec 2011) | 1 line
  
  CAMEL-4841 Fixed the issue that URI normalization duplicates query if path is empty
........

Modified:
    camel/branches/camel-2.8.x/   (props changed)
    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

Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Dec 30 07:55:52 2011
@@ -1 +1 @@
-/camel/trunk:1212504,1215477,1221565,1224674,1225077-1225078
+/camel/trunk:1212504,1215477,1221565,1224674,1225077-1225078,1225766

Propchange: camel/branches/camel-2.8.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

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=1225767&r1=1225766&r2=1225767&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 Dec 30 07:55:52 2011
@@ -249,7 +249,8 @@ public final class URISupport {
             path = path.substring(2);
         }
         int idx = path.indexOf('?');
-        if (idx > 0) {
+        // when the path has ?
+        if (idx != -1) {
             path = path.substring(0, idx);
         }
 

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=1225767&r1=1225766&r2=1225767&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 Dec 30 07:55:52 2011
@@ -48,6 +48,12 @@ public class URISupportTest extends Cont
         out1 = URISupport.normalizeUri("seda:foo?concurrentConsumer=2");
         out2 = URISupport.normalizeUri("seda:foo");
         assertNotSame(out1, out2);
+        
+        out1 = URISupport.normalizeUri("foo:?test=1");
+        out2 = URISupport.normalizeUri("foo://?test=1");
+        assertEquals("foo://?test=1", out2);
+        assertEquals(out1, out2);
+        
     }
 
     public void testNormalizeEndpointUriNoParam() throws Exception {



Mime
View raw message