RFR [8054029] (fc) FileChannel.size() returns 0 for block devices

Ivan Gerasimov ivan.gerasimov at oracle.com
Sat Sep 13 17:24:52 UTC 2014


Thank you Alan for review and suggestions!

On 13.09.2014 17:54, Alan Bateman wrote:
> On 12/09/2014 16:10, Ivan Gerasimov wrote:
>>
>> As you suggested, I updated the test: it's now skipped unless 
>> /dev/sda1 is found and readable.
>>
>> Here's the new webrev:
>> http://cr.openjdk.java.net/~igerasim/8054029/1/webrev/
> This looks okay to me.
>
> A minor comment is that it's more usual to use "private static final 
> ..." (the ordering of modifiers doesn't matter of course). I think I 
> would probably using one static like this:
>
>    private static final BLK_FILE = Paths.get("/dev/sda1");
>
Yes, I changed the code to using this shortcut before pushing.

> rather than two but it's not important.

I kept the string constant too because it's used in a few more places.

Sincerely yours,
Ivan

> -Alan
>
>



More information about the nio-dev mailing list