ConstantPoolBuilder::loadableConstantEntry and constantValueEntry should throw NPE

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 26
    • Affects Version/s: 25
    • Component/s: core-libs
    • None

      The methods java.lang.classfile.constantpool.ConstantPoolBuilder::loadableConstantEntry and constantValueEntry currently throw IllegalArgumentException for incoming null arguments. This is problematic because these factory methods are used to process nested constant descriptors, such as the List<ConstantDesc> for bsmEntry; it creates confusion when users see IAE but find it ultimately coming from nested nulls in lists.

            Assignee:
            Chen Liang
            Reporter:
            Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: