Re: RFR: 8199594: Add doc describing how (?x) ignores spaces in character classes [v2]

2021-04-20 Thread Stuart Marks
On Mon, 19 Apr 2021 22:12:30 GMT, Ian Graves wrote: >> Clarifying note on comments mode to explicitly note that whitespace within >> character classes is ignored. > > Ian Graves has updated the pull request incrementally with one additional > commit since the last revision: > > Adding differ

Re: RFR: 8262744: Formatter '%g' conversion uses wrong format for BigDecimal rounding up to limits [v3]

2021-04-20 Thread Stuart Marks
On Fri, 16 Apr 2021 16:08:53 GMT, Ian Graves wrote: >> This fixes a bug where the formatting code for `%g` flags incorrectly tries >> to round `BigDecimal` after determining whether it should be a decimal >> numeric format or a scientific numeric format. The solution rounds before >> determini

Re: RFR: 8265591: Remove vestiages of intermediate JSR 175 annotation format

2021-04-20 Thread Joe Darcy
On Tue, 20 Apr 2021 23:37:15 GMT, Joe Darcy wrote: > During the recent review of JDK-8228988, I noticed again the comments in the > annotation parser about support for the pre-GA annotation format used before > JDK 5.0 shipped. During the development of annotations, there was a late > change t

RFR: 8265591: Remove vestiages of intermediate JSR 175 annotation format

2021-04-20 Thread Joe Darcy
During the recent review of JDK-8228988, I noticed again the comments in the annotation parser about support for the pre-GA annotation format used before JDK 5.0 shipped. During the development of annotations, there was a late change to correct a flaw in the annotation encoding, JDK-5020908. I

Re: RFR: 8264208: Console charset API [v11]

