Re: RFR: 8250678: ModuleDescriptor.Version parsing treats empty segments inconsistently

2021-11-08 Thread Alan Bateman
On Fri, 24 Sep 2021 11:28:09 GMT, Masanori Yano wrote: > Could you please review the 8250678 bug fixes? > > The `parse` method of ModuleDescriptor.Version class behaves incorrectly when > the input string contains consecutive delimiters. > > The `parse` method treats strings as three sections,

Re: RFR: 8276141: XPathFactory set/getProperty method [v6]

2021-11-08 Thread Joe Wang
On Mon, 8 Nov 2021 11:38:52 GMT, Alan Bateman wrote: >> Joe Wang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Removing IAE from the method signature; Update impl and test. > > src/java.xml/share/classes/javax/xml/xpath/XPathFactory.ja

Re: RFR: 8276141: XPathFactory set/getProperty method [v7]

2021-11-08 Thread Joe Wang
> Add setProperty/getProperty methods to the XPath API so that properties can > be supported in the future. Joe Wang has updated the pull request incrementally with one additional commit since the last revision: javadoc clarification for setFeature and setProperty - Changes: -

Withdrawn: 8153133: Thread.dumpStack() can use StackWalker

2021-11-08 Thread Jaikiran Pai
On Mon, 8 Nov 2021 10:45:02 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which seeks to implement the > enhancement noted in https://bugs.openjdk.java.net/browse/JDK-8153133? > > The commit in this PR uses the `StackWalker` API to dump the stacktrace of > the thread. A f

Re: RFR: 8153133: Thread.dumpStack() can use StackWalker [v3]

2021-11-08 Thread Jaikiran Pai
On Mon, 8 Nov 2021 19:59:27 GMT, Mandy Chung wrote: > I think we should close this RFE as will not fix. Will do. Thank you Alan and Mandy for your time on reviewing this. - PR: https://git.openjdk.java.net/jdk/pull/6292

Re: RFR: 8153133: Thread.dumpStack() can use StackWalker [v3]

2021-11-08 Thread Jaikiran Pai
On Mon, 8 Nov 2021 19:49:06 GMT, Alan Bateman wrote: > I'm uncomfortable with this change, does the change have any benefit? To me, the initial appeal of this change was to use a more natural API instead of creating an `Exception` instance and printing the stacktrace from it. Performance wise,

Re: RFR: 8276700: Improve java.lang.ref.Cleaner javadocs

2021-11-08 Thread Brent Christian
On Mon, 8 Nov 2021 20:18:17 GMT, Roger Riggs wrote: >> You have a point. >> >> BUT, at least it's a working example and not some pseudo code. We do want to >> move to working example code long term, don't we? >> >> When I see , I'm just wondering what those <> type operators are >> good for h

Re: RFR: 8276700: Improve java.lang.ref.Cleaner javadocs

2021-11-08 Thread Brent Christian
On Mon, 8 Nov 2021 17:15:12 GMT, Mandy Chung wrote: >> I don't believe so. `no reference to the instance being cleaned` is the >> essential part (to me). > > This is what I suggested and makes it clear that *must hold no reference to > the instance being cleaned*. Maybe you didn't notice it's

Re: RFR: 8250678: ModuleDescriptor.Version parsing treats empty segments inconsistently

2021-11-08 Thread Mandy Chung
On Fri, 24 Sep 2021 11:28:09 GMT, Masanori Yano wrote: > Could you please review the 8250678 bug fixes? > > The `parse` method of ModuleDescriptor.Version class behaves incorrectly when > the input string contains consecutive delimiters. > > The `parse` method treats strings as three sections,

Re: RFR: 8276700: Improve java.lang.ref.Cleaner javadocs

2021-11-08 Thread Roger Riggs
On Mon, 8 Nov 2021 19:40:20 GMT, Hendrik Schreiber wrote: >> src/java.base/share/classes/java/lang/ref/Cleaner.java line 90: >> >>> 88: * public class CleaningExample implements AutoCloseable { >>> 89: *// A cleaner, preferably one shared within a library >>> 90: *private sta

Integrated: 8231490: Ugly racy writes to ZipUtils.defaultBuf

2021-11-08 Thread Eamonn McManus
On Wed, 3 Nov 2021 21:46:08 GMT, Eamonn McManus wrote: > This change applies the minimal fix suggested in > https://bugs.openjdk.java.net/browse/JDK-8231490. > The bug text suggests possibilities for reworking, but notes that > this change is enough to fix the data race. > Adding a regression tes

Re: RFR: 8153133: Thread.dumpStack() can use StackWalker [v3]

2021-11-08 Thread Mandy Chung
On Mon, 8 Nov 2021 16:05:12 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which seeks to implement the >> enhancement noted in https://bugs.openjdk.java.net/browse/JDK-8153133? >> >> The commit in this PR uses the `StackWalker` API to dump the stacktrace of >> the thread

Re: RFR: 8153133: Thread.dumpStack() can use StackWalker [v3]

2021-11-08 Thread Alan Bateman
On Mon, 8 Nov 2021 15:54:58 GMT, Jaikiran Pai wrote: >>> The recursive initialisation issue will require discussion to see if we can >>> avoid StackWalker.getInstance return null (which I assume is masking the >>> issue). >> >> For a better context, here's the stacktrace of such a call to >>

Re: RFR: 8276700: Improve java.lang.ref.Cleaner javadocs

2021-11-08 Thread Hendrik Schreiber
On Mon, 8 Nov 2021 18:31:11 GMT, Anthony Vanelverdinghe wrote: >> Trivial improvement. >> >> Explicitly show how to create a `Cleaner` instance using `Cleaner.create()`. >> Repeat (again) in the code example that the `State` `Runnable `should be >> implemented as static class and not reference

Re: RFR: 8231490: Ugly racy writes to ZipUtils.defaultBuf

2021-11-08 Thread Lance Andersen
On Wed, 3 Nov 2021 21:46:08 GMT, Eamonn McManus wrote: > This change applies the minimal fix suggested in > https://bugs.openjdk.java.net/browse/JDK-8231490. > The bug text suggests possibilities for reworking, but notes that > this change is enough to fix the data race. > Adding a regression tes

Re: RFR: 8276806: Use Objects.checkFromIndexSize where possible in java.base [v2]

2021-11-08 Thread Сергей Цыпанов
On Mon, 8 Nov 2021 14:52:59 GMT, Daniel Fuchs wrote: >> Сергей Цыпанов has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8276806: Use Objects.checkFromIndexSize where possible in java.base > > src/java.base/share/classes/java/io/ObjectInpu

Re: RFR: 8276806: Use Objects.checkFromIndexSize where possible in java.base [v2]

2021-11-08 Thread Сергей Цыпанов
> This is a follow-up for https://github.com/openjdk/jdk/pull/4507, looks like > there are some cases that were not covered. > > Also this is related to https://github.com/openjdk/jdk/pull/3615 Сергей Цыпанов has updated the pull request incrementally with one additional commit since the last r

Re: RFR: 8276700: Improve java.lang.ref.Cleaner javadocs

2021-11-08 Thread Anthony Vanelverdinghe
On Fri, 22 Oct 2021 08:03:34 GMT, Hendrik Schreiber wrote: > Trivial improvement. > > Explicitly show how to create a `Cleaner` instance using `Cleaner.create()`. > Repeat (again) in the code example that the `State` `Runnable `should be > implemented as static class and not reference the inst

Re: RFR: 8276700: Improve java.lang.ref.Cleaner javadocs

2021-11-08 Thread Mandy Chung
On Mon, 8 Nov 2021 13:27:17 GMT, Hendrik Schreiber wrote: >> src/java.base/share/classes/java/lang/ref/Cleaner.java line 93: >> >>> 91: * >>> 92: *// Static state class, capturing information necessary for >>> 93: *// cleanup, but no reference to the instance being cleaned >>

Re: RFR: 8274544: Langtools command's usage were garbled on Japanese Windows [v3]

2021-11-08 Thread Ichiroh Takiguchi
On Tue, 19 Oct 2021 01:26:35 GMT, Jonathan Gibbons wrote: >> Ichiroh Takiguchi has refreshed the contents of this pull request, and >> previous commits have been removed. The incremental views will show >> differences compared to the previous content of the PR. > > This is pretty ugly code to b

Integrated: 8276408: Deprecate Runtime.exec methods with a single string command line argument

2021-11-08 Thread Roger Riggs
On Wed, 3 Nov 2021 14:09:13 GMT, Roger Riggs wrote: > The three `java.lang.Runtime.exec` methods that tokenize a command line to > produce an array of string arguments are easily misused, sometimes with > erroneous results. For example, on some operating systems, spaces are > supported in file

Re: RFR: 8153133: Thread.dumpStack() can use StackWalker [v3]

2021-11-08 Thread Jaikiran Pai
> Can I please get a review of this change which seeks to implement the > enhancement noted in https://bugs.openjdk.java.net/browse/JDK-8153133? > > The commit in this PR uses the `StackWalker` API to dump the stacktrace of > the thread. A few things to note about this change: > > - Previously,

Re: RFR: 8153133: Thread.dumpStack() can use StackWalker [v2]

2021-11-08 Thread Jaikiran Pai
On Mon, 8 Nov 2021 15:46:22 GMT, Jaikiran Pai wrote: >> src/java.base/share/classes/java/lang/Thread.java line 1396: >> >>> 1394: // at this point in time. So we fallback to creating a >>> Exception instance >>> 1395: // and printing its stacktrace >>> 1396: new Exceptio

Re: RFR: 8153133: Thread.dumpStack() can use StackWalker [v2]

2021-11-08 Thread Jaikiran Pai
On Mon, 8 Nov 2021 15:53:54 GMT, Jaikiran Pai wrote: >>> printStackTrace interacts with locking of the streams to avoid garbled >>> output when many threads are printing to standard output output/error at >>> the same time. If we change dumpStack to use StackWalker then it will need >>> to do

Re: RFR: 8153133: Thread.dumpStack() can use StackWalker [v2]

2021-11-08 Thread Jaikiran Pai
On Mon, 8 Nov 2021 11:12:25 GMT, Alan Bateman wrote: > printStackTrace interacts with locking of the streams to avoid garbled output > when many threads are printing to standard output output/error at the same > time. If we change dumpStack to use StackWalker then it will need to do the > same

Re: RFR: 8153133: Thread.dumpStack() can use StackWalker [v2]

2021-11-08 Thread Jaikiran Pai
> Can I please get a review of this change which seeks to implement the > enhancement noted in https://bugs.openjdk.java.net/browse/JDK-8153133? > > The commit in this PR uses the `StackWalker` API to dump the stacktrace of > the thread. A few things to note about this change: > > - Previously,

Re: RFR: 8276806: Use Objects.checkFromIndexSize where possible in java.base

2021-11-08 Thread Daniel Fuchs
On Mon, 8 Nov 2021 14:25:10 GMT, Сергей Цыпанов wrote: > This is a follow-up for https://github.com/openjdk/jdk/pull/4507, looks like > there are some cases that were not covered. > > Also this is related to https://github.com/openjdk/jdk/pull/3615 src/java.base/share/classes/java/io/ObjectInp

RFR: 8276806: Use Objects.checkFromIndexSize where possible in java.base

2021-11-08 Thread Сергей Цыпанов
This is a follow-up for https://github.com/openjdk/jdk/pull/4507, looks like there are some cases that were not covered. Also this is related to https://github.com/openjdk/jdk/pull/3615 - Commit messages: - 8276806: Use Objects.checkFromIndexSize where possible in java.base Change

Re: RFR: 8276400: openjdk image Jars, Zips and Jmods built from the same source are not reproducible

2021-11-08 Thread Alan Bateman
On 05/11/2021 19:15, Andrew Leonard wrote: : @AlanBateman @magicus thank you both for your guidance. I have now split this bug into the 3 mentioned: - GenerateZip: https://bugs.openjdk.java.net/browse/JDK-8276743 - Jar/Jmod content ordering: https://bugs.openjdk.java.net/browse/JDK-8276764 -

Integrated: JDK-8276562: Fix to JDK-8263155 left out the help text changes

2021-11-08 Thread Andy Herrick
On Fri, 5 Nov 2021 17:21:01 GMT, Andy Herrick wrote: > JDK-8276562: Fix to JDK-8263155 left out the help text changes This pull request has now been integrated. Changeset: 71c4b195 Author:Andy Herrick URL: https://git.openjdk.java.net/jdk/commit/71c4b195178029f5414fa45d2c5ac70a1d253

Re: RFR: 8276700: Improve java.lang.ref.Cleaner javadocs

2021-11-08 Thread Mandy Chung
On Fri, 22 Oct 2021 08:03:34 GMT, Hendrik Schreiber wrote: > Trivial improvement. > > Explicitly show how to create a `Cleaner` instance using `Cleaner.create()`. > Repeat (again) in the code example that the `State` `Runnable `should be > implemented as static class and not reference the inst

Re: RFR: 8276700: Improve java.lang.ref.Cleaner javadocs

2021-11-08 Thread Hendrik Schreiber
On Fri, 5 Nov 2021 22:22:12 GMT, Mandy Chung wrote: >> Trivial improvement. >> >> Explicitly show how to create a `Cleaner` instance using `Cleaner.create()`. >> Repeat (again) in the code example that the `State` `Runnable `should be >> implemented as static class and not reference the instanc

Re: RFR: 8276700: Improve java.lang.ref.Cleaner javadocs

2021-11-08 Thread Hendrik Schreiber
On Fri, 5 Nov 2021 10:13:47 GMT, Aleksey Shipilev wrote: >> Trivial improvement. >> >> Explicitly show how to create a `Cleaner` instance using `Cleaner.create()`. >> Repeat (again) in the code example that the `State` `Runnable `should be >> implemented as static class and not reference the in

Re: RFR: 8276700: Improve java.lang.ref.Cleaner javadocs

2021-11-08 Thread Aleksey Shipilev
On Fri, 22 Oct 2021 08:03:34 GMT, Hendrik Schreiber wrote: > Trivial improvement. > > Explicitly show how to create a `Cleaner` instance using `Cleaner.create()`. > Repeat (again) in the code example that the `State` `Runnable `should be > implemented as static class and not reference the inst

RFR: 8276700: Improve java.lang.ref.Cleaner javadocs

2021-11-08 Thread Hendrik Schreiber
Trivial improvement. Explicitly show how to create a `Cleaner` instance using `Cleaner.create()`. Repeat (again) in the code example that the `State` `Runnable `should be implemented as static class and not reference the instance to be cleaned, to make the point even more clear to those people w

Integrated: JDK-8274686 : java.util.UUID#hashCode() should use Long.hashCode()

2021-11-08 Thread PROgrm_JARvis
On Mon, 4 Oct 2021 21:13:02 GMT, PROgrm_JARvis wrote: > This is trivial fix of > [JDK-8274686](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=JDK-8274686) > which replaces manually-computed `int`-based `long` hash-code. > > Because `Long#hashCode(long)` uses other hashing function than t

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-08 Thread Ichiroh Takiguchi
On Mon, 8 Nov 2021 09:44:34 GMT, Alan Bateman wrote: >> If this issue is not a part of JEP-400, I think UTF_8 may not be only >> solution for sun/nio/fs/Util.java. >> Please explain why UTF_8 is better than ISO_8859_1. > >> If this issue is not a part of JEP-400, I think UTF_8 may not be only >

Re: RFR: 8276141: XPathFactory set/getProperty method [v6]

2021-11-08 Thread Alan Bateman
On Fri, 5 Nov 2021 21:44:17 GMT, Joe Wang wrote: >> Add setProperty/getProperty methods to the XPath API so that properties can >> be supported in the future. > > Joe Wang has updated the pull request incrementally with one additional > commit since the last revision: > > Removing IAE from t

Re: RFR: 8153133: Thread.dumpStack() can use StackWalker

2021-11-08 Thread Alan Bateman
On Mon, 8 Nov 2021 10:45:02 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which seeks to implement the > enhancement noted in https://bugs.openjdk.java.net/browse/JDK-8153133? > > The commit in this PR uses the `StackWalker` API to dump the stacktrace of > the thread. A f

RFR: 8153133: Thread.dumpStack() can use StackWalker

2021-11-08 Thread Jaikiran Pai
Can I please get a review of this change which seeks to implement the enhancement noted in https://bugs.openjdk.java.net/browse/JDK-8153133? The commit in this PR uses the `StackWalker` API to dump the stacktrace of the thread. A few things to note about this change: - Previously, the dumped st

Re: RFR: 8250678: ModuleDescriptor.Version parsing treats empty segments inconsistently

2021-11-08 Thread Alan Bateman
On Fri, 5 Nov 2021 16:51:02 GMT, Mandy Chung wrote: > I would suggest to create a separate issue to follow up the spec > clarification and keep this PR to fix the implementation. > > The version parsing code is tricky. The fix is straight-forward, just moving > the check of the delimiters as t

Integrated: JDK-8276239: Better tables in java.util.random package summary

2021-11-08 Thread Ludvig Janiuk
On Mon, 1 Nov 2021 17:10:56 GMT, Ludvig Janiuk wrote: > The tables are now striped, and they use row headers (which is a nice-to-have > for accessibility). This pull request has now been integrated. Changeset: d8b0dee6 Author:Ludvig Janiuk Committer: Claes Redestad URL: https://gi

Re: RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales

2021-11-08 Thread Alan Bateman
On Sun, 7 Nov 2021 13:03:10 GMT, Ichiroh Takiguchi wrote: > If this issue is not a part of JEP-400, I think UTF_8 may not be only > solution for sun/nio/fs/Util.java. > Please explain why UTF_8 is better than ISO_8859_1. Just to add to Naoto's comment. When the JDK starts in unusual/unsupporte

Re: RFR: JDK-8276239: Better tables in java.util.random package summary

2021-11-08 Thread Ludvig Janiuk
On Mon, 1 Nov 2021 17:17:18 GMT, Jim Laskey wrote: >> The tables are now striped, and they use row headers (which is a >> nice-to-have for accessibility). > > Marked as reviewed by jlaskey (Reviewer). @JimLaskey Could I ask you to sponsor? - PR: https://git.openjdk.java.net/jdk/pu

Integrated: 8273235: tools/launcher/HelpFlagsTest.java Fails on Windows 32bit

2021-11-08 Thread Christian Stein
On Thu, 4 Nov 2021 13:10:37 GMT, Christian Stein wrote: > This PR implements the fix as suggested by Adam Farley, which reads: > >> Note: Looks to be as simple as adding `jaccessinspector-32` and >> `jaccesswalker-32` to `TOOLS_NOT_TO_TEST` at the top of >> `HelpFlagsTest.java`, as the non-32b