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

(bf) Heap buffer state changes could provoke unexpected exceptions

    XMLWordPrintable

Details

    • b12
    • generic
    • generic
    • Not verified

    Backports

      Description

        Buffers have mutable state including the mark, position, and limit. This means that successive invocations of position(), limit(), or remaining() could return different results if the position or limit has changed between calls. This could result for example in an IllegalArgumentException or an IndexOutOfBoundsException. The heap buffer methods should be hardened to make these outcomes less likely. This suggestion was made here: http://mail.openjdk.java.net/pipermail/nio-dev/2019-February/005900.html.

        Attachments

          Issue Links

            Activity

              People

                bpb Brian Burkhalter
                bpb Brian Burkhalter
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: