DataInputStream.readLong not threadsafe unlike its other functions

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 1.3.0
    • Component/s: core-libs
    • generic
    • generic



      Name: ssT124754 Date: 03/23/2001


      java version "1.3.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C)
      Java HotSpot(TM) Server VM (build 2.0fcs-E, mixed mode)

      The 'readLong' function in 'DataInputStream' calls 'readInt' on 'this', instead
      of on its 'in' local variable like all the other member functions do.

      I presume all the member functions do this in case the wrapped InputStream gets
      changed in between the different function calls (could be done in a derived
      class?).

      In any case it ought to be consistent: either they all use a local variable or
      none should.
      (Review ID: 119363)
      ======================================================================

            Assignee:
            Iris Clark
            Reporter:
            Shaheen Sultana (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: