Re: RFR: 8274809: Update java.base classes to use try-with-resources [v4]

2021-12-23 Thread Andrey Turbanov
On Fri, 10 Dec 2021 18:18:02 GMT, Andrey Turbanov wrote: >> This is legacy code with probably poor testing coverage. Usually we don't >> print anything on the console directly and unconditionally - except in some >> well identified cases. Ignoring exceptions thrown by `close` is a common >> id

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v4]

2021-12-10 Thread Andrey Turbanov
On Thu, 9 Dec 2021 01:25:20 GMT, Bradford Wetmore wrote: >> That's one of the places where I personally would always use the var keyword >> too: it makes the line shorter and the type is already clearly visible in >> the RHS of the assignment, so repeating it on the left hand side does not >>

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v4]

2021-12-10 Thread Andrey Turbanov
On Tue, 7 Dec 2021 14:48:17 GMT, Daniel Fuchs wrote: >Remind me to sponsor this after the fork. fork is done :) - PR: https://git.openjdk.java.net/jdk/pull/5818

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v4]

2021-12-10 Thread Andrey Turbanov
On Tue, 7 Dec 2021 07:59:54 GMT, Alan Bateman wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8274809: Update java.base classes to use try-with-resources >> fix review comments > > src/java.base/share/classes/

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v5]

2021-12-10 Thread Andrey Turbanov
> 8274809: Update java.base classes to use try-with-resources Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8274809: Update java.base classes to use try-with-resources move { to previous line - Changes: - all: h

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v4]

2021-12-07 Thread Daniel Fuchs
On Tue, 7 Dec 2021 14:24:41 GMT, Andrey Turbanov wrote: >> src/java.base/share/classes/sun/net/www/MimeTable.java line 385: >> >>> 383: >>> 384: protected boolean saveAsProperties(File file) { >>> 385: try (FileOutputStream os = new FileOutputStream(file)) { >> >> This is not stric

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v4]

2021-12-07 Thread Daniel Fuchs
On Wed, 6 Oct 2021 20:37:29 GMT, Andrey Turbanov wrote: >> 8274809: Update java.base classes to use try-with-resources > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8274809: Update java.base classes to use try-with-res

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v4]

2021-12-07 Thread Andrey Turbanov
On Tue, 7 Dec 2021 11:41:12 GMT, Daniel Fuchs wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8274809: Update java.base classes to use try-with-resources >> fix review comments > > src/java.base/share/classes/

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v4]

2021-12-07 Thread Daniel Fuchs
On Wed, 6 Oct 2021 20:37:29 GMT, Andrey Turbanov wrote: >> 8274809: Update java.base classes to use try-with-resources > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8274809: Update java.base classes to use try-with-res

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v4]

2021-12-07 Thread Alan Bateman
On Wed, 6 Oct 2021 20:37:29 GMT, Andrey Turbanov wrote: >> 8274809: Update java.base classes to use try-with-resources > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8274809: Update java.base classes to use try-with-res

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v4]

2021-10-06 Thread Andrey Turbanov
On Wed, 6 Oct 2021 16:00:26 GMT, Bradford Wetmore wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8274809: Update java.base classes to use try-with-resources >> fix review comments > > src/java.base/share/clas

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v4]

2021-10-06 Thread Andrey Turbanov
> 8274809: Update java.base classes to use try-with-resources Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8274809: Update java.base classes to use try-with-resources fix review comments - Changes: - all: https

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v3]

2021-10-06 Thread Bradford Wetmore
On Wed, 6 Oct 2021 18:47:26 GMT, Andrey Turbanov wrote: >> 8274809: Update java.base classes to use try-with-resources > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8274809: Update java.base classes to use try-with-re

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v3]

2021-10-06 Thread Bradford Wetmore
On Wed, 6 Oct 2021 18:47:26 GMT, Andrey Turbanov wrote: >> 8274809: Update java.base classes to use try-with-resources > > Andrey Turbanov has updated the pull request incrementally with one > additional commit since the last revision: > > 8274809: Update java.base classes to use try-with-re

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v3]

2021-10-06 Thread Bradford Wetmore
On Wed, 6 Oct 2021 16:07:12 GMT, Bradford Wetmore wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8274809: Update java.base classes to use try-with-resources >> update copyright year > > src/java.base/share/cl

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v3]

2021-10-06 Thread Andrey Turbanov
> 8274809: Update java.base classes to use try-with-resources Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8274809: Update java.base classes to use try-with-resources update copyright year - Changes: - all: htt

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v3]

2021-10-06 Thread Andrey Turbanov
On Wed, 6 Oct 2021 16:11:25 GMT, Bradford Wetmore wrote: >Files like HttpTimestamper need the copyright dates updated to 2021. Updated - PR: https://git.openjdk.java.net/jdk/pull/5818

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v2]

2021-10-06 Thread Andrey Turbanov
On Wed, 6 Oct 2021 16:20:48 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/sun/security/timestamp/HttpTimestamper.java line >> 127: >> >>> 125: // Receive the reply >>> 126: byte[] replyBuffer = null; >>> 127: try (BufferedInputStream input = new >>> BufferedInp

Re: RFR: 8274809: Update java.base classes to use try-with-resources [v2]

2021-10-06 Thread Andrey Turbanov
> 8274809: Update java.base classes to use try-with-resources Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8274809: Update java.base classes to use try-with-resources fix post-review comment - Changes: - all: h

Re: RFR: 8274809: Update java.base classes to use try-with-resources

2021-10-06 Thread Andrey Turbanov
On Wed, 6 Oct 2021 16:24:03 GMT, Andrey Turbanov wrote: >> src/java.base/share/classes/sun/net/NetProperties.java line 71: >> >>> 69: f = new File(f, "net.properties"); >>> 70: fname = f.getCanonicalPath(); >>> 71: try (FileInputStream fis = new FileInputStre

Re: RFR: 8274809: Update java.base classes to use try-with-resources

2021-10-06 Thread Pavel Rappo
On Wed, 6 Oct 2021 16:00:41 GMT, Bradford Wetmore wrote: >> 8274809: Update java.base classes to use try-with-resources > > src/java.base/share/classes/sun/security/timestamp/HttpTimestamper.java line > 127: > >> 125: // Receive the reply >> 126: byte[] replyBuffer = null; >> 12

Re: RFR: 8274809: Update java.base classes to use try-with-resources

2021-10-06 Thread Andrey Turbanov
On Wed, 6 Oct 2021 16:04:54 GMT, Bradford Wetmore wrote: >> 8274809: Update java.base classes to use try-with-resources > > src/java.base/share/classes/sun/net/NetProperties.java line 71: > >> 69: f = new File(f, "net.properties"); >> 70: fname = f.getCanonicalPath(); >>

Re: RFR: 8274809: Update java.base classes to use try-with-resources

2021-10-06 Thread Bradford Wetmore
On Tue, 5 Oct 2021 09:36:23 GMT, Andrey Turbanov wrote: > 8274809: Update java.base classes to use try-with-resources I checked the rest. The one BufferedInputStream change is puzzling. Please explain or address. Files like HttpTimestamper need the copyright dates updated to 2021. src/java

Re: RFR: 8274809: Update java.base classes to use try-with-resources

2021-10-06 Thread Bradford Wetmore
On Tue, 5 Oct 2021 09:36:23 GMT, Andrey Turbanov wrote: > 8274809: Update java.base classes to use try-with-resources Reviewed the crypto/security files. src/java.base/share/classes/sun/security/timestamp/HttpTimestamper.java line 115: > 113: > 114: // Send the request > 115:

Re: RFR: 8274809: Update java.base classes to use try-with-resources

2021-10-06 Thread Sean Mullan
On Tue, 5 Oct 2021 09:36:23 GMT, Andrey Turbanov wrote: > 8274809: Update java.base classes to use try-with-resources The security related files look fine. - Marked as reviewed by mullan (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/5818