RFR 8023173: FileDescriptor should respect append flag
Alan.Bateman at oracle.com
Mon Oct 27 07:50:51 UTC 2014
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.
More information about the core-libs-dev