2021-04-20 Thread Naoto Sato
> Please review the changes for the subject issue. This has been suggested in > a recent discussion thread for the JEP 400 > [[1](https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-March/075214.html)]. > A CSR has also been drafted, and comments are welcome > [[2](https://bugs.openjdk.

Integrated: 8228988: AnnotationParser throws NullPointerException on incompatible member type

2021-04-20 Thread Rafael Winterhalter
On Fri, 5 Feb 2021 21:24:34 GMT, Rafael Winterhalter wrote: > When a class is compiled against a version of an annotation that is later > loaded in an incompatible manner where an enum-typed member is changed into > an annotation or vice versa, the reflection API currently throws a > `NullPoi

Re: RFR: 8263668: Update java.time to use instanceof pattern variable [v6]

2021-04-20 Thread Naoto Sato
On Tue, 20 Apr 2021 17:46:38 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.time` >> package to make use of the `instanceof` pattern variable? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated the pull request i

Re: Image parsing spams stack traces to System.err

2021-04-20 Thread Brian Burkhalter
I think this post needs to go to 2d-dev (copied). > On Apr 20, 2021, at 9:58 AM, Lapo Luchini wrote: > > In both OpenJDK 8, 11 and 15 I verified that: > > sun/awt/image/InputStreamImageSource.java > > has "e.printStackTrace()" commands that might better be converted to > java.util.logging in

Re: RFR: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

2021-04-20 Thread Rafael Winterhalter
On Fri, 16 Apr 2021 20:30:15 GMT, Rafael Winterhalter wrote: >> To allow agents the definition of auxiliary classes, an API is needed to >> allow this. Currently, this is often achieved by using `sun.misc.Unsafe` or >> `jdk.internal.misc.Unsafe` ever since the `defineClass` method was removed

Re: RFR: 8228988: AnnotationParser throws NullPointerException on incompatible member type

2021-04-20 Thread Joe Darcy
On Fri, 5 Feb 2021 21:24:34 GMT, Rafael Winterhalter wrote: > When a class is compiled against a version of an annotation that is later > loaded in an incompatible manner where an enum-typed member is changed into > an annotation or vice versa, the reflection API currently throws a > `NullPoi

Re: RFR: 8263668: Update java.time to use instanceof pattern variable [v6]

2021-04-20 Thread Roger Riggs
On Tue, 20 Apr 2021 17:46:38 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review my code for updating the code in the `java.time` >> package to make use of the `instanceof` pattern variable? >> >> Kind regards, >> Patrick > > Patrick Concannon has updated the pull request i

Re: RFR: 8263668: Update java.time to use instanceof pattern variable [v6]

2021-04-20 Thread Patrick Concannon
On Wed, 24 Mar 2021 10:57:11 GMT, Rémi Forax wrote: >> Patrick Concannon has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Updated single letter pattern variable names > > src/java.base/share/classes/java/time/LocalDateTime.java line 1686

Re: RFR: 8263668: Update java.time to use instanceof pattern variable [v6]

2021-04-20 Thread Patrick Concannon
> Hi, > > Could someone please review my code for updating the code in the `java.time` > package to make use of the `instanceof` pattern variable? > > Kind regards, > Patrick Patrick Concannon has updated the pull request incrementally with one additional commit since the last revision: Upd

Re: RFR: 8263668: Update java.time to use instanceof pattern variable [v4]

2021-04-20 Thread Patrick Concannon
On Mon, 19 Apr 2021 15:37:24 GMT, Roger Riggs wrote: >> Patrick Concannon has updated the pull request with a new target base due to >> a merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains six additional >> comm

Re: RFR: 8265356: need code example for getting canonical constructor of a Record

2021-04-20 Thread Stuart Marks
On Sat, 17 Apr 2021 08:55:59 GMT, Tagir F. Valeev wrote: > I decided to show a complete static method in the example, so it could be > copied to user utility class as is. Not sure if it's reasonable to add > `assert cls.isRecord();` there. Also I don't know whether there's a > limitation on ma

Re: RFR: 8263668: Update java.time to use instanceof pattern variable [v5]

2021-04-20 Thread Patrick Concannon
On Wed, 24 Mar 2021 13:57:35 GMT, Roger Riggs wrote: > In addition to the other suggestions, java.time could use a round of cleanup > to use switch expressions. Hi Roger, I plan to introduce switch expressions in a follow up issue/PR. - PR: https://git.openjdk.java.net/jdk/pull/31

Image parsing spams stack traces to System.err

2021-04-20 Thread Lapo Luchini
In both OpenJDK 8, 11 and 15 I verified that: sun/awt/image/InputStreamImageSource.java has "e.printStackTrace()" commands that might better be converted to java.util.logging in order to be able to configure/redirect them to the proper log file each application might decide to use. A little

Integrated: 8265036: JFR: Remove use of -XX:StartFlightRecording= and -XX:FlightRecorderOptions=

2021-04-20 Thread Erik Gahlin
On Sun, 18 Apr 2021 15:17:35 GMT, Erik Gahlin wrote: > Hi, > > Could I have a review of fix that removes the use of "=" together with > -XX:StartFlightRecording and -XX:FlightRecorderOptions. It's been possible to > use "-XX:StartFlightRecording:" and "-XX:FlightRecorderOption:" since JFR was

Re: RFR: 8263668: Update java.time to use instanceof pattern variable [v5]

2021-04-20 Thread Patrick Concannon
> Hi, > > Could someone please review my code for updating the code in the `java.time` > package to make use of the `instanceof` pattern variable? > > Kind regards, > Patrick Patrick Concannon has updated the pull request with a new target base due to a merge or a rebase. The incremental webre

Re: RFR: 8265418: Clean-up redundant null-checks of Class.getPackageName()

2021-04-20 Thread Сергей Цыпанов
On Mon, 19 Apr 2021 15:03:44 GMT, Сергей Цыпанов wrote: >> src/java.base/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java >> line 458: >> >>> 456: private static boolean isSamePackage(Class class1, Class >>> class2) { >>> 457: return class1.getClass

Re: RFR: 8200559: Java agents doing instrumentation need a means to define auxiliary classes [v2]

2021-04-20 Thread Alan Bateman
On 19/04/2021 22:20, Rafael Winterhalter wrote: : At the moment, it is required for root to switch to the user that owns the JVM process as the domain socket is only accessible to that user to avoid that users without access to the JVM can inject themselves into a JVM. I am not sure if operations

Re: RFR: 8265036: JFR: Remove use of -XX:StartFlightRecording= and -XX:FlightRecorderOptions= [v2]

2021-04-20 Thread Erik Gahlin
On Mon, 19 Apr 2021 20:16:59 GMT, Chris Plummer wrote: > The changes look good. Have you considered doing a test run where the use of > `=` and `XX:+FlightRecorder` are disallowed just to make sure you caught them > all? It's a good idea, but it requires changes outside OpenJDK which I rather

Re: RFR: 8265036: JFR: Remove use of -XX:StartFlightRecording= and -XX:FlightRecorderOptions= [v2]

2021-04-20 Thread Erik Gahlin
> Hi, > > Could I have a review of fix that removes the use of "=" together with > -XX:StartFlightRecording and -XX:FlightRecorderOptions. It's been possible to > use "-XX:StartFlightRecording:" and "-XX:FlightRecorderOption:" since JFR was > introduced into OpenJDK (JDK 11), so this is not a c

Re: RFR: 8265237: String.join and StringJoiner can be improved further [v4]

2021-04-20 Thread Peter Levart
> While JDK-8148937 improved StringJoiner class by replacing internal use of > getChars that copies out characters from String elements into a char[] array > with StringBuilder which is somehow more optimal, the improvement was > marginal in speed (0% ... 10%) and mainly for smaller strings, whi