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

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

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 17
    • core-libs
    • None
    • minimal
    • Java API
    • SE

      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);

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

              Created:
              Updated:
              Resolved: