tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1416258 - in /tomcat/trunk: java/javax/websocket/ java/org/apache/tomcat/websocket/ webapps/examples/WEB-INF/classes/websocket/echo/ webapps/examples/websocket/
Date Tue, 04 Dec 2012 18:01:35 GMT
2012/12/4 Mark Thomas <markt@apache.org>:
> On 04/12/2012 15:57, Konstantin Kolinko wrote:
>> 2012/12/3  <markt@apache.org>:
>>> Author: markt
>>> Date: Sun Dec  2 21:01:52 2012
>>> New Revision: 1416258
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1416258&view=rev
>>> Log:
>>> WebSocket 1.0 implementation part 7 of many
>>> Complete path parameter passing for POJOs
>
>
>>> Modified: tomcat/trunk/java/org/apache/tomcat/websocket/PojoMethodMapping.java
>>> URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/PojoMethodMapping.java?rev=1416258&r1=1416257&r2=1416258&view=diff
>>>
>>
>>>  public class PojoMethodMapping {
>> (...)
>>
>>> +
>>> +    private static Object coerceToType(Class<?> type, String value) {
>>> +
>>> +        if (type.equals(String.class)) {
>>
>> The above probably needs " || type.equals(Object.class)".
>
> Why? Object isn't a permitted parameter type unless I have missed
> something in the Ws draft spec.
>

I was not reading the spec, just thought that something was missing.

Reading JavaWebSocket_JSR356_006EDR.pdf,
(Early draft preview from http://www.jcp.org/en/jsr/detail?id=356 )

For the methods annotated with @WebSocketOpen, @WebSocketClose and
@WebSocketError the only allowed type for these parameters is String.

So the whole coerceToType() can be removed?

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message