inefficient DatagramChannel buffer allocation

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 1.4.0
    • Affects Version/s: 1.4.0
    • Component/s: core-libs
    • None
    • beta3
    • generic
    • generic

      From skimming the source for sun.nio.ch.DatagramChannelImpl.
      it looks to me like 'buf' needs to be reassigned in getDirectBuffer()
      whenever it allocates a new buffer. Right now, it gets left as null
      and then is passed to receive() which then pointlessly allocates
      another buffer to actually receive the data.

      As far as I can see this is a performance issue but the
      code should behave correctly from a user perspective.

            Assignee:
            Michael Mccloskey (Inactive)
            Reporter:
            Jeffrey Nisewanger (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: