Re: RFR 8080225: FileInputStream cleanup should be improved

2017-10-14 Thread Roger Riggs
Hi Peter, On 10/14/2017 5:00 AM, Peter Levart wrote: On 10/14/17 10:51, Peter Levart wrote: Hi Roger, I know I'm late for the comments on this one, but anyway... I'm looking at JNI part of FileDescriptor. There are now two native "close" methods for each FileDescriptor variant

Re: RFR 8080225: FileInputStream cleanup should be improved

2017-10-14 Thread Peter Levart
On 10/14/17 10:51, Peter Levart wrote: Hi Roger, I know I'm late for the comments on this one, but anyway... I'm looking at JNI part of FileDescriptor. There are now two native "close" methods for each FileDescriptor variant (unix/windows). One is instance method (close0) and the other is

Re: RFR 8080225: FileInputStream cleanup should be improved

2017-10-14 Thread Peter Levart
Hi Roger, I know I'm late for the comments on this one, but anyway... I'm looking at JNI part of FileDescriptor. There are now two native "close" methods for each FileDescriptor variant (unix/windows). One is instance method (close0) and the other is static (cleanupClose0), which takes an

Re: RFR 8080225: FileInputStream cleanup should be improved

2017-10-12 Thread Roger Riggs
Hi Mandy, True in advertising, the FileDescriptor.close() method should be declared to throw IOException. Cleanup via the Cleaner.clean() method can't throw a checked exception but the IOException can be wrapped with UncheckedIOException that can be caught by Cleaner.clean() callers. They

Re: RFR 8080225: FileInputStream cleanup should be improved

2017-10-12 Thread mandy chung
On 10/4/17 7:35 AM, Roger Riggs wrote: Updated the webrev in place: http://cr.openjdk.java.net/~rriggs/webrev-fis-cleanup-8080225/ Looks good.  One minor comment: 251 private static native void cleanupClose0(int fd); 75 Java_java_io_FileDescriptor_cleanupClose0(JNIEnv *env, jclass

Re: RFR 8080225: FileInputStream cleanup should be improved

2017-10-12 Thread Roger Riggs
Hi Alan, On 10/12/2017 8:35 AM, Alan Bateman wrote: On 04/10/2017 15:35, Roger Riggs wrote: Hi Mandy, Updated the webrev in place: http://cr.openjdk.java.net/~rriggs/webrev-fis-cleanup-8080225/ I skimmed the latest webrev. The @apiNote in FIS is copied from FOS so it needs

Re: RFR 8080225: FileInputStream cleanup should be improved

2017-10-12 Thread Alan Bateman
On 04/10/2017 15:35, Roger Riggs wrote: Hi Mandy, Updated the webrev in place:    http://cr.openjdk.java.net/~rriggs/webrev-fis-cleanup-8080225/ I skimmed the latest webrev. The @apiNote in FIS is copied from FOS so it needs s/FileOutputStream/FileInputStream/. I assume in FIS that we

Re: RFR 8080225: FileInputStream cleanup should be improved

2017-10-04 Thread Roger Riggs
Hi Mandy, Updated the webrev in place:    http://cr.openjdk.java.net/~rriggs/webrev-fis-cleanup-8080225/ On 10/3/2017 7:17 PM, mandy chung wrote: Hi Roger, This looks good overall. 53 * unreachable should explicitly override {@link #finalize} and call {@code close}. Since finalize is

Re: RFR 8080225: FileInputStream cleanup should be improved

2017-10-03 Thread mandy chung
Hi Roger, This looks good overall. 53 * unreachable should explicitly override {@link #finalize} and call {@code close}. Since finalize is deprecated, I would not recommend to have the subclass adding the finalize method.  I suggest to take that phrase out (I gave a similar comment to

Re: RFR 8080225: FileInputStream cleanup should be improved

2017-09-30 Thread Roger Riggs
ubject:* RFR 8080225: FileInputStream cleanup should be improved Replacing finalizers in FileInputStream, FileOutputStream, and adding cleanup to RandomAccessFile and NIO File Channels with Cleaner based implementations required changes to FileDescriptor. The specification of FileInputStream and File

Re: RFR 8080225: FileInputStream cleanup should be improved

2017-09-29 Thread Bernd Eckenfels
From: core-libs-dev <core-libs-dev-boun...@openjdk.java.net> on behalf of Roger Riggs <roger.ri...@oracle.com> Sent: Friday, September 29, 2017 7:17:34 PM To: Core-Libs-Dev Subject: RFR 8080225: FileInputStream cleanup should be improved Replacing finalizers in Fil

Re: RFR 8080225: FileInputStream cleanup should be improved

2017-09-29 Thread Brian Burkhalter
Hi Roger, Looks good overall; total nitpicks here: FileInputStream (similar story in FileOutputStream) 48-49: “explicitly" is used twice 53: could probably drop “explicitly” here altogether. The “Shd” in a couple of test names is kind of annoying; perhaps s/Shd/Should/ ? Copyright dates are

RFR 8080225: FileInputStream cleanup should be improved

2017-09-29 Thread Roger Riggs
Replacing finalizers in FileInputStream, FileOutputStream, and adding cleanup to RandomAccessFile and NIO File Channels with Cleaner based implementations required changes to FileDescriptor. The specification of FileInputStream and FileOutputStream is changed to remove the finalizer behavior