Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8177155 Examine @CS methods when called from attached thread with no caller
  3. JDK-8281000

ClassLoader::registerAsParallelCapable throws NPE if caller is null

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7
    • Fix Version/s: 19
    • Component/s: core-libs
    • Labels:
      None

      Description

      ClassLoader::registerAsParallelCapable should only exceed if the caller is a subclass of ClassLoader.

      If the caller is null, the method could simply return false. We could also consider to throw IllegalCallerException but it should probably throw IllegalCallerException for all other invalid cases such as a non-null caller is not a subclass of ClassLoader. It seems that returning false is a reasonable solution for simplicity

      The existing implementation throws NPE since this method was added.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: