• Type: Sub-task
    • Resolution: Fixed
    • Priority: P4
    • 19
    • Affects Version/s: 7
    • Component/s: core-libs
    • None

      Access checks are performed at the method handle creation time via the Lookup object against its lookup class.

      If MethodHandles::lookup is invoked via JNI code with no caller frame, two possible options:
      1. throw IllegalCallerException as no caller is available
      2. return a public lookup (MethodHandles::publicLookup)

      While it may look that returning a public lookup is JNI-friendly, I think the caller should call the proper API, i.e. MethodHandles::publicLookup, if public lookup is what they want. Throwing IllegalCallerException would help the existing code to call the right API.

            Assignee:
            Tim Prinzing (Inactive)
            Reporter:
            Mandy Chung (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: