Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v2]

2025-05-11 Thread Per Minborg
On Fri, 9 May 2025 15:39:35 GMT, Andrew Haley wrote: >> This intrinsic is generally faster than the current implementation for >> Panama segment operations for all writes larger than about 8 bytes in size, >> increasing to more than 2* the performance on larger memory blocks on >> Graviton 2,

Re: RFR: 8356694: Removed unused subclass audits in ObjectInput/OutputStream

2025-05-11 Thread Alan Bateman
On Mon, 12 May 2025 02:18:05 GMT, Chen Liang wrote: > These two subclass audits in ObjectInputStream and ObjectOutputStream were > only used when security managers are present, which is no longer the case in > releases 24 and newer. Thus, we can remove these two redundant `ClassValue` > and th

Re: RFR: 8354724: Methods in java.io.Reader to read all characters and all lines [v16]

2025-05-11 Thread Alan Bateman
On Tue, 6 May 2025 15:43:07 GMT, Brian Burkhalter wrote: >> Implement the requested methods and add a test thereof. > > Brian Burkhalter has updated the pull request incrementally with one > additional commit since the last revision: > > 8354724: Revert BufferedReader; simplify Reader changes

RFR: 8356694: Removed unused subclass audits in ObjectInput/OutputStream

2025-05-11 Thread Chen Liang
These two subclass audits in ObjectInputStream and ObjectOutputStream were only used when security managers are present, which is no longer the case in releases 24 and newer. Thus, we can remove these two redundant `ClassValue` and the computation methods safely. Testing: java/io/Serializable a

Re: RFR: 8343110: Add getChars(int, int, char[], int) to CharSequence and CharBuffer [v12]

2025-05-11 Thread Jaikiran Pai
On Fri, 9 May 2025 20:35:04 GMT, Andrey Turbanov wrote: >> Markus KARG has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 17 commits: >> >> - merge latest from master branch >> - Applied proposal by Daniel: If there's no change to

Re: RFR: 8354799: ZipInputStream doesn't verify CRC for ZIP entry with empty file data [v2]

2025-05-11 Thread Jaikiran Pai
On Fri, 9 May 2025 07:07:38 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which addresses the issue noted in >> https://bugs.openjdk.org/browse/JDK-8354799? >> >> `java.util.zip.ZipInputStream` when dealing with a `STORED` entry of zero >> size was missing a CRC check fo

Re: RFR: 8354323: Safeguard SwitchBootstraps.typeSwitch when used outside the compiler

2025-05-11 Thread Luca Kellermann
On Wed, 7 May 2025 11:57:02 GMT, Aggelos Biboudis wrote: > While the compiler does not allow invalid queries to flow into > `SwitchBootstraps:typeSwitch`, a library user could do that and `typeSwitch` > does not prevent such usage pattern errors resulting in erroneous evaluation. > > For exam

Re: RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v12]

2025-05-11 Thread Kim Barrett
On Sat, 10 May 2025 20:28:39 GMT, Vicente Romero wrote: >> This PR is defining a new internal annotation, >> `@jdk.internal.RequiresIdentity`, with target types PARAMETER and >> TYPE_PARAMETER. The @RequiresIdentity annotation expresses the expectation >> that an argument to a given method or

Optimization of BigDecimal.valueOf(double)

2025-05-11 Thread Johannes Graham
This is somewhat of followup to a conversation a few months ago [1] regarding the non-existence of a BigDecimal.valueOf(float) method. While it wasn't the primary issue, the matter of performance did come up. Based on that, I have been experimenting with making some improvements there. I have a d

Re: Unnecessary logic is added to removeFirst and removeLast of ArrayList.

2025-05-11 Thread forax
> From: "Chen Liang" > To: "Remi Forax" > Cc: "core-libs-dev" > Sent: Sunday, May 11, 2025 5:41:25 PM > Subject: Re: Unnecessary logic is added to removeFirst and removeLast of > ArrayList. > > where the generated assembly code by the JITs is checked by humans > Is it? At least, it was true d

