Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v2]

2023-03-24 Thread Eirik Bjorsnos
On Fri, 24 Mar 2023 16:36:46 GMT, Lance Andersen wrote: >> Eirik Bjorsnos has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove @throws as per review feedback >> - Consistently use the term "END header" when referring to the "End o

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v2]

2023-03-24 Thread Eirik Bjorsnos
On Fri, 24 Mar 2023 18:30:26 GMT, Martin Buchholz wrote: >> Eirik Bjorsnos has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove @throws as per review feedback >> - Consistently use the term "END header" when referring to the "End

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v2]

2023-03-24 Thread Eirik Bjorsnos
On Fri, 24 Mar 2023 18:28:36 GMT, Martin Buchholz wrote: >> Eirik Bjorsnos has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove @throws as per review feedback >> - Consistently use the term "END header" when referring to the "End

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v2]

2023-03-24 Thread Eirik Bjorsnos
> The TestTooManyEntries test was originally added to validate that ZIP64 files > with CEN sizes exceeding what ZipFile supports are rejected with a > ZipException. The test does this by creating a large ZIP file (several > gigabytes) with many enties. Because this is resource intensive, the te

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries [v2]

2023-03-24 Thread Eirik Bjorsnos
On Fri, 24 Mar 2023 18:26:02 GMT, Martin Buchholz wrote: >> Eirik Bjorsnos has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Remove @throws as per review feedback >> - Consistently use the term "END header" when referring to the "End

RFR: 8304918: Remove unused decl field from AnnotatedType implementations

2023-03-24 Thread Chen Liang
In `AnnotatedTypeBaseImpl`, a `decl` field is declared, referring to the declaration that the AnnotatedType is from. However, this field is not used anywhere except passing to constructors of other implementations; it's not used in debug messages (unlike in `TypeAnnotation`), not involved in equ

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v8]

2023-03-24 Thread Eirik Bjorsnos
On Fri, 24 Mar 2023 19:30:22 GMT, Sergey Tsypanov wrote: >> By default `BufferedInputStream` is constructed with internal buffer with >> capacity 8192. In some cases this buffer is never used, e.g. when we call >> `IS.readNBytes()` or `IS.readAllBytes()` (relying on `BIS.read1()`) or when >> `

Re: RFR: 8266571: Sequenced Collections [v2]

2023-03-24 Thread Stuart Marks
> PR for Sequenced Collections implementation. Stuart Marks has updated the pull request incrementally with two additional commits since the last revision: - More specification tweaks. - Add simple overrides to ArrayList. - Changes: - all: https://git.openjdk.org/jdk/pull/7387/

Re: RFR: 8266571: Sequenced Collections

2023-03-24 Thread Stuart Marks
On Fri, 24 Mar 2023 22:26:03 GMT, Tagir F. Valeev wrote: >> PR for Sequenced Collections implementation. > > Hello, Stuart! > > I'm really glad that this proposal progresses, and now we have a solid > implementation draft. In general, I like it very much. You may find a couple > of comments fr

Re: The non-deterministic iteration order of Immutable Collections

2023-03-24 Thread Stuart Marks
On 3/24/23 10:53 AM, Kasper Nielsen wrote: Would java.util.SequencedMap.of(...) java.util.SequencedMap.copyOf(SequencedMap map) java.util.SequencedSet.of(...) java.util.SequencedSet.copyOf(SequencedSet set) solve your problem? I would love to see them included in JEP 431. Should be fairly sim

Re: The non-deterministic iteration order of Immutable Collections

2023-03-24 Thread Stuart Marks
On 3/24/23 10:18 AM, Chris Hegarty wrote: I know that this has come up a number of times before, but I cannot seem to find anything directly relevant to my use-case, or recent. The iteration order of immutable Sets and Maps (created by the `of` factories) is clearly unspecified - good. Code

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v2]

2023-03-24 Thread Mandy Chung
On Fri, 24 Mar 2023 20:54:25 GMT, Chen Liang wrote: >> Mandy Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> avoid another map lookup > > src/java.base/share/classes/java/lang/invoke/ClassFileDumper.java line 88: > >> 86:

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API [v2]

2023-03-24 Thread Mandy Chung
> This implements a shared utility to dump generated classes defined as > normal/hidden classes via `Lookup` API. This replaces the implementation in > `LambdaMetaFactory` and method handle implementation that dumps the hidden > class bytes on disk for debugging. > > For classes defined vi

Re: The non-deterministic iteration order of Immutable Collections

2023-03-24 Thread Kasper Nielsen
> >> > >> I don't (yet) want to be prescriptive in any potential solution. And I > >> know that this has been discussed before. I mostly just want to start a > >> conversation and see how much traction it gets. > >> > > Would > > java.util.SequencedMap.of(...) > > java.util.SequencedMap.copyOf(Sequ

Re: The non-deterministic iteration order of Immutable Collections

2023-03-24 Thread Xeno Amess
maybe you can use some java agent to hack in the of function, and change it to some strange order, to make you see where goes wrong easier? Remi Forax 于2023年3月25日周六 06:13写道: > - Original Message - > > From: "Kasper Nielsen" > > To: "Chris Hegarty" > > Cc: "core-libs-dev" > > Sent: Fri

Re: RFR: 8266571: Sequenced Collections

2023-03-24 Thread Tagir F . Valeev
On Tue, 8 Feb 2022 17:23:38 GMT, Stuart Marks wrote: > PR for Sequenced Collections implementation. Hello, Stuart! I'm really glad that this proposal progresses, and now we have a solid implementation draft. In general, I like it very much. You may find a couple of comments from me in this re

Re: RFR: 8266571: Sequenced Collections

2023-03-24 Thread Tagir F . Valeev
On Thu, 3 Nov 2022 00:49:52 GMT, Stuart Marks wrote: >> @stuart-marks What are examples of cases where it wouldn't be reasonable: >> https://github.com/openjdk/jdk/pull/7387/files#diff-2b261a88d9ed30893d24186a36ef500d284d82e8f345591fc6c44ed5ae15da4fR161 >> ? > > I had to uncomment that line to

Re: RFR: 8177352: Calendar.getDisplayName(s) in non-lenient mode inconsistent, does not match spec

2023-03-24 Thread Naoto Sato
On Fri, 17 Mar 2023 18:22:17 GMT, Justin Lu wrote: > This PR updates the javadoc of `java.util.Calendar.getDisplayName()` and > `java.util.Calendar.getDisplayNames()` to better reflect the actual behavior > when the calendar is non-lenient. > > This involves updating the spec of both methods t

Re: The non-deterministic iteration order of Immutable Collections

2023-03-24 Thread Remi Forax
- Original Message - > From: "Kasper Nielsen" > To: "Chris Hegarty" > Cc: "core-libs-dev" > Sent: Friday, March 24, 2023 6:53:51 PM > Subject: Re: The non-deterministic iteration order of Immutable Collections >> >> I don't (yet) want to be prescriptive in any potential solution. And I

Re: RFR: 8304837: Classfile API throws IOOBE for MethodParameters attribute without parameter names [v3]

2023-03-24 Thread Joe Darcy
On Fri, 24 Mar 2023 06:42:30 GMT, Hannes Greule wrote: >> After merging master into https://github.com/openjdk/jdk/pull/9862, we >> encountered test failures (e.g., >> https://github.com/SirYwell/jdk/actions/runs/4500940829/jobs/7923018438#step:9:2541). >> The Classfile API tries to read from

Re: RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API

2023-03-24 Thread Chen Liang
On Fri, 24 Mar 2023 20:41:41 GMT, Mandy Chung wrote: > This implements a shared utility to dump generated classes defined as > normal/hidden classes via `Lookup` API. This replaces the implementation in > `LambdaMetaFactory` and method handle implementation that dumps the hidden > class byte

RFR: 8304846: Provide a shared utility to dump generated classes defined via Lookup API

2023-03-24 Thread Mandy Chung
This implements a shared utility to dump generated classes defined as normal/hidden classes via `Lookup` API. This replaces the implementation in `LambdaMetaFactory` and method handle implementation that dumps the hidden class bytes on disk for debugging. For classes defined via `Lookup::d

RFR: 8177352: Calendar.getDisplayName(s) in non-lenient mode inconsistent, does not match spec

2023-03-24 Thread Justin Lu
This PR updates the javadoc of `java.util.Calendar.getDisplayName()` and `java.util.Calendar.getDisplayNames()` to better reflect the actual behavior when the calendar is non-lenient. This involves adding the **implSpec** tag to both methods to clarify behavior, as well as removing false behavi

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v2]

2023-03-24 Thread Roger Riggs
On Sun, 22 Jan 2023 09:50:21 GMT, Sergey Tsypanov wrote: >> Currently it's O(n) - we do `n` shifts of bytes within `StringBuilder`. This >> can be reduced to O(1) improving the code like: >> >> DateTimeFormatter dtf = new DateTimeFormatterBuilder() >> .appendLiteral("Date:") >> .padNext(20,

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v2]

2023-03-24 Thread Sergey Tsypanov
On Sun, 22 Jan 2023 09:50:21 GMT, Sergey Tsypanov wrote: >> Currently it's O(n) - we do `n` shifts of bytes within `StringBuilder`. This >> can be reduced to O(1) improving the code like: >> >> DateTimeFormatter dtf = new DateTimeFormatterBuilder() >> .appendLiteral("Date:") >> .padNext(20,

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v2]

2023-03-24 Thread Sergey Tsypanov
On Mon, 23 Jan 2023 11:34:27 GMT, Claes Redestad wrote: >> The modified code is called only when a user explicitly calls `padNext(int, >> char)`, i.e. if I modified the example snippet as >> >> DateTimeFormatter dtf = new DateTimeFormatterBuilder() >> .appendLiteral("Date:") >> //.padNext(20,

Re: RFR: 8300818: Reduce complexity of padding with DateTimeFormatter [v2]

2023-03-24 Thread Sergey Tsypanov
On Mon, 13 Mar 2023 19:24:38 GMT, Roger Riggs wrote: >> Sergey Tsypanov 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 two additional >> commit

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v8]

2023-03-24 Thread Sergey Tsypanov
> By default `BufferedInputStream` is constructed with internal buffer with > capacity 8192. In some cases this buffer is never used, e.g. when we call > `IS.readNBytes()` or `IS.readAllBytes()` (relying on `BIS.read1()`) or when > `BufferedInputStream` is cascaded. Sergey Tsypanov has updated

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v6]

2023-03-24 Thread Sergey Tsypanov
On Fri, 24 Mar 2023 17:59:24 GMT, Chen Liang wrote: >> Sergey Tsypanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8304745: Amend copyright > > test/micro/org/openjdk/bench/java/io/BufferedInputStreamBenchmark.java line 1: > >> 1: /

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v7]

2023-03-24 Thread Sergey Tsypanov
> By default `BufferedInputStream` is constructed with internal buffer with > capacity 8192. In some cases this buffer is never used, e.g. when we call > `IS.readNBytes()` or `IS.readAllBytes()` (relying on `BIS.read1()`) or when > `BufferedInputStream` is cascaded. Sergey Tsypanov has updated

Re: RFR: 8225641: Calendar.roll(int field) does not work correctly for WEEK_OF_YEAR [v4]

2023-03-24 Thread Justin Lu
> This PR fixes the bug which occurred when `Calendar.roll(WEEK_OF_YEAR)` > rolled into a minimal first week with an invalid `WEEK_OF_YEAR` and > `DAY_OF_WEEK` combo. > > For example, Rolling _Monday, 30 December 2019_ by 1 week produced _Monday, > 31 December 2018_, which is incorrect. This is

Re: RFR: 8304448: Kitchensink failed: assert(!thread->is_in_any_VTMS_transition()) failed: class prepare events are not allowed in any VTMS transition

2023-03-24 Thread Serguei Spitsyn
On Thu, 23 Mar 2023 09:10:26 GMT, Serguei Spitsyn wrote: > The fix was suggested/provided by @AlanBateman. > Continuation should use Unsafe.compareAndSetReference rather than a VH here. > We had to change CHM and VT back to Unsafe for similar reasons. > > Testing: Mach5 runs of tiers 1-6 are in

Re: RFR: 8225641: Calendar.roll(int field) does not work correctly for WEEK_OF_YEAR [v2]

2023-03-24 Thread Justin Lu
On Fri, 24 Mar 2023 18:17:32 GMT, Justin Lu wrote: >> This PR fixes the bug which occurred when `Calendar.roll(WEEK_OF_YEAR)` >> rolled into a minimal first week with an invalid `WEEK_OF_YEAR` and >> `DAY_OF_WEEK` combo. >> >> For example, Rolling _Monday, 30 December 2019_ by 1 week produced

Re: RFR: 8225641: Calendar.roll(int field) does not work correctly for WEEK_OF_YEAR [v3]

2023-03-24 Thread Justin Lu
> This PR fixes the bug which occurred when `Calendar.roll(WEEK_OF_YEAR)` > rolled into a minimal first week with an invalid `WEEK_OF_YEAR` and > `DAY_OF_WEEK` combo. > > For example, Rolling _Monday, 30 December 2019_ by 1 week produced _Monday, > 31 December 2018_, which is incorrect. This is

Re: RFR: 8225641: Calendar.roll(int field) does not work correctly for WEEK_OF_YEAR [v3]

2023-03-24 Thread Justin Lu
On Wed, 15 Mar 2023 19:57:43 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Expand testing to all end of year days that roll into week 1 > > test/jdk/java/util/Calendar/RollToMinWeek.java line 79: >

Integrated: 8304898: Fix Copyright Headers for JLink Source Files

2023-03-24 Thread Ian Graves
On Fri, 24 Mar 2023 17:56:03 GMT, Ian Graves wrote: > Updating copyright headers on some files missed in a previous commit This pull request has now been integrated. Changeset: 3f59b75b Author:Ian Graves URL: https://git.openjdk.org/jdk/commit/3f59b75bd8a858d2327ca975a57079747ff11b8

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Martin Buchholz
On Thu, 26 Jan 2023 18:49:47 GMT, Eirik Bjorsnos wrote: > The TestTooManyEntries test was originally added to validate that ZIP64 files > with CEN sizes exceeding what ZipFile supports are rejected with a > ZipException. The test does this by creating a large ZIP file (several > gigabytes) wi

Re: The non-deterministic iteration order of Immutable Collections

2023-03-24 Thread Rob Spoor
Check these: * https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/util/Map.html#unmodifiable: "The iteration order of mappings is unspecified and is subject to change." * https://docs.oracle.com/en/java/javase/20/docs/api/java.base/java/util/Set.html#unmodifiable: "The iteration

Re: RFR: 8225641: Calendar.roll(int field) does not work correctly for WEEK_OF_YEAR [v2]

2023-03-24 Thread Justin Lu
On Wed, 15 Mar 2023 19:47:24 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Test all possible min week and first day of week combos for bugged date >> - Add safety check that amount is positive > >

Re: RFR: 8304898: Fix Copyright Headers for JLink Source Files

2023-03-24 Thread Mandy Chung
On Fri, 24 Mar 2023 17:56:03 GMT, Ian Graves wrote: > Updating copyright headers on some files missed in a previous commit Marked as reviewed by mchung (Reviewer). - PR Review: https://git.openjdk.org/jdk/pull/13181#pullrequestreview-1357222570

Re: RFR: 8304898: Fix Copyright Headers for JLink Source Files

2023-03-24 Thread Iris Clark
On Fri, 24 Mar 2023 17:56:03 GMT, Ian Graves wrote: > Updating copyright headers on some files missed in a previous commit Confirmed all files listed in 8304691 save the deleted JLinkPostProcessingTest.java now have updated copyright year. - Marked as reviewed by iris (Reviewer).

Re: RFR: 8225641: Calendar.roll(int field) does not work correctly for WEEK_OF_YEAR [v2]

2023-03-24 Thread Justin Lu
> This PR fixes the bug which occurred when `Calendar.roll(WEEK_OF_YEAR)` > rolled into a minimal first week with an invalid `WEEK_OF_YEAR` and > `DAY_OF_WEEK` combo. > > For example, Rolling _Monday, 30 December 2019_ by 1 week produced _Monday, > 31 December 2018_, which is incorrect. This is

Re: The non-deterministic iteration order of Immutable Collections

2023-03-24 Thread -
https://github.com/openjdk/jdk/blob/97649489d078a3aa34a73e7f686e507f34155788/src/java.base/share/classes/java/util/ImmutableCollections.java#L76-L79 Looking at these, it seems you can add `-Xshare:dump` to VM arguments to obtain a deterministic iteration order for the same JDK builds. This can hel

RFR: 8304898: Fix Copyright Headers for JLink Source Files

2023-03-24 Thread Ian Graves
Updating copyright headers on some files missed in a previous commit - Commit messages: - 8304898: Fix Copyright Headers for JLink Source Files Changes: https://git.openjdk.org/jdk/pull/13181/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13181&range=00 Issue: https://bug

Re: JDK 20 EA builds (archive?)

2023-03-24 Thread Dalibor Topic
On 24.03.2023 17:55, Chris Hegarty wrote: Hi, While definitely not the right list, someone here will surely know ... Where can I download archive EA builds of JDK 20, so I can perform bisect experiments to help narrow when something changed between JDK 19 and JDK 20.  ( I have some builds,

Re: The non-deterministic iteration order of Immutable Collections

2023-03-24 Thread Kasper Nielsen
> > I don't (yet) want to be prescriptive in any potential solution. And I > know that this has been discussed before. I mostly just want to start a > conversation and see how much traction it gets. > Would java.util.SequencedMap.of(...) java.util.SequencedMap.copyOf(SequencedMap map) java.util.Seq

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v6]

2023-03-24 Thread Chen Liang
On Fri, 24 Mar 2023 17:02:30 GMT, Sergey Tsypanov wrote: >> By default `BufferedInputStream` is constructed with internal buffer with >> capacity 8192. In some cases this buffer is never used, e.g. when we call >> `IS.readNBytes()` or `IS.readAllBytes()` (relying on `BIS.read1()`) or when >> `

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v6]

2023-03-24 Thread Chen Liang
On Fri, 24 Mar 2023 17:51:03 GMT, Eirik Bjorsnos wrote: > Is something wrong with line endings in the added benchmark? jcheck seems to > complain a lot? It often happens when copying a file on windows. Can usually be fixed in intellij idea by navigating to the file and changing line endings to

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v6]

2023-03-24 Thread Eirik Bjorsnos
On Fri, 24 Mar 2023 17:02:30 GMT, Sergey Tsypanov wrote: >> By default `BufferedInputStream` is constructed with internal buffer with >> capacity 8192. In some cases this buffer is never used, e.g. when we call >> `IS.readNBytes()` or `IS.readAllBytes()` (relying on `BIS.read1()`) or when >> `

Re: The non-deterministic iteration order of Immutable Collections

2023-03-24 Thread Holo The Sage Wolf
It is highly dependent on the exact implementation, but the situation you are describing us weird. In most cases the order *is* deterministic for a read-only view (which is the case in, for example, HashMap (and hence for HashSet)). In a deterministic implementation the only cases where the itera

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Eirik Bjorsnos
On Thu, 26 Jan 2023 18:49:47 GMT, Eirik Bjorsnos wrote: > The TestTooManyEntries test was originally added to validate that ZIP64 files > with CEN sizes exceeding what ZipFile supports are rejected with a > ZipException. The test does this by creating a large ZIP file (several > gigabytes) wi

The non-deterministic iteration order of Immutable Collections

2023-03-24 Thread Chris Hegarty
I know that this has come up a number of times before, but I cannot seem to find anything directly relevant to my use-case, or recent. The iteration order of immutable Sets and Maps (created by the `of` factories) is clearly unspecified - good. Code should not depend upon this iteration order,

Re: RFR: 8303485: Replacing os.name for operating system customization [v7]

2023-03-24 Thread Roger Riggs
> Improvements to support OS specific customization for JDK internal use: > - To select values and code; allowing elimination of unused code and values > - Optionally evaluated by build processes, compilation, or archiving (i.e. > CDS) > - Simple API to replace adhoc comparisons with `os.name`

Re: JDK 20 EA builds (archive?)

2023-03-24 Thread Pavel Rappo
Hi Chris, Would you not be able to bisect by tags? Checkout, build, and run your test(s) possibly (semi-) automatically using git bisect? What's the OS? -Pavel > On 24 Mar 2023, at 16:55, Chris Hegarty wrote: > > Hi, > > While definitely not the right list, someone here will surely know ...

Re: RFR: 8303485: Replacing os.name for operating system customization [v6]

2023-03-24 Thread Michael Osipov
On Fri, 24 Mar 2023 17:01:37 GMT, Roger Riggs wrote: >> That is acceptable, totally. > > Not the rabbit-hole I expected to go down today or for an informal comment on > an internal API. > I have no skin in that game. > https://www.redhat.com/en/topics/linux/what-is-linux Joke, they should know

Re: RFR: 8303485: Replacing os.name for operating system customization [v6]

2023-03-24 Thread Roger Riggs
On Fri, 24 Mar 2023 16:53:05 GMT, Michael Osipov wrote: >> If you are referring to "Red Hat Enterprise Linux", it'd be correct (AFAIK) >> to say that Red Hat identifies "Red Hat Enterprise Linux" as an operating >> system, but I wouldn't go so far as to say that Red Hat calls "Linux" an >> ope

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v13]

2023-03-24 Thread Mandy Chung
On Fri, 24 Mar 2023 02:18:43 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which proposes to fix the issue >> reported in https://bugs.openjdk.org/browse/JDK-8206890? >> >> The `jlink` command allows a `--endian` option to specify the byte order in >> the generated imag

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v6]

2023-03-24 Thread Sergey Tsypanov
> By default `BufferedInputStream` is constructed with internal buffer with > capacity 8192. In some cases this buffer is never used, e.g. when we call > `IS.readNBytes()` or `IS.readAllBytes()` (relying on `BIS.read1()`) or when > `BufferedInputStream` is cascaded. Sergey Tsypanov has updated

Re: RFR: 8303485: Replacing os.name for operating system customization [v6]

2023-03-24 Thread David M . Lloyd
On Fri, 24 Mar 2023 16:41:02 GMT, Michael Osipov wrote: >> A bit of a quibble, several internet sources identify Linux as an operating >> system (including Redhat). > > Well, no. It is just a kernel. Without a userland not an OS. That is why they > call it GNU/Linux. Kernel + userland. If you

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v5]

2023-03-24 Thread Sergey Tsypanov
On Fri, 24 Mar 2023 16:12:13 GMT, Chen Liang wrote: >> Sergey Tsypanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8304745: Add benchmark > > test/micro/org/openjdk/bench/java/io/BufferedInputStreamBenchmark.java line 2: > >> 1: /*

Re: RFR: 8303485: Replacing os.name for operating system customization [v6]

2023-03-24 Thread Michael Osipov
On Fri, 24 Mar 2023 16:51:46 GMT, David M. Lloyd wrote: >> Well, no. It is just a kernel. Without a userland not an OS. That is why >> they call it GNU/Linux. Kernel + userland. > > If you are referring to "Red Hat Enterprise Linux", it'd be correct (AFAIK) > to say that Red Hat identifies "Red

JDK 20 EA builds (archive?)

2023-03-24 Thread Chris Hegarty
Hi, While definitely not the right list, someone here will surely know ... Where can I download archive EA builds of JDK 20, so I can perform bisect experiments to help narrow when something changed between JDK 19 and JDK 20. ( I have some builds, but not that many ) --- Informational: I'm

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v13]

2023-03-24 Thread Mandy Chung
On Fri, 24 Mar 2023 16:10:54 GMT, Alan Bateman wrote: >> Jaikiran Pai has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 28 commits: >> >> - merge latest from master branch >> - Mandy's suggested patch improvements >> - ARM is 32

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Lance Andersen
On Thu, 26 Jan 2023 18:49:47 GMT, Eirik Bjorsnos wrote: > The TestTooManyEntries test was originally added to validate that ZIP64 files > with CEN sizes exceeding what ZipFile supports are rejected with a > ZipException. The test does this by creating a large ZIP file (several > gigabytes) wi

Re: RFR: 8303485: Replacing os.name for operating system customization [v6]

2023-03-24 Thread Michael Osipov
On Fri, 24 Mar 2023 16:08:30 GMT, Roger Riggs wrote: >> src/java.base/share/classes/jdk/internal/util/OperatingSystem.java line 66: >> >>> 64: >>> 65: /** >>> 66: * The Linux Operating system. >> >> For the sake if completeness, Linux isn't an operating system, so this >> statement i

Re: RFR: 8303485: Replacing os.name for operating system customization [v6]

2023-03-24 Thread Roger Riggs
On Fri, 24 Mar 2023 16:04:38 GMT, Roger Riggs wrote: >> src/java.base/share/classes/jdk/internal/util/OperatingSystem.java line 81: >> >>> 79: */ >>> 80: AIX, >>> 81: ; >> >> So no Unknown value? > > Correct, as explained above. If additional OS values are needed, they can be adde

Re: RFR: 8304761: Update IANA Language Subtag Registry to Version 2023-03-22 [v2]

2023-03-24 Thread Naoto Sato
On Thu, 23 Mar 2023 21:30:37 GMT, Justin Lu wrote: >> Update IANA LSR to 2023-03-22 >> [update](https://mm.icann.org/pipermail/ietf-languages-announcements/2023-March/85.html). >> Add all new preferred languages to `ACCEPT_LANGUAGES` except `gu`. > > Justin Lu has updated the pull request i

Re: RFR: 8303485: Replacing os.name for operating system customization [v6]

2023-03-24 Thread Naoto Sato
On Fri, 24 Mar 2023 00:27:42 GMT, Roger Riggs wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archiving (i.e. >> CDS) >

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v5]

2023-03-24 Thread Chen Liang
On Fri, 24 Mar 2023 15:40:40 GMT, Sergey Tsypanov wrote: >> By default `BufferedInputStream` is constructed with internal buffer with >> capacity 8192. In some cases this buffer is never used, e.g. when we call >> `IS.readNBytes()` or `IS.readAllBytes()` (relying on `BIS.read1()`) or when >> `

Re: RFR: 8304006: jlink should create the jimage file in the native endian for the target platform [v13]

2023-03-24 Thread Alan Bateman
On Fri, 24 Mar 2023 02:18:43 GMT, Jaikiran Pai wrote: >> Can I please get a review for this change which proposes to fix the issue >> reported in https://bugs.openjdk.org/browse/JDK-8206890? >> >> The `jlink` command allows a `--endian` option to specify the byte order in >> the generated imag

Re: RFR: 8303485: Replacing os.name for operating system customization [v6]

2023-03-24 Thread Roger Riggs
On Fri, 24 Mar 2023 16:03:26 GMT, Michael Osipov wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rename OperatingSystem enum values to uppercase > > src/java.base/share/classes/jdk/internal/util/OperatingSystem.java

Re: RFR: 8303485: Replacing os.name for operating system customization [v6]

2023-03-24 Thread Roger Riggs
On Fri, 24 Mar 2023 16:02:59 GMT, Michael Osipov wrote: >> Roger Riggs has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Rename OperatingSystem enum values to uppercase > > src/java.base/share/classes/jdk/internal/util/OperatingSystem.java

Re: RFR: 8303485: Replacing os.name for operating system customization [v6]

2023-03-24 Thread Michael Osipov
On Fri, 24 Mar 2023 00:27:42 GMT, Roger Riggs wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archiving (i.e. >> CDS) >

Re: RFR: 8303485: Replacing os.name for operating system customization [v6]

2023-03-24 Thread Alan Bateman
On Fri, 24 Mar 2023 00:27:42 GMT, Roger Riggs wrote: >> Improvements to support OS specific customization for JDK internal use: >> - To select values and code; allowing elimination of unused code and values >> - Optionally evaluated by build processes, compilation, or archiving (i.e. >> CDS) >

Re: RFR: 8304837: Classfile API throws IOOBE for MethodParameters attribute without parameter names [v3]

2023-03-24 Thread Julian Waters
On Fri, 24 Mar 2023 06:42:30 GMT, Hannes Greule wrote: >> After merging master into https://github.com/openjdk/jdk/pull/9862, we >> encountered test failures (e.g., >> https://github.com/SirYwell/jdk/actions/runs/4500940829/jobs/7923018438#step:9:2541). >> The Classfile API tries to read from

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v46]

2023-03-24 Thread Jim Laskey
On Thu, 23 Mar 2023 01:12:20 GMT, Chen Liang wrote: >> Jim Laskey has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Tidy javadoc >> - Rename StringTemplate classes > > src/java.base/share/classes/java/lang/runtime/StringTemplateImpl.jav

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v46]

2023-03-24 Thread Jim Laskey
On Wed, 22 Mar 2023 23:56:48 GMT, Chen Liang wrote: >> Jim Laskey has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Tidy javadoc >> - Rename StringTemplate classes > > src/java.base/share/classes/java/lang/runtime/ReferencedKeyMap.java

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v3]

2023-03-24 Thread Jim Laskey
On Wed, 22 Mar 2023 23:26:13 GMT, Chen Liang wrote: >> As i said above, i consider this thread as resolved > > Suggestion: > > * to {@value #MAX_INDY_CONCAT_ARG_SLOTS}. Changing - PR Review Comment: https://git.openjdk.org/jdk/pull/10889#discussion_r1147748029

RFR: 8304871: Use default visibility for static library builds

2023-03-24 Thread Severin Gehwolf
Please review this change for symbol visibility of static library artefacts. This fixes an issue when OpenJDK is being used as a base for generating native images preventing the symbols from being exported and looked up from the executable. Note that symbol visibity is now controlled by a linker

Re: RFR: JDK-8285932 Implementation of JEP 430 String Templates (Preview) [v46]

2023-03-24 Thread Jim Laskey
On Wed, 22 Mar 2023 23:27:20 GMT, Chen Liang wrote: >> Jim Laskey has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Tidy javadoc >> - Rename StringTemplate classes > > src/java.base/share/classes/java/lang/invoke/StringConcatFactory.jav

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v2]

2023-03-24 Thread Sergey Tsypanov
On Thu, 23 Mar 2023 21:15:44 GMT, Eirik Bjorsnos wrote: >> Sergey Tsypanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update src/java.base/share/classes/java/io/BufferedInputStream.java >> >> Co-authored-by: liach <7806504+li..

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v5]

2023-03-24 Thread Sergey Tsypanov
> By default `BufferedInputStream` is constructed with internal buffer with > capacity 8192. In some cases this buffer is never used, e.g. when we call > `IS.readNBytes()` or `IS.readAllBytes()` (relying on `BIS.read1()`) or when > `BufferedInputStream` is cascaded. Sergey Tsypanov has updated

Re: RFR: 8304717: Declaration aliasing between boolean and jboolean is wrong [v2]

2023-03-24 Thread Julian Waters
On Thu, 23 Mar 2023 22:23:00 GMT, Julian Waters wrote: >> A couple of spots wrongly refer to boolean and jboolean as the same thing. >> While this does still compile thanks to a happy accident and implicit >> conversions, they are not the same at all, and should be fixed before a >> future com

Re: RFR: 8304837: Classfile API throws IOOBE for MethodParameters attribute without parameter names [v3]

2023-03-24 Thread Adam Sotona
On Fri, 24 Mar 2023 06:42:30 GMT, Hannes Greule wrote: >> After merging master into https://github.com/openjdk/jdk/pull/9862, we >> encountered test failures (e.g., >> https://github.com/SirYwell/jdk/actions/runs/4500940829/jobs/7923018438#step:9:2541). >> The Classfile API tries to read from

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Eirik Bjorsnos
On Fri, 24 Mar 2023 12:25:55 GMT, Lance Andersen wrote: >> Sparse files need to be created as such. The purpose of this delete exists >> to make this explicit. I moved this closer to the FileChannel.open and added >> a comment to explain the delete. > > I am fine leaving it, but still not convi

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Lance Andersen
On Fri, 24 Mar 2023 08:05:19 GMT, Eirik Bjorsnos wrote: >> test/jdk/java/util/zip/ZipFile/EndOfCenValidation.java line 177: >> >>> 175: Path zip) throws IOException >>> { >>> 176: >>> 177: Files.deleteIfExists(zip); >> >> Is this needed? I th

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Lance Andersen
On Thu, 26 Jan 2023 18:49:47 GMT, Eirik Bjorsnos wrote: > The TestTooManyEntries test was originally added to validate that ZIP64 files > with CEN sizes exceeding what ZipFile supports are rejected with a > ZipException. The test does this by creating a large ZIP file (several > gigabytes) wi

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v3]

2023-03-24 Thread Sergey Tsypanov
On Fri, 24 Mar 2023 10:27:45 GMT, Alan Bateman wrote: > This will ensure that read, skip, reset, etc. check buf as before Why do we so heavily rely on `buf` if we can do open/close check with `getInIfOpen()`? - PR Comment: https://git.openjdk.org/jdk/pull/13150#issuecomment-148266

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v4]

2023-03-24 Thread Sergey Tsypanov
> By default `BufferedInputStream` is constructed with internal buffer with > capacity 8192. In some cases this buffer is never used, e.g. when we call > `IS.readNBytes()` or `IS.readAllBytes()` (relying on `BIS.read1()`) or when > `BufferedInputStream` is cascaded. Sergey Tsypanov has updated

Re: RFR: 8304745: Lazily initialize byte[] in java.io.BufferedInputStream [v3]

2023-03-24 Thread Alan Bateman
On Fri, 24 Mar 2023 06:40:24 GMT, Sergey Tsypanov wrote: >> By default `BufferedInputStream` is constructed with internal buffer with >> capacity 8192. In some cases this buffer is never used, e.g. when we call >> `IS.readNBytes()` or `IS.readAllBytes()` (relying on `BIS.read1()`) or when >> `

Re: RFR: 8304265: Implementation of Foreign Function and Memory API (Third Preview) [v8]

2023-03-24 Thread ExE Boss
On Wed, 22 Mar 2023 14:09:07 GMT, Per Minborg wrote: >> API changes for the FFM API (third preview) >> >> Specdiff: >> https://cr.openjdk.org/~pminborg/panama/21/v1/specdiff/overview-summary.html >> >> Javadoc: >> https://cr.openjdk.org/~pminborg/panama/21/v1/javadoc/java.base/module-summary.ht

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Eirik Bjorsnos
On Thu, 2 Feb 2023 12:57:15 GMT, Eirik Bjorsnos wrote: >> test/jdk/java/util/zip/ZipFile/CenSizeTooLarge.java line 92: >> >>> 90: private void assertRejected(Path zip, String expectedMsg) throws >>> IOException { >>> 91: try (ZipFile zf = new ZipFile(zip.toFile())) { >>> 92:

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Eirik Bjorsnos
On Tue, 31 Jan 2023 11:38:07 GMT, Lance Andersen wrote: >> The TestTooManyEntries test was originally added to validate that ZIP64 >> files with CEN sizes exceeding what ZipFile supports are rejected with a >> ZipException. The test does this by creating a large ZIP file (several >> gigabytes

RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Eirik Bjorsnos
The TestTooManyEntries test was originally added to validate that ZIP64 files with CEN sizes exceeding what ZipFile supports are rejected with a ZipException. The test does this by creating a large ZIP file (several gigabytes) with many enties. Because this is resource intensive, the test is c

Re: RFR: 8304013: Add a fast, non-manual alternative to test/jdk/java/util/zip/ZipFile/TestTooManyEntries

2023-03-24 Thread Lance Andersen
On Thu, 26 Jan 2023 18:49:47 GMT, Eirik Bjorsnos wrote: > The TestTooManyEntries test was originally added to validate that ZIP64 files > with CEN sizes exceeding what ZipFile supports are rejected with a > ZipException. The test does this by creating a large ZIP file (several > gigabytes) wi