Author: remy.maucherat(a)jboss.com
Date: 2014-01-23 11:06:23 -0500 (Thu, 23 Jan 2014)
New Revision: 2356
Modified:
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerBase.java
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java
Log:
PojoMethodMapping didn't look like the right location in the end, trying the direct
superclass constructor.
Modified:
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerBase.java
===================================================================
---
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerBase.java 2014-01-23
15:25:58 UTC (rev 2355)
+++
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/pojo/PojoMessageHandlerBase.java 2014-01-23
16:06:23 UTC (rev 2356)
@@ -49,6 +49,12 @@
int indexSession, long maxMessageSize) {
this.pojo = pojo;
this.method = method;
+ try {
+ this.method.setAccessible(true);
+ } catch (Exception e) {
+ // It is better to make sure the method is accessible, but
+ // ignore exceptions and hope for the best
+ }
this.session = session;
this.params = params;
this.indexPayload = indexPayload;
Modified:
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java
===================================================================
---
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java 2014-01-23
15:25:58 UTC (rev 2355)
+++
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java 2014-01-23
16:06:23 UTC (rev 2356)
@@ -121,12 +121,6 @@
if (!Modifier.isPublic(m.getModifiers())) {
throw new DeploymentException(MESSAGES.methodNotPublic(m.getName()));
}
- try {
- m.setAccessible(true);
- } catch (Exception e) {
- // It is better to make sure the method is accessible, but
- // ignore exceptions and hope for the best
- }
}
Show replies by date