On Jun 27, 2013, at 6:08 AM, ma...@apache.org wrote: > Author: markt > Date: Thu Jun 27 11:08:03 2013 > New Revision: 1497299 > > URL: http://svn.apache.org/r1497299 > Log: > WebSocket 1.0, Section 4.8 > Don't look for annotations on inherited methods. > > Modified: > tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java > > Modified: > tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java > URL: > http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java?rev=1497299&r1=1497298&r2=1497299&view=diff > ============================================================================== > --- tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java > (original) > +++ tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java > Thu Jun 27 11:08:03 2013 > @@ -77,7 +77,7 @@ public class PojoMethodMapping { > Method open = null; > Method close = null; > Method error = null; > - for (Method method : clazzPojo.getMethods()) { > + for (Method method : clazzPojo.getDeclaredMethods()) { > if (method.getAnnotation(OnOpen.class) != null) {
This will return non-public methods as well as public methods. Are non-public WebSocket-annotated methods permitted? If not, would it be better to throw an exception here if(!Modifier.isPublic(method.getModifiers())) instead of allowing configuration to succeed and then receiving an IllegalAccessException during a session, possibly after it has been active for some time? Nick --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org