[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: JBREFLECT-50, determining need for setAccessible bug

scott.stark@jboss.org do-not-reply at jboss.com
Mon Feb 16 17:13:57 EST 2009


Note that to integrate with the current security manager check done in setMethod, the fix should be something like this rather than what I show on the jira issue:


  |    public void setMethod(Method method)
  |    {
  |       boolean callSetAccessible = false;
  |       if (method != null)
  |       {
  |          int classModifiers = method.getDeclaringClass().getModifiers();
  |          boolean isPublic = isPublic() && Modifier.isPublic(classModifiers);
  |          accessCheck(isPublic);
  |          callSetAccessible = !isPublic;
  |       }
  | 
  |       this.method = method;
  | 
  |       if (callSetAccessible)
  |          setAccessible();
  |    }
  | 


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4210529#4210529

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4210529



More information about the jboss-dev-forums mailing list