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

DataBuffer.TYPE_SHORT/TYPE_FLOAT/TYPE_DOUBLE are not placeholders

XMLWordPrintable

    • Icon: CSR CSR
    • Resolution: Approved
    • Icon: P4 P4
    • 20
    • client-libs
    • None
    • 2d
    • minimal
    • JavaDoc update only.
    • Java API
    • SE

      Summary

      The specification for the static fields TYPE_SHORT, TYPE_FLOAT, and TYPE_DOUBLE in the "java.awt.image.DataBuffer" class is not up to date.

      Problem

      The specification for these fields mentioned that all of them are " Placeholder for future use." But these fields are used by various places in the JDK, the same as other fields in the "java.awt.image.DataBuffer" class.

      Solution

      The next part of the specification should be removed: " Placeholder for future use."

      Specification

      java/awt/image/DataBuffer.java
      
       /**
        * This class exists to wrap one or more data arrays.  Each data array in
      @@ -75,16 +75,16 @@ public abstract class DataBuffer {
           /** Tag for unsigned short data. */
           @Native public static final int TYPE_USHORT = 1;
      
      -    /** Tag for signed short data.  Placeholder for future use. */
      +    /** Tag for signed short data. */
           @Native public static final int TYPE_SHORT = 2;
      
           /** Tag for int data. */
           @Native public static final int TYPE_INT   = 3;
      
      -    /** Tag for float data.  Placeholder for future use. */
      +    /** Tag for float data. */
           @Native public static final int TYPE_FLOAT  = 4;
      
      -    /** Tag for double data.  Placeholder for future use. */
      +    /** Tag for double data. */
           @Native public static final int TYPE_DOUBLE  = 5;

            serb Sergey Bylokhov
            serb Sergey Bylokhov
            Alexander Zvegintsev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: