Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8224985

assertion related to NPE at DynamicCallSiteDesc::withArgs should be reworded

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Approved
    • Fix Version/s: 17
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal
    • Interface Kind:
      Java API
    • Scope:
      SE

      Description

      Summary

      The assertion related to NullPointerException at method java.lang.constant.DynamicCallSiteDesc::withArgs should be reworded.

      Problem

      The assertion should mention that the NPE can be thrown if the argument contains any null entry.

      Solution

      Reword the assertion.

      Specification

      diff -r dd321e3596c0 -r 78f3b29fb255 src/java.base/share/classes/java/lang/constant/DynamicCallSiteDesc.java
      --- a/src/java.base/share/classes/java/lang/constant/DynamicCallSiteDesc.java   Wed May 29 13:58:05 2019 +0100
      +++ b/src/java.base/share/classes/java/lang/constant/DynamicCallSiteDesc.java   Wed May 29 09:14:55 2019 -0400
      @@ -156,7 +156,7 @@
            *                      to the bootstrap, that would appear in the
            *                      {@code BootstrapMethods} attribute
            * @return the nominal descriptor
      -     * @throws NullPointerException if any parameter is null
      +     * @throws NullPointerException if the argument or its contents are {@code null}
            */
           public DynamicCallSiteDesc withArgs(ConstantDesc... bootstrapArgs) {
               return new DynamicCallSiteDesc(bootstrapMethod, invocationName, invocationType, bootstrapArgs);

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              vromero Vicente Arturo Romero Zaldivar
              Reporter:
              vromero Vicente Arturo Romero Zaldivar
              Reviewed By:
              Joe Darcy
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: