Re: a quick question about String

2021-12-23 Thread Enrico Olivelli
Alan, are you talking about the fact that you cannot "wrap" an existing byte[] that you know that you are already encoded ? In that case the main problem is that the String is supposed to be immutable and when you pass the byte[] it must be copied in order to prevent someone else to modify the

Re: RFR: 8279134: Fix Amazon copyright in various files [v2]

2021-12-23 Thread Sergey Bylokhov
> This bug is similar to https://bugs.openjdk.java.net/browse/JDK-8244094 > > Currently, some of the files in the OpenJDK repo have Amazon copyright > notices which are all slightly different and do not conform to Amazons > preferred copyright notice which is simply (intentionally without

Re: a quick question about String

2021-12-23 Thread Simon Roberts
I think there are two things at stake here, one is that as I understand it, "new means new", in every case. This is at least partly why the constructors on soon-to-be value objects are deprecated; they become meaningless. The other is that if the presumption is that we should always intern new

Re: RFR: 8279134: Fix Amazon copyright in various files

2021-12-23 Thread Paul Hohensee
On Wed, 22 Dec 2021 09:07:24 GMT, Sergey Bylokhov wrote: > This bug is similar to https://bugs.openjdk.java.net/browse/JDK-8244094 > > Currently, some of the files in the OpenJDK repo have Amazon copyright > notices which are all slightly different and do not conform to Amazons > preferred

Re: a quick question about String

2021-12-23 Thread Xeno Amess
never should,as Object can be use as lock. XenoAmess From: core-libs-dev on behalf of Bernd Eckenfels Sent: Friday, December 24, 2021 5:51:55 AM To: alan Snyder ; core-libs-dev Subject: Re: a quick question about String new String() always creates a new

Re: a quick question about String

2021-12-23 Thread Bernd Eckenfels
new String() always creates a new instance. Gruss Bernd -- http://bernd.eckenfels.net Von: core-libs-dev im Auftrag von Alan Snyder Gesendet: Thursday, December 23, 2021 6:59:18 PM An: core-libs-dev Betreff: a quick question about String Do the public

Re: RFR: 8279134: Fix Amazon copyright in various files

2021-12-23 Thread Xin Liu
On Wed, 22 Dec 2021 09:07:24 GMT, Sergey Bylokhov wrote: > This bug is similar to https://bugs.openjdk.java.net/browse/JDK-8244094 > > Currently, some of the files in the OpenJDK repo have Amazon copyright > notices which are all slightly different and do not conform to Amazons > preferred

Integrated: Merge jdk18

2021-12-23 Thread Jesper Wilhelmsson
On Thu, 23 Dec 2021 17:11:15 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 18 -> JDK 19 This pull request has now been integrated. Changeset: a3b1c6b0 Author:Jesper Wilhelmsson URL: https://git.openjdk.java.net/jdk/commit/a3b1c6b03600da21b00a1f37ea4712096d636b14 Stats: 299

Re: RFR: Merge jdk18 [v2]

2021-12-23 Thread Jesper Wilhelmsson
> Forwardport JDK 18 -> JDK 19 Jesper Wilhelmsson has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 113 commits: - Merge - 8279115: Fix internal doc comment errors. Reviewed-by: mli - 8276302: Locale.filterTags methods ignore

Re: RFR: 8277155: Compress and expand vector operations

2021-12-23 Thread Paul Sandoz
On Wed, 24 Nov 2021 19:20:08 GMT, Paul Sandoz wrote: > Add two new cross-lane vector operations, `compress` and `expand`. > > An example of such usage might be code that selects elements from array `a` > and stores those selected elements in array `z`: > > > int[] a = ...; > > int[] z =

a quick question about String

2021-12-23 Thread Alan Snyder
Do the public constructors of String actually do what their documentation says (allocate a new instance), or is there some kind of compiler magic that might avoid allocation?

RFR: Merge jdk18

2021-12-23 Thread Jesper Wilhelmsson
Forwardport JDK 18 -> JDK 19 - Commit messages: - Merge - 8279204: [BACKOUT] JDK-8278413: C2 crash when allocating array of size too large - 8268297: jdk/jfr/api/consumer/streaming/TestLatestEvent.java times out - 8279076: C2: Bad AD file when matching SqrtF with UseSSE=0 -

Re: RFR: 8272746: ZipFile can't open big file (NegativeArraySizeException)

2021-12-23 Thread Alan Bateman
On Thu, 23 Dec 2021 10:55:08 GMT, Masanori Yano wrote: > Could you please review the JDK-8272746 bug fixes? > Since the array index is of type int, the overflow occurs when the value of > end.cenlen is too large because of too many entries. > It is necessary to read a part of the CEN from the

Integrated: JDK-8276302: Locale.filterTags methods ignore actual weight when matching "*" (as if it is 1)

2021-12-23 Thread Daniel Le
On Fri, 10 Dec 2021 00:02:31 GMT, Daniel Le wrote: > Locale.filterTags methods ignore actual weight when matching "*" (as if > it is 1) because LocaleMatcher.{filterBasic,filterExtended} do so. > > Fix the bug and add regression test cases for it as well as existing > behavior. This pull

RFR: 8272746: ZipFile can't open big file (NegativeArraySizeException)

2021-12-23 Thread Masanori Yano
Could you please review the JDK-8272746 bug fixes? Since the array index is of type int, the overflow occurs when the value of end.cenlen is too large because of too many entries. It is necessary to read a part of the CEN from the file to fix the problem fundamentally, but the way will require