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

    • Sub-task
    • Resolution: Fixed
    • P3
    • 19
    • 7
    • core-libs
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: