RFR [8042470]: (fs) Path.register doesn't throw IllegalArgumentException if multiple OVERFLOW events are specified
Alan Bateman
Alan.Bateman at oracle.com
Wed May 7 11:16:40 UTC 2014
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.
-Alan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20140507/9e2ec30c/attachment-0001.html>
More information about the nio-dev
mailing list