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

Remove fork to xxcodeArrayLoop() and xxcodeBufferLoop() in sun.nio.cs coders

XMLWordPrintable

      A DESCRIPTION OF THE REQUEST :
      Use same code on heap buffers and direct buffers.

      JUSTIFICATION :
      Since access to heap buffers and direct buffers is now optimized via Unsafe [1], there is no more need to separately optimize the code.
      [1] https://bugs.openjdk.java.net/browse/JDK-8149469

      ACTUAL -
              protected CoderResult decodeLoop(ByteBuffer src,
                                               CharBuffer dst)
              {
                  if (src.hasArray() && dst.hasArray())
                      return decodeArrayLoop(src, dst);
                  else
                      return decodeBufferLoop(src, dst);
              }


            bpb Brian Burkhalter
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: