Community

Testing jboss-reflect with a SecurityManager enabled

reply from Kabir Khan in JBoss Microcontainer Development - View the full discussion

Kabir Khan wrote:

 

My plan there is to modify JavassistFieldInfo and JavassistMethodInfo to throw an exception if an attempt is made to access them if they are not public and there is a security manager present.

Actually, I will make this behave as their reflect counterparts


   public static void checkAccess(MemberInfo info)
   {
       if (!info.isPublic() && System.getSecurityManager() != null)
          AccessController.checkPermission(new ReflectPermission("suppressAccessChecks"));
   }

Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer Development at Community