2012/12/4 Mark Thomas <ma...@apache.org>: > On 04/12/2012 15:57, Konstantin Kolinko wrote: >> 2012/12/3 <ma...@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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org