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

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

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: