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

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

      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.

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

              Created:
              Updated:
              Resolved: