users@jsr311.java.net

Re: more comments to JSR311

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Fri, 04 Apr 2008 08:48:48 -0400

On Apr 4, 2008, at 8:27 AM, Stephan Koops wrote:
> Hi Marc,
>> @PathParam gets the latest value (lexically) for the parameter.
> If I understand lexical order ("123" < "12345" < "124" < "456" <
> "abc" < "d" < "def") right, than I see a big problem.

By lexical order I mean the order in which the the parameters are
encountered scanning left to right through the URI so I think we agree.

Marc.

> Think the following example:
>
> @Path("xx")
> public class RootResoureClass {
> @Path("aa/{a}")
> public Src getSubResource(@PathParam("a") String a1, ...) { ...;
> return new SubResourceClass(...); }
> }
>
> public class SubResourceClass {
> @Path("bb/{a}")
> public String getXy(@PathParam("a") String a2, ...) { }
> }
>
> With request ".../xx/aa/456/bb/123": a1 = "456" (correct) and a2 =
> "456" (This will confuse *every* developer here, if a2 is not the
> value of the matched parameter for this @Path, = "123").
> IMO for a @PathParam it *must* be the last of the matched values.
> For the other @*Param it doesn't matter for me (I would let it open
> in the specification)
>
> best regards
> Stephan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: users-help_at_jsr311.dev.java.net
>

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.