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

Invalid definition of short in readShort() method of DataInput

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b56
    • CPU:
      x86
    • OS:
      linux

      Description



      Name: rmT116609 Date: 06/03/2004


      A DESCRIPTION OF THE PROBLEM :
      The string :
      (short)((a << 8) * | (b & 0xff))

      Is not a valid definition of a short and allows an ambiguity as to the actual definition of what the short is defined as.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The string : (short)((a << 8) | (b & 0xff)) would be more accurate
      ACTUAL -
      The string (short)((a << 8) * | (b & 0xff)) is present

      URL OF FAULTY DOCUMENTATION :
      http://java.sun.com/j2se/1.4.2/docs/api/java/io/DataInput.html#readShort()
      (Incident Review ID: 276159)
      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            martin Martin Buchholz
            Reporter:
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: