Our current UriBuilder has nice reflective properties like this: String foo = "http://foo.com/a?z=1&a=2";
UriBuilder.parse(foo).toString().equals(foo); I think this behavior is worth preserving I would like to see a Multimap implementation of query params. Note that ImmutableListMultimaps also retain their insertion order. On Tue, Aug 31, 2010 at 2:23 AM, Gagandeep singh <[email protected]>wrote: > I have a doubt. A fellow colleague tells me that we should retain the order > in which the keys are inserted into the query params map, because some ppl > do funny stuff like their own begin and end parameters and mark useful > parameters in between. > > I was wondering if we should go with a SortedMap approach for query params > instead. I mean do we really need to bother about query param P1 added > before query param P2 ? Also, tomorrow if some1 refactores some code, the > tests should not fail because the order of insertion has changed. > > As a side note, i think Google uses LinkedListMultimap for query params. > Isn't that better than LinkedHashMap<String, List<String>> ? > > Thoughts ? > > > > On Mon, Aug 30, 2010 at 1:31 PM, Gagandeep singh <[email protected] > >wrote: > > > Nice debugging. > > > > > > On Mon, Aug 30, 2010 at 7:42 AM, Paul Lindner <[email protected] > >wrote: > > > >> The test output showed that the problem was incorrectly ordered query > >> params. I validated that the problem occurs only on Java 1.5. > Therefore > >> it > >> had to be a HashMap iteration problem somewhere. So I poked around > >> UriBuilder and found one remaining use of HashMap and replaced it with > >> LinkedHashMap. > >> > >> On Sun, Aug 29, 2010 at 6:54 PM, Gagandeep singh <[email protected] > >> >wrote: > >> > >> > Could you also tell us how you found and fixed the problem ? > >> > > >> > On Mon, Aug 30, 2010 at 7:24 AM, Gagandeep singh < > [email protected] > >> > >wrote: > >> > > >> > > Thanks for fixing this Paul. > >> > > > >> > > > >> > > On Mon, Aug 30, 2010 at 2:46 AM, Apache Hudson Server < > >> > > [email protected]> wrote: > >> > > > >> > >> See <https://hudson.apache.org/hudson/job/Shindig/1793/> > >> > >> > >> > >> > >> > >> > >> > > > >> > > >> > >> > >> > >> -- > >> Paul Lindner -- [email protected] -- linkedin.com/in/plindner > >> > > > > > -- Paul Lindner -- [email protected] -- linkedin.com/in/plindner
