Menu

#301 IllegalAccessException with protected methods in reflection

None
closed
nobody
General (151)
5
2018-08-02
2007-09-26
No

I traced the exception to
bsh.Reflect:82 with the line contents:
"return invokeMethod( method, object, args );"

As I'm running a SVN trunk I just added a method.setAccessible(true) and the problem is fixed for me.

Of-course it depends on developers in charge if this should be added to invokeMethod itself or callers should obey a contract of invoking only accessible methods and thus seting the accessibility before calling.

Discussion

  • nickl-

    nickl- - 2018-08-02
    • status: open --> closed
    • Group: -->
     
  • nickl-

    nickl- - 2018-08-02

    Ticket has been migrated to github.
    Please follow up on this over here: https://github.com/beanshell/beanshell/issues/439

     

Log in to post a comment.