RFR 8210285 : CharsetDecoder/Encoder's constructor does not reject NaN
stuart.marks at oracle.com
Sun Sep 2 21:45:07 UTC 2018
Yes, the fix itself looks fine. Quite subtle, good catch.
But should this have a regression test? I can imagine somebody coming along
later and "simplifying" (!(... > ...)) to (... <= ...) which would reintroduce
On 9/2/18 11:14 AM, Xueming Shen wrote:
> On 8/31/18, 5:17 PM, Ivan Gerasimov wrote:
>> The javadoc for CharsetDecoder  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!
More information about the core-libs-dev