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

(spec) {DataInput,RandomAccessFile}.readLong() documentation potentially confusing

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Open
    • Priority: P5
    • Resolution: Unresolved
    • Affects Version/s: 5.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Understanding:
      Cause Known
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      FULL PRODUCT VERSION :
      1.4.2_11

      FULL OS VERSION :
      Not related to a specific OS

      A DESCRIPTION OF THE PROBLEM :
      The documentation of readLong() of RandomAccessFile as appears in http://java.sun.com/j2se/1.4.2/docs/api/java/io/RandomAccessFile.html#readLong() is incorrect.
      Specifically, if the bytes read are 0, 0, 0, 0, 0, 0, 0, CA (-54), the result, according to the documentation would be -54 and not 202.

      Note:
      1. The method readLong() works correctly - the result is 202.
      2. The documentation in DataInput.readLong() is different and involves OR operations between the bytes - as it should be.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Look in the following link:
      http://java.sun.com/j2se/1.4.2/docs/api/java/io/RandomAccessFile.html#readLong()


      REPRODUCIBILITY :
      This bug can be reproduced always.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Imported:
              Indexed: