Re: [cp-patches] FYI Only truncate a file on append and write-only (from FileOutputStream)

2007-05-31 Thread Casey Marshall
On May 30, 2007, at 4:21 AM, Steve Blackburn wrote: Is there any particular reason for having native implementations of open() in both gnu_java_nio_VMChannel.c and gnu_java_nio_FileChannelImpl.c? Aside from the bug in VMChannel, this duplication of open seemed to be the cause of the proble

Re: [cp-patches] FYI Only truncate a file on append and write-only (from FileOutputStream)

2007-05-30 Thread Steve Blackburn
Is there any particular reason for having native implementations of open() in both gnu_java_nio_VMChannel.c and gnu_java_nio_FileChannelImpl.c? Aside from the bug in VMChannel, this duplication of open seemed to be the cause of the problem I saw. Refactoring of FileChannelImpl.java lead to

Re: [cp-patches] FYI Only truncate a file on append and write-only (from FileOutputStream)

2007-05-30 Thread Andrew Haley
You know, the real cause of this bug was the obfuscated use of conditional expressions. This code does, I think, the same things, but it's hard to be sure. Andrew. Index: gnu_java_nio_VMChannel.c === RCS file: /cvsroot/classpath/c

Re: [cp-patches] FYI Only truncate a file on append and write-only (from FileOutputStream)

2007-05-30 Thread Andrew Haley
Mark Wielaard writes: > Hi, > > This fixes a bug reported by Steve Blackburn. Mauve tests have been > added. > > 2007-05-30 Mark Wielaard <[EMAIL PROTECTED]> > > Fixes bug #32030 reported by [EMAIL PROTECTED] > * native/jni/java-nio/gnu_java_nio_VMChannel.c > (Java_gnu_ja

[cp-patches] FYI Only truncate a file on append and write-only (from FileOutputStream)

2007-05-30 Thread Mark Wielaard
Hi, This fixes a bug reported by Steve Blackburn. Mauve tests have been added. 2007-05-30 Mark Wielaard <[EMAIL PROTECTED]> Fixes bug #32030 reported by [EMAIL PROTECTED] * native/jni/java-nio/gnu_java_nio_VMChannel.c (Java_gnu_java_nio_VMChannel_open): Only set O_TRUNC on CPNIO_AP