RFR 8210285 : CharsetDecoder/Encoder's constructor does not reject NaN

Ivan Gerasimov ivan.gerasimov at oracle.com
Sat Sep 1 00:17:33 UTC 2018


The javadoc for CharsetDecoder [1] states that an exception is thrown 
when a non-positive number is passed in as an argument.

However we only reject negative or zero numbers, but not NaN.

And likewise for CharsetEncoder.

Would you please help review a trivial fix?

BUGURL: https://bugs.openjdk.java.net/browse/JDK-8210285
WEBREV: http://cr.openjdk.java.net/~igerasim/8210285/00/webrev/

Thanks in advance!


With kind regards,
Ivan Gerasimov

More information about the core-libs-dev mailing list