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

ConstantDescs.FALSE claims it represents TRUE

    XMLWordPrintable

    Details

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

      Description

      Summary

      Fix a copy/paste error in the specs for ConstantDescs.

      Problem

      The specification for java.lang.constant.ConstantDescs.FALSE claims it represents the constant Boolean.TRUE. Clearly, it should represent Boolean.FALSE instead. This was probably just a copy/paste error.

      Solution

      Apply the fix as shown below.

      Specification

      diff --git a/src/java.base/share/classes/java/lang/constant/ConstantDescs.java b/src/java.base/share/classes/java/lang/constant/ConstantDescs.java
      index 4dbdc193f7c..3a000d1bd4a 100644
      --- a/src/java.base/share/classes/java/lang/constant/ConstantDescs.java
      +++ b/src/java.base/share/classes/java/lang/constant/ConstantDescs.java
      @@ -276,7 +276,7 @@ public final class ConstantDescs {
                                             "TRUE", CD_Boolean, CD_Boolean);
      
           /**
      -     * Nominal descriptor representing the constant {@linkplain Boolean#TRUE}
      +     * Nominal descriptor representing the constant {@linkplain Boolean#FALSE}
            * @since 15
            */
           public static final DynamicConstantDesc<Boolean> FALSE

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              smarks Stuart Marks
              Reporter:
              smarks Stuart Marks
              Reviewed By:
              Brian Burkhalter, Jorn Vernee, Mandy Chung
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: