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

CharsetDecoder/Encoder's constructor does not reject NaN

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P5
    • Resolution: Fixed
    • 12
    • 12
    • core-libs

    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

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

              Dates

                Created:
                Updated:
                Resolved: