• Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • 7
    • 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.

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

              Created:
              Updated:
              Resolved: