(reflect) invoke() may fail even for public method on IllegalAccessException

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 1.3.1
    • Component/s: core-libs
    • None

      http://openide.netbeans.org/issues/show_bug.cgi?id=11679

      A public method is defined in package private class. The package private class is then extended by a public class ni the same package. So:

        Method theMethod = publicIntance.getClass().getMethod("theMethod");

      returns proper method (quering it for accessibility returns true). And it is possible to call the method without reflection:

        publicInstance.theMethod();

      but reflection invocation

        theMethod.invoke(publicInstance, new Object[0])

      throws the exception.

            Assignee:
            Iris Clark
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: