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

(bf) Generify Buffer to enhance chaining of flip()

XMLWordPrintable

    • x86
    • windows_xp

      A DESCRIPTION OF THE REQUEST :
      Assume I have:

      ByteBuffer bb;

      For reading the first byte of this Buffer after filling I must code:

      ((ByteBuffer)bb.flip()).get();


      JUSTIFICATION :

        To avoid the cast to ByteBuffer, class Buffer must be generified.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      This should be valid:

      bb.flip().get();

      ACTUAL -
      Casting needed:

      ((ByteBuffer)bb.flip()).get();


      CUSTOMER SUBMITTED WORKAROUND :
      Casting

            Unassigned Unassigned
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: