Details

    • Sub-task
    • Resolution: Fixed
    • P4
    • 19
    • 7
    • core-libs
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: