RFR [8042470]: (fs) Path.register doesn't throw IllegalArgumentException if multiple OVERFLOW events are specified

Chris Hegarty chris.hegarty at oracle.com
Wed May 7 11:28:42 UTC 2014



On 07/05/14 12:16, Alan Bateman wrote:
> On 07/05/2014 11:51, Ivan Gerasimov wrote:
>> Hello!
>>
>> Browsing the code, I spotted a small glitch in the way Path.register
>> processes its argument list.
>>  - it ignores OVERFLOW, if any were given.
>>  - it throws IAE, if no events were specified (excluding the ignored
>> OVERFLOW).
>>
>> This way of processing would break, if OVERFLOW were the only kind of
>> event given, but were specified more than once.
>>
>> Would you please help review the fix for this?
>>
>> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8042470
>> WEBREV: http://cr.openjdk.java.net/~igerasim/8042470/0/webrev/
>>
>> Some minor code cleanup was also included in the change.
>> In particular, the following line was added (seemed to be missing for
>> some reason):
>> 322                 throw new RuntimeException("UnsupportedOperationException not thrown");
>>
> This looks good. Thanks for adding the missing throw of UOE, that was
> cleared missed in the original test.

The change looks good to me too.

-Chris.

>
> -Alan.


More information about the nio-dev mailing list