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

CharsetDecoder/Encoder's constructor does not reject NaN

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P5
    • Resolution: Fixed
    • Affects Version/s: 12
    • Fix Version/s: 12
    • Component/s: core-libs
    • Labels:

      Description

      The javadoc states that for non-positive arguments averageCharsPerByte or maxCharsPerByte the exception is thrown.

      https://docs.oracle.com/javase/10/docs/api/java/nio/charset/CharsetDecoder.html#%3Cinit%3E(java.nio.charset.Charset,float,float)

      However, it doesn't happen when NaN is passed in.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                igerasim Ivan Gerasimov
                Reporter:
                igerasim Ivan Gerasimov
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: