users@websocket-spec.java.net

[jsr356-users] Re: [012] javadoc for parameter order in method annotations

From: Danny Coward <danny.coward_at_oracle.com>
Date: Wed, 13 Feb 2013 15:50:37 -0800

Hey Joakim,

On 2/13/13 3:35 PM, Joakim Erdfelt wrote:
> In all of the method annotations javadoc, it ends with the statement ...
>
> "The parameters may be listed in any order."
>
> But didn't the EG decide that the string or java primitive parameters
> (that are also annotated with @WebSocketPathParam) should always be
> last in the parameter list?

We may have done early on, but I think we relaxed it...
>
> I would hate to see ...
>
> @WebSocketEndpoint("/channel/{userid}/{visibility}")
> public class ChatSocket {
> @WebSocketMessage
> public void onPartialMessage(@WebSocketPathParam("visibility")
> boolean visibility, boolean finalData, Session session,
> @WebSocketPathParam("userid") String userid, ByteBuffer data)
> {
> }
> }

Do you think we should disallow it ? If its a stylistic thing, I'm not
sure its something we should stop people doing, so long as what it means
is unambiguous...

- Danny

>
> --
> Joakim Erdfelt <joakim_at_intalio.com <mailto:joakim_at_intalio.com>>
> webtide.com <http://www.webtide.com/>
> Developer advice, services and support
> from the Jetty & CometD experts
> eclipse.org/jetty <http://eclipse.org/jetty/> - cometd.org
> <http://cometd.org/>


-- 
<http://www.oracle.com> 	*Danny Coward *
Java EE
Oracle Corporation