RFR 8023173: FileDescriptor should respect append flag

Ivan Gerasimov ivan.gerasimov at oracle.com
Mon Oct 27 08:53:49 UTC 2014


Thanks Alan!

I'll remove redundant initialization and final word before pushing.

Sincerely yours,
Ivan


On 27.10.2014 11:50, Alan Bateman wrote:
> On 25/10/2014 19:14, Ivan Gerasimov wrote:
>> Hello everyone!
>>
>> I've changed the fix in order to address the concerns Alan had 
>> mentioned.
>>
>> Now, both the Unix and Windows implementations of FileDescriptor 
>> class have the append flag.
>> First, it allows such querying the file descriptor in 
>> FileChannelImpl.position() that does not involve JNI calls.
>> Second, this flag is passed to the write functions as an argument, so 
>> there's no need to retrieve it from the native code.
>>
>> The fix was built on all available platforms.
>> All the tests from io, nio pass.
>>
>> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8023173
>> WEBREV: http://cr.openjdk.java.net/~igerasim/8023173/3/webrev/
>>
>> Would you please help review this?
>
> Thanks, this looks much better and cleaner than the previous iterations.
>
> You can probably drop the setting of append in the no-arg 
> FileDescriptor constructor. Also the "final" in 
> FileChannelImpl.position isn't needed.
>
> Otherwise this looks good to me and good to have this long standing 
> corner case addressed.
>
> -Alan
>
>
>
>



More information about the nio-dev mailing list