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

2018-09-02 Thread Xueming Shen
+1 On 8/31/18, 5:17 PM, Ivan Gerasimov wrote: Hello! 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

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

2018-09-02 Thread Stuart Marks
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 the bug. s'marks On 9/2/18 11:14 AM, Xueming Shen wrote: +1 On 8/31/18, 5:17

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

2018-09-02 Thread Ivan Gerasimov
Thanks Sherman and Stuart for the review! On 9/2/18 2:45 PM, Stuart Marks wrote: 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