Re: RFR: 8356420: Provide examples on wrapping System.in [v3]

2025-05-11 Thread Chen Liang
On Fri, 9 May 2025 21:29:09 GMT, Naoto Sato wrote: >> With the introduction of `stdin.encoding` >> ([JDK-8350703](https://bugs.openjdk.org/browse/JDK-8350703)), some guidance >> for users to decode `System.in` would be desirable. Adding examples in the >> field description would help. > > Naot

Re: RFR: 8355022: Implement JEP 506: Scoped Values [v7]

2025-05-11 Thread Alan Bateman
On Thu, 8 May 2025 17:33:09 GMT, Andrew Haley wrote: >> Propose to finalize scoped values. >> The only functional change is that the orElse() method no longer accepts a >> null argument. > > Andrew Haley has updated the pull request incrementally with one additional > commit since the last revi

Re: RFR: 8356420: Provide examples on wrapping System.in [v3]

2025-05-11 Thread Alan Bateman
On Sun, 11 May 2025 15:15:17 GMT, Chen Liang wrote: > 1. FileDescriptor.in: Unfortunately FileInputStream(FileDescriptor) has no > overload that supports custom charsets. We should probably document both on > this FD and that constructor. FYI, FileInputStream is an InputStream so reading bytes

Re: Unnecessary logic is added to removeFirst and removeLast of ArrayList.

2025-05-11 Thread Chen Liang
> where the generated assembly code by the JITs is checked by humans Is it? I have heard anecdotes that it is still slower than direct array usage, presumably due to the modCount tracking mechanism. Don't know if escape analysis and the resulting stack allocation in the compiled code eliminates

Re: RFR: 8356420: Provide examples on wrapping System.in [v3]

2025-05-11 Thread Chen Liang
On Fri, 9 May 2025 21:29:09 GMT, Naoto Sato wrote: >> With the introduction of `stdin.encoding` >> ([JDK-8350703](https://bugs.openjdk.org/browse/JDK-8350703)), some guidance >> for users to decode `System.in` would be desirable. Adding examples in the >> field description would help. > > Naot

Re: RFR: 8354674: AArch64: Intrinsify Unsafe::setMemory [v2]

2025-05-11 Thread SendaoYan
On Fri, 9 May 2025 15:39:35 GMT, Andrew Haley wrote: >> This intrinsic is generally faster than the current implementation for >> Panama segment operations for all writes larger than about 8 bytes in size, >> increasing to more than 2* the performance on larger memory blocks on >> Graviton 2,

Re: Unnecessary logic is added to removeFirst and removeLast of ArrayList.

2025-05-11 Thread Remi Forax
> From: "임민수" > To: "core-libs-dev" > Sent: Friday, May 9, 2025 10:33:30 AM > Subject: Unnecessary logic is added to removeFirst and removeLast of > ArrayList. > Hi. > In removeFirst, if size is not 0, the logic is the same as the remove logic. > removeLast also has the same logic as remove w

Re: ArrayList print capacity

2025-05-11 Thread Remi Forax
Hello, this is not an overlook, the less you expose (make public), the easier it is to change the implementation in the future. Also, the collection API was design to avoid (if possible) to have more public methods in the implementation (ArrayList) than you have in the interface (List). So

Re: RFR: 8355393: Create a Test case to have special cases coverage for currency.getInstance() [v2]

2025-05-11 Thread Abhishek N
> Create a Test case to have special cases coverage for currency.getInstance(). > > The test Validates that all currency codes and country-currency mappings in > the input file are consistent with the Java Currency API. > > test results: > > jdk-24.0.2/bin/java -jar jtreg/lib/jtreg.jar -testjdk

ArrayList print capacity

2025-05-11 Thread 임민수
Hi It seems that there is no code to print Capacity in ArrayList. Vector, a friend of ArrayList, can be printed through capacity(). I want to add code to print Capacity of ArrayList as elementData.length. Thank you.