Author: ningjiang Date: Fri Dec 30 08:27:58 2011 New Revision: 1225773 URL: http://svn.apache.org/viewvc?rev=1225773&view=rev Log: Merged revisions 1225767 via svnmerge from https://svn.apache.org/repos/asf/camel/branches/camel-2.8.x
................ r1225767 | ningjiang | 2011-12-30 15:55:52 +0800 (Fri, 30 Dec 2011) | 9 lines 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.7.x/ (props changed) camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/util/URISupport.java camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java Propchange: camel/branches/camel-2.7.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Fri Dec 30 08:27:58 2011 @@ -1,2 +1,2 @@ -/camel/branches/camel-2.8.x:1170965,1171400,1174571,1175323,1176329,1176787,1177397,1177946,1177949,1180598,1187226,1189704,1199138,1199732,1199766,1199807,1200867,1201638-1201639,1202171,1202222,1202662,1204355,1205709,1208933,1210779,1210916,1211366,1211774,1211814,1213201,1213531,1214058,1214648,1220717,1221574,1222020,1222077,1224676,1225137,1225143 -/camel/trunk:1146608,1146903,1147216,1170956,1171396,1174565,1175321,1176274,1176781-1176782,1177394,1177945,1177948,1180597,1187221,1189693,1199137,1199703,1199739,1199804,1200861,1201623,1201637,1202167,1202215,1202659,1204338,1205412,1208930,1210771,1210830,1211363,1211773,1211811,1213197,1213219,1213526,1214639,1220711,1221566,1222006,1222066,1224674,1225077-1225078 +/camel/branches/camel-2.8.x:1170965,1171400,1174571,1175323,1176329,1176787,1177397,1177946,1177949,1180598,1187226,1189704,1199138,1199732,1199766,1199807,1200867,1201638-1201639,1202171,1202222,1202662,1204355,1205709,1208933,1210779,1210916,1211366,1211774,1211814,1213201,1213531,1214058,1214648,1220717,1221574,1222020,1222077,1224676,1225137,1225143,1225767 +/camel/trunk:1146608,1146903,1147216,1170956,1171396,1174565,1175321,1176274,1176781-1176782,1177394,1177945,1177948,1180597,1187221,1189693,1199137,1199703,1199739,1199804,1200861,1201623,1201637,1202167,1202215,1202659,1204338,1205412,1208930,1210771,1210830,1211363,1211773,1211811,1213197,1213219,1213526,1214639,1220711,1221566,1222006,1222066,1224674,1225077-1225078,1225766 Propchange: camel/branches/camel-2.7.x/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/util/URISupport.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/util/URISupport.java?rev=1225773&r1=1225772&r2=1225773&view=diff ============================================================================== --- camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/util/URISupport.java (original) +++ camel/branches/camel-2.7.x/camel-core/src/main/java/org/apache/camel/util/URISupport.java Fri Dec 30 08:27:58 2011 @@ -187,7 +187,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.7.x/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java URL: http://svn.apache.org/viewvc/camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java?rev=1225773&r1=1225772&r2=1225773&view=diff ============================================================================== --- camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java (original) +++ camel/branches/camel-2.7.x/camel-core/src/test/java/org/apache/camel/util/URISupportTest.java Fri Dec 30 08:27:58 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 {
