Re: RFR: 8308753: Class-File API transition to Preview [v2]

2023-09-29 Thread Vicente Romero
On Tue, 26 Sep 2023 12:32:37 GMT, Adam Sotona wrote: >> Classfile API is an internal library under package `jdk.internal.classfile`  >> in JDK 21. >> This pull request turns the Classfile API into a preview feature and moves >> it into `java.lang.classfile`. >> It repackages all uses across JDK

Re: RFR: 8317141: Remove unused validIndex method from URLClassPath$JarLoader

2023-09-29 Thread Jaikiran Pai
On Fri, 29 Sep 2023 05:41:11 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which removes unused (internal) > method from the `private` `URLClassPath$JarLoader`? > > The `validIndex` method which is being removed here was being used when JAR > index was supported. We remo

Integrated: 8317141: Remove unused validIndex method from URLClassPath$JarLoader

2023-09-29 Thread Jaikiran Pai
On Fri, 29 Sep 2023 05:41:11 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which removes unused (internal) > method from the `private` `URLClassPath$JarLoader`? > > The `validIndex` method which is being removed here was being used when JAR > index was supported. We remo

Re: RFR: JDK-8316696: Remove the testing base classes: IntlTest and CollatorTest [v5]

2023-09-29 Thread Naoto Sato
On Fri, 29 Sep 2023 23:24:13 GMT, Justin Lu wrote: >> Please review this PR which removes the i18n related testing base classes >> `IntlTest` and `CollatorTest` and converts all the tests that use them, >> >> IntlTest and CollatorTest are testing classes which are extended by tests in >> `text

Re: RFR: 8308753: Class-File API transition to Preview [v2]

2023-09-29 Thread Vicente Romero
On Tue, 26 Sep 2023 12:32:37 GMT, Adam Sotona wrote: >> Classfile API is an internal library under package `jdk.internal.classfile`  >> in JDK 21. >> This pull request turns the Classfile API into a preview feature and moves >> it into `java.lang.classfile`. >> It repackages all uses across JDK

Re: RFR: JDK-8316696: Remove the testing base classes: IntlTest and CollatorTest [v5]

2023-09-29 Thread Justin Lu
> Please review this PR which removes the i18n related testing base classes > `IntlTest` and `CollatorTest` and converts all the tests that use them, > > IntlTest and CollatorTest are testing classes which are extended by tests in > `text/`, `util/Locale`, `util/TimeZone`, and `util/Calendar`. T

Re: RFR: JDK-8316696: Remove the testing base classes: IntlTest and CollatorTest [v4]

2023-09-29 Thread Justin Lu
On Fri, 29 Sep 2023 22:00:23 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request with a new target base due to a merge >> or a rebase. The pull request now contains seven commits: >> >> - merge master and resolve conflicts >> - implement feedback >> - cleanup util classes in tex

Re: RFR: 8316150: Refactor get chars and string size [v22]

2023-09-29 Thread 温绍锦
> 1. Reduce duplicate stringSize code > 2. Move java.lang.StringLatin1.getChars to > jdk.internal.util.DecimalDigits::getCharLatin1,not only java.lang, other > packages also need to use this method 温绍锦 has updated the pull request incrementally with one additional commit since the last revision

Re: RFR: JDK-8316696: Remove the testing base classes: IntlTest and CollatorTest [v4]

2023-09-29 Thread Naoto Sato
On Fri, 29 Sep 2023 21:22:01 GMT, Justin Lu wrote: >> Please review this PR which removes the i18n related testing base classes >> `IntlTest` and `CollatorTest` and converts all the tests that use them, >> >> IntlTest and CollatorTest are testing classes which are extended by tests in >> `text

Re: RFR: JDK-8316696: Remove the testing base classes: IntlTest and CollatorTest [v3]

2023-09-29 Thread Justin Lu
On Fri, 29 Sep 2023 17:30:42 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> cleanup util classes in text/testlib > > test/jdk/java/text/BreakIterator/BreakIteratorTest.java line 112: > >> 110:

Re: RFR: JDK-8316696: Remove the testing base classes: IntlTest and CollatorTest [v4]

2023-09-29 Thread Justin Lu
> Please review this PR which removes the i18n related testing base classes > `IntlTest` and `CollatorTest` and converts all the tests that use them, > > IntlTest and CollatorTest are testing classes which are extended by tests in > `text/`, `util/Locale`, `util/TimeZone`, and `util/Calendar`. T

RFR: JDK-8315064: j.text.ChoiceFormat provides no specification on quoting behavior

2023-09-29 Thread Justin Lu
Please review this PR and which adjusts the pattern section of java.text.ChoiceFormat to specify the single quote behavior within a String pattern. The other Format classes that take a String pattern such as DecimalFormat, CompactNumberFormat, and MessageFormat all provide specification on sing

Re: RFR: 8316426: Optimization for HexFormat.formatHex [v9]

2023-09-29 Thread 温绍锦
> In the improvement of @cl4es PR #15591, the advantages of non-lookup-table > were discussed. > > But if the input is byte[], using lookup table can improve performance. > > For HexFormat#formatHex(Appendable, byte[]) and HexFormat#formatHex(byte[]), > If the length of byte[] is larger, the pe

Re: RFR: 8316662: Remove one allocation per conversion in Double.toString(double) and Float.toString(float) [v2]

2023-09-29 Thread Raffaello Giulietti
On Fri, 29 Sep 2023 18:56:26 GMT, 温绍锦 wrote: >> Raffaello Giulietti has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Uppercase JLA. > > src/java.base/share/classes/jdk/internal/math/DoubleToDecimal.java line 110: > >> 108: private st

Re: RFR: 8316662: Remove one allocation per conversion in Double.toString(double) and Float.toString(float) [v2]

2023-09-29 Thread 温绍锦
On Fri, 22 Sep 2023 17:39:53 GMT, Raffaello Giulietti wrote: >> By correctly sizing an intermediate `byte[]` and making use of the internal >> `newStringNoRepl()` method, one allocation per conversion can be avoided >> when the runtime uses compact strings. > > Raffaello Giulietti has updated

Re: RFR: 8316662: Remove one allocation per conversion in Double.toString(double) and Float.toString(float) [v2]

2023-09-29 Thread 温绍锦
On Fri, 22 Sep 2023 17:39:53 GMT, Raffaello Giulietti wrote: >> By correctly sizing an intermediate `byte[]` and making use of the internal >> `newStringNoRepl()` method, one allocation per conversion can be avoided >> when the runtime uses compact strings. > > Raffaello Giulietti has updated

Re: RFR: 5066247: Refine the spec of equals() and hashCode() for j.text.Format classes [v7]

2023-09-29 Thread Joe Darcy
On Thu, 28 Sep 2023 20:39:29 GMT, Justin Lu wrote: >> Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8315720) >> which refines the spec of `equals()` and `hashCode()` in `java.text.Format` >> related classes. >> >> The current spec for most of these methods is either "_Ov

Re: RFR: JDK-8316696: Remove the testing base classes: IntlTest and CollatorTest [v3]

2023-09-29 Thread Naoto Sato
On Thu, 28 Sep 2023 18:13:12 GMT, Justin Lu wrote: >> Please review this PR which removes the i18n related testing base classes >> `IntlTest` and `CollatorTest` and converts all the tests that use them, >> >> IntlTest and CollatorTest are testing classes which are extended by tests in >> `text

Integrated: 8303959: tools/jpackage/share/RuntimePackageTest.java fails with java.lang.AssertionError missing files

2023-09-29 Thread Alexey Semenyuk
On Thu, 28 Sep 2023 20:58:30 GMT, Alexey Semenyuk wrote: > Don't use JDK image from `$JAVA_HOME` as a value of `--runtime-image` > jpackage cli option. Use jlink to create a runtime in test work dir if the > default runtime is not specified and pass the location of jlink output. This pull requ

Re: RFR: 8287843: File::getCanonicalFile doesn't work for \?\C:\ style paths DOS device paths [v5]

2023-09-29 Thread Brian Burkhalter
> In the Windows implementation of java.io.File.getCanonicalPath, strip any > long path or UNC prefix before canonicalizing the remainder of the pathname. Brian Burkhalter has updated the pull request incrementally with three additional commits since the last revision: - 8287843: Strip prefix

Re: RFR: 8311302: Allow for jlinking a custom runtime without packaged modules being present [v3]

2023-09-29 Thread Severin Gehwolf
On Tue, 19 Sep 2023 17:39:04 GMT, Alan Bateman wrote: > I did a pass over this to see where this proposal is currently at. At a > high-level I think good progress since the discussion on leyden-dev some time > ago. A few comments this from this pass: Thanks, Alan! > If I read it correctly, th

Integrated: 8317126: Redundant entries in Windows `tzmappings` file

2023-09-29 Thread Naoto Sato
On Thu, 28 Sep 2023 17:37:00 GMT, Naoto Sato wrote: > Removing redundant entries in `lib/tzmappings` file on Windows. The file maps > Windows time zones to Java time zones according to the region. Since `001` > means world, no region-specific entries are needed if those time zones are > the sa

Re: RFR: 8303374: Compiler Implementation for Primitive types in patterns, instanceof, and switch (Preview) [v2]

2023-09-29 Thread Raffaello Giulietti
On Thu, 28 Sep 2023 16:46:11 GMT, Aggelos Biboudis wrote: >> This is the first draft of a patch for Primitive types in patterns, >> instanceof, and switch (Preview). >> >> Draft spec here: >> https://cr.openjdk.org/~abimpoudis/instanceof/instanceof-20230913/specs/instanceof-jls.html > > Aggel

Re: RFR: 8316144: Remove unused field jdk.internal.util.xml.impl.XMLStreamWriterImpl.Element._Depth

2023-09-29 Thread Daniel Fuchs
On Wed, 27 Sep 2023 09:22:35 GMT, Andrey Turbanov wrote: > BTW, Who is Joe? I believe that would be @JoeWang-Java - PR Comment: https://git.openjdk.org/jdk/pull/15692#issuecomment-1741186962

Integrated: 8316000: File.setExecutable silently fails if file does not exist

2023-09-29 Thread Brian Burkhalter
On Mon, 11 Sep 2023 22:22:47 GMT, Brian Burkhalter wrote: > On Windows, do not return `true` from the `java.io.File` methods > `setReadable(boolean, boolean)` and `setExecutable(boolean, boolean)` if the > file does not exist. This pull request has now been integrated. Changeset: 49376e44 Aut

Integrated: 8316998: Remove redundant type arguments in the java.util.stream package

2023-09-29 Thread Mourad Abbay
On Wed, 27 Sep 2023 00:58:01 GMT, Mourad Abbay wrote: > Remove cases of redundant type arguments in the java.util.stream package. This pull request has now been integrated. Changeset: fa0697a6 Author:Mourad Abbay Committer: Paul Sandoz URL: https://git.openjdk.org/jdk/commit/fa0697

Re: RFR: 8316971: Add Lint warning for restricted method calls [v3]

2023-09-29 Thread Vicente Romero
On Fri, 29 Sep 2023 08:30:07 GMT, Maurizio Cimadamore wrote: >> This patch adds a new lint warning category, namely `-Xlint:restricted` to >> enable warnings on restricted method calls. >> >> The patch is relatively straightforward: javac marks methods that are marked >> with the `@Restricted

Re: RFR: 8316971: Add Lint warning for restricted method calls [v2]

2023-09-29 Thread Vicente Romero
On Fri, 29 Sep 2023 08:14:29 GMT, Maurizio Cimadamore wrote: > > question shouldn't the new Restricted annotation be annotated with the > > @PreviewFeature annotation? it depends on a preview feature > > The Restricted annotation is an internal annotation only. So there is no > value in annot

Integrated: 8317283: jpackage tests run osx-specific checks on windows and linux

2023-09-29 Thread Alexey Semenyuk
On Thu, 28 Sep 2023 23:38:51 GMT, Alexey Semenyuk wrote: > - Don't run osx specific checks on Linux and Windows > - Rework checks output from > > [17:31:52.845] TRACE: assertTrue(): Unexptected value in app image file for > > [17:31:52.860] TRACE: assertTrue(): Unexptected value in app image

Re: RFR: 8303374: Compiler Implementation for Primitive types in patterns, instanceof, and switch (Preview) [v2]

2023-09-29 Thread Aggelos Biboudis
On Thu, 28 Sep 2023 16:46:11 GMT, Aggelos Biboudis wrote: >> This is the first draft of a patch for Primitive types in patterns, >> instanceof, and switch (Preview). >> >> Draft spec here: >> https://cr.openjdk.org/~abimpoudis/instanceof/instanceof-20230913/specs/instanceof-jls.html > > Aggel

Re: RFR: 8317141: Remove unused validIndex method from URLClassPath$JarLoader

2023-09-29 Thread Daniel Fuchs
On Fri, 29 Sep 2023 05:41:11 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which removes unused (internal) > method from the `private` `URLClassPath$JarLoader`? > > The `validIndex` method which is being removed here was being used when JAR > index was supported. We remo

Re: RFR: 8317141: Remove unused validIndex method from URLClassPath$JarLoader

2023-09-29 Thread Lance Andersen
On Fri, 29 Sep 2023 05:41:11 GMT, Jaikiran Pai wrote: > Can I please get a review of this change which removes unused (internal) > method from the `private` `URLClassPath$JarLoader`? > > The `validIndex` method which is being removed here was being used when JAR > index was supported. We remo

Re: RFR: 8316971: Add Lint warning for restricted method calls [v3]

2023-09-29 Thread Maurizio Cimadamore
On Fri, 29 Sep 2023 08:22:47 GMT, Maurizio Cimadamore wrote: >> This patch adds a new lint warning category, namely `-Xlint:restricted` to >> enable warnings on restricted method calls. >> >> The patch is relatively straightforward: javac marks methods that are marked >> with the `@Restricted

Re: RFR: 8316971: Add Lint warning for restricted method calls [v3]

2023-09-29 Thread Maurizio Cimadamore
> This patch adds a new lint warning category, namely `-Xlint:restricted` to > enable warnings on restricted method calls. > > The patch is relatively straightforward: javac marks methods that are marked > with the `@Restricted` annotation with a corresponding internal flag. This is > done both

Re: RFR: 8316971: Add Lint warning for restricted method calls [v2]

2023-09-29 Thread Maurizio Cimadamore
On Thu, 28 Sep 2023 15:56:36 GMT, Vicente Romero wrote: > question shouldn't the new Restricted annotation be annotated with the > @PreviewFeature annotation? it depends on a preview feature The Restricted annotation is an internal annotation only. So there is no value in annotating it with `@