Author: remy.maucherat(a)jboss.com
Date: 2014-01-23 10:10:04 -0500 (Thu, 23 Jan 2014)
New Revision: 2354
Modified:
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java
Log:
Use setAccessible on reflection methods, just in case. If it fails, ignore.
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
12:44:12 UTC (rev 2353)
+++
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java 2014-01-23
15:10:04 UTC (rev 2354)
@@ -121,6 +121,12 @@
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