Re: RFR: 8354774: DocumentBuilderFactory getAttribute throws NPE [v2]

2025-04-21 Thread Andrey Turbanov
On Fri, 18 Apr 2025 21:26:23 GMT, Joe Wang wrote: >> Fix a NPE on calling DocumentBuilderFactory::getAttribute, refer to the bug >> report. >> >> Also in this patch: consolidates get and set properties to use the same Util >> methods to reduce potential errors when code changes. >> >> Test: >

Re: RFR: 8354724: BufferedReader readAllLines and readString methods [v6]

2025-04-21 Thread Andrey Turbanov
On Fri, 18 Apr 2025 20:10:32 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: Remove unused import test/jdk/java/io/Buffer

Re: RFR: 8298783: java/lang/ref/FinalizerHistogramTest.java failed with "RuntimeException: MyObject is not found in test output" [v4]

2025-04-05 Thread Andrey Turbanov
On Fri, 28 Mar 2025 01:08:42 GMT, Brent Christian wrote: >> I propose some cleanups to `FinalizerHistogramTest.java` to hopefully clear >> up the intermittent failures: >> >> * run with `othervm`: this test blocks the (global) finalizer thread, and >> also requires the (global) finalizer threa

RFR: 8351344: Avoid explicit Objects.requireNonNull in String.join

2025-03-11 Thread Andrey Turbanov
We have helpful NPE messages now - they are more user-friendly. And shorter methods are more likely to be inlined. - Commit messages: - [PATCH] Avoid explicit Objects.requireNonNull where we know implicit NPE will happen - [PATCH] Avoid explicit Objects.requireNonNull where we know

Re: RFR: 8351344: Avoid explicit Objects.requireNonNull in String.join

2025-03-11 Thread Andrey Turbanov
On Thu, 6 Mar 2025 12:38:01 GMT, Jaikiran Pai wrote: >> We have helpful NPE messages now - they are more user-friendly. >> And shorter methods are more likely to be inlined. > > src/java.base/share/classes/java/lang/String.java line 3649: > >> 3647: Iterable elements) { >> 3648:

Re: RFR: 8351344: Avoid explicit Objects.requireNonNull in String.join

2025-03-06 Thread Andrey Turbanov
On Thu, 20 Feb 2025 09:30:02 GMT, Andrey Turbanov wrote: > We have helpful NPE messages now - they are more user-friendly. > And shorter methods are more likely to be inlined. While having prerequirements checks often is good, I think not having it in String.join can be a good th

Re: RFR: 8341641: Make %APPDATA% and %LOCALAPPDATA% env variables available in *.cfg files

2025-03-06 Thread Andrey Turbanov
On Wed, 5 Mar 2025 21:13:44 GMT, Alexey Semenyuk wrote: > jpackage app laucnher will expand environment variables in .cfg files. > > Previously jpackage app launcher only replaced `$APPDIR`, `$BINDIR`, and > `$ROOTDIR` tokens with the corresponding path values. With this patch, any > environme

Re: RFR: 8348986: Improve coverage of enhanced exception messages [v2]

2025-03-06 Thread Andrey Turbanov
On Thu, 6 Mar 2025 10:46:11 GMT, Michael McMahon wrote: >> Hi, >> >> Enhanced exception messages are designed to hide sensitive information such >> as hostnames, IP >> addresses from exception message strings, unless the enhanced mode for the >> specific category >> has been explicitly enabl

Re: RFR: 8350049: [JMH] Float16OperationsBenchmark fails java.lang.NoClassDefFoundError

2025-02-18 Thread Andrey Turbanov
On Fri, 14 Feb 2025 02:23:40 GMT, SendaoYan wrote: > Hi all, > > The newly added JMH tests > 'org.openjdk.bench.jdk.incubator.vector.VectorMultiplyOptBenchmark' fails > "java.lang.NoClassDefFoundError: jdk/incubator/vector/Float16" by below test > command: > > > make test MICRO="FORK=1;WARM

Re: RFR: 8349000: Performance improvement for Currency.isPastCutoverDate(String) [v3]

2025-02-03 Thread Andrey Turbanov
On Mon, 3 Feb 2025 18:58:57 GMT, Justin Lu wrote: >> Please review this PR which improves the performance of cut-over date >> checking when the user supplies a properties override via the >> `java.util.currency.data` sys prop. Replacing the `SimpleDateFormat` with a >> _java.time_ alternative

Re: RFR: 8349000: Performance improvement for Currency.isPastCutoverDate(String) [v2]

2025-02-03 Thread Andrey Turbanov
On Fri, 31 Jan 2025 19:46:37 GMT, Justin Lu wrote: >> Please review this PR which improves the performance of cut-over date >> checking when the user supplies a properties override via the >> `java.util.currency.data` sys prop. Replacing the `SimpleDateFormat` with a >> _java.time_ alternative

Integrated: 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily

2025-01-24 Thread Andrey Turbanov
On Tue, 16 Jan 2024 10:19:44 GMT, Andrey Turbanov wrote: > There are 3 methods in `java.util.TimeZone` which are `public static` and > marked as `synchronized`: > 1. getTimeZone(String) > 2. getAvailableIDs(int) > 3. getAvailableIDs() > > This means it is a bottle neck for

Re: RFR: 8347955: TimeZone methods to stream the available timezone IDs [v3]

2025-01-24 Thread Andrey Turbanov
On Thu, 23 Jan 2025 22:48:17 GMT, Chen Liang wrote: >> Right, it can be removed. Actually, I think `getAvailableIDs()` and >> `getAvailableIDs(int)` also do not need to be synchronized. The internal IDs >> are eagerly initialized in the static block of `ZoneInfoFile.java` and are >> effectivel

Re: RFR: 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily [v2]

2025-01-16 Thread Andrey Turbanov
ementation and concluded that `synchronized` is > unnecessary. Andrey Turbanov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: - Merge remote-tracking branch 'refs/remotes/origin/master' into JDK-8291027-TimeZone-sy

Re: RFR: 8346468: SM cleanup of common test library [v3]

2025-01-10 Thread Andrey Turbanov
On Wed, 18 Dec 2024 21:07:14 GMT, Roger Riggs wrote: >> SM Cleanup of common test library test/lib/...: >> >> Remove unnecessary catches of SecurityException >> Remove AccessController and doPrivileged from SimpleSSLContext and >> ProcessTools. > > Roger Riggs has updated the pull request incre

Re: RFR: 8346986: Remove ASM from java.base [v3]

2025-01-09 Thread Andrey Turbanov
On Thu, 9 Jan 2025 08:40:37 GMT, Adam Sotona wrote: >> There are no more consumers of ASM library except for hotspot tests. >> This patch moves ASM library from java.base module to the hotspot test >> libraries location and fixes the tests. >> >> Please review. >> >> Thanks, >> Adam > > Adam S

Re: RFR: 8345668: ZoneOffset.ofTotalSeconds performance regression [v4]

2025-01-02 Thread Andrey Turbanov
On Thu, 2 Jan 2025 18:11:53 GMT, Naoto Sato wrote: >> The change made in >> [JDK-8288723](https://bugs.openjdk.org/browse/JDK-8288723) seems innocuous, >> but it caused this performance regression. Partially reverting the change >> (ones that involve `computeIfAbsent()`) to the original. Provi

Re: RFR: 8345668: ZoneOffset.ofTotalSeconds performance regression [v4]

2025-01-02 Thread Andrey Turbanov
On Thu, 2 Jan 2025 18:11:53 GMT, Naoto Sato wrote: >> The change made in >> [JDK-8288723](https://bugs.openjdk.org/browse/JDK-8288723) seems innocuous, >> but it caused this performance regression. Partially reverting the change >> (ones that involve `computeIfAbsent()`) to the original. Provi

Re: RFR: 8345668: ZoneOffset.ofTotalSeconds performance regression [v3]

2024-12-26 Thread Andrey Turbanov
On Thu, 26 Dec 2024 16:39:58 GMT, Brett Okken wrote: >> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixed compile error > > src/java.base/share/classes/java/time/format/DateTimeTextProvider.java line > 316: > >> 314:

Re: RFR: 8342103: C2 compiler support for Float16 type and associated scalar operations [v5]

2024-12-19 Thread Andrey Turbanov
On Tue, 17 Dec 2024 11:09:09 GMT, Jatin Bhateja wrote: >> Hi All, >> >> This patch adds C2 compiler support for various Float16 operations added by >> [PR#22128](https://github.com/openjdk/jdk/pull/22128) >> >> Following is the summary of changes included with this patch:- >> >> 1. Detection

Re: RFR: 8344246: Unnecessary Hashtable usage in EventSupport.notifiers

2024-12-08 Thread Andrey Turbanov
On Tue, 5 Nov 2024 08:28:10 GMT, Andrey Turbanov wrote: > The field `com.sun.jndi.ldap.EventSupport#notifiers` is always accessed under > `lock`. It means extra synchronization from `Hashtable` is not needed. > Subtle difference in Hashtable vs Hashmap behavior is that Hashtabl

Re: RFR: 8344235: Revisit SecurityManager usage in java.logging after JEP 486 and JEP 491 integration [v2]

2024-12-04 Thread Andrey Turbanov
On Thu, 21 Nov 2024 10:24:28 GMT, Daniel Fuchs wrote: >> This PR remove usage of SecurityManager, doPrivileges, etc... from >> `java.logging` and `java.base/jdk.internal.logger` >> >> Only notable hack - Logger.checkPermission() no longer checks permissions, >> but has been renamed into `ensur

Re: RFR: 8344587: Reduce number of "jdk.jpackage.internal" classes used from other packages

2024-11-21 Thread Andrey Turbanov
On Tue, 19 Nov 2024 22:31:28 GMT, Alexey Semenyuk wrote: > Stop using internal AppImageFile, ApplicationLayout, and PackageFile classes > in the tests. Replace them with stubs. > > Stop referencing IOUtils class from XmlUtils and PathUtils classes. test/jdk/tools/jpackage/helpers/jdk/jpackage/

Re: RFR: 8344337: SecurityManager cleanup in java.prefs module [v5]

2024-11-20 Thread Andrey Turbanov
On Wed, 20 Nov 2024 22:43:44 GMT, Brent Christian wrote: >> Remove usages of SecurityManager, doPrivildged, and AccessController from >> the java.prefs module. > > Brent Christian has updated the pull request incrementally with one > additional commit since the last revision: > > indentation

Re: RFR: 8344337: SecurityManager cleanup in java.prefs module [v5]

2024-11-20 Thread Andrey Turbanov
On Wed, 20 Nov 2024 22:43:44 GMT, Brent Christian wrote: >> Remove usages of SecurityManager, doPrivildged, and AccessController from >> the java.prefs module. > > Brent Christian has updated the pull request incrementally with one > additional commit since the last revision: > > indentation

Re: RFR: 8344248: Remove Security Manager dependencies from java.security.jgss and jdk.security.jgss modules

2024-11-20 Thread Andrey Turbanov
On Tue, 19 Nov 2024 20:43:25 GMT, Sean Mullan wrote: > Now that JEP 486 has been integrated, `java.security.jgss` and > `jdk.security.jgss` module dependencies on `System.getSecurityManager` and > `AccessController.doPrivileged*` can be removed. > > There is an undocumented property named "sun

RFR: 8344246: Unnecessary Hashtable usage in EventSupport.notifiers

2024-11-14 Thread Andrey Turbanov
The field `com.sun.jndi.ldap.EventSupport#notifiers` is always accessed under `lock`. It means extra synchronization from `Hashtable` is not needed. Subtle difference in Hashtable vs Hashmap behavior is that Hashtable doesn't allow `null` keys and `null` values. I've checked all usages of it - on

Integrated: 8344023: Unnecessary Hashtable usage in LdapClient.defaultBinaryAttrs

2024-11-13 Thread Andrey Turbanov
On Tue, 5 Nov 2024 12:49:04 GMT, Andrey Turbanov wrote: > Content of Hashtable `com.sun.jndi.ldap.LdapClient#defaultBinaryAttrs` is > fully initialized in `` block. > It means we can replace legacy synchronized `Hashtable` with immutable set. This pull request has now been i

Re: RFR: 8344023: Unnecessary Hashtable usage in LdapClient.defaultBinaryAttrs

2024-11-13 Thread Andrey Turbanov
On Tue, 5 Nov 2024 12:49:04 GMT, Andrey Turbanov wrote: > Content of Hashtable `com.sun.jndi.ldap.LdapClient#defaultBinaryAttrs` is > fully initialized in `` block. > It means we can replace legacy synchronized `Hashtable` with immutable set. I run `com/sun/jndi` tests on my win x64.

Math.toIntExact why only long?

2024-11-13 Thread Andrey Turbanov
I wounder, why java.lang.Math.toIntExact accepts only long parameter? I think it will quite useful to have it with float/double parameters too. Andrey Turbanov

Re: RFR: 8344034: Remove security manager dependency in Serialization [v3]

2024-11-12 Thread Andrey Turbanov
On Tue, 12 Nov 2024 21:59:43 GMT, Roger Riggs wrote: >> After [JDK-8338411](https://bugs.openjdk.org/browse/JDK-8338411), >> Serialization implementation dependencies on SecurityManager, doPrivildged, >> and AccessController are removed. >> Some refactoring to cleanup the remaining code is expe

Re: RFR: 8343984: Fix Unsafe address overflow [v7]

2024-11-12 Thread Andrey Turbanov
On Tue, 12 Nov 2024 16:30:12 GMT, Shaojin Wen wrote: >> In the JDK code, there are some places that may cause Unsafe offset >> overflow. The probability of occurrence is low, but if it occurs, it will >> cause JVM crash. > > Shaojin Wen has updated the pull request incrementally with one additi

Re: RFR: 8343958: Remove security manager impl in java.lang.Process and java.lang.Runtime.exec [v3]

2024-11-12 Thread Andrey Turbanov
On Tue, 12 Nov 2024 18:05:46 GMT, Roger Riggs wrote: >> Refactor removing the dependencies on SecurityManager, doPrivileged, and >> AccessController. > > Roger Riggs has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains 228 commits: > >

RFR: 8344023: Unnecessary Hashtable usage in LdapClient.defaultBinaryAttrs

2024-11-12 Thread Andrey Turbanov
Content of Hashtable `com.sun.jndi.ldap.LdapClient#defaultBinaryAttrs` is fully initialized in `` block. It means we can replace legacy synchronized `Hashtable` with immutable set. - Commit messages: - [PATCH] Unnecessary Hashtable usage in LdapClient.defaultBinaryAttrs Changes: ht

Can LinkedHashMap(accessOrder=true) be guarded by ReadWriteLock ?

2024-11-07 Thread Andrey Turbanov
ps, merely querying the map with get is a structural modification." As I understand, it means that LinkedHashMap.get can't be guarded _just_ by ReadLock. Is my assumption correct? Andrey Turbanov

Re: RFR: 8342693: Use byte[] as parameter in a FDBigInteger constructor and as field

2024-11-06 Thread Andrey Turbanov
On Mon, 21 Oct 2024 14:25:06 GMT, Raffaello Giulietti wrote: > This helps in reducing memory consumption, especially for long inputs. src/java.base/share/classes/jdk/internal/math/FloatingDecimal.java line 1875: > 1873: } // look for and process decimal floating-point string > 187

Re: RFR: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning

2024-11-06 Thread Andrey Turbanov
On Thu, 17 Oct 2024 14:28:30 GMT, Patricio Chilano Mateo wrote: > This is the implementation of JEP 491: Synchronize Virtual Threads without > Pinning. See [JEP 491](https://bugs.openjdk.org/browse/JDK-8337395) for > further details. > > In order to make the code review easier the changes hav

Re: RFR: 8343342: java/io/File/GetXSpace.java fails on Windows with CD-ROM drive

2024-11-01 Thread Andrey Turbanov
On Thu, 31 Oct 2024 07:15:16 GMT, Taizo Kurashige wrote: > To resolve java/io/File/GetXSpace.java failure, I fix libGetXSpace.c to use > Cygwin’s `df` to get the size for comparison if the test target drive is a > CD-ROM drive. > > As described in JDK-8343342, GetDiskSpaceInformationW can't g

Re: RFR: 8331497: Implement JEP 483: Ahead-of-Time Class Loading & Linking [v4]

2024-10-28 Thread Andrey Turbanov
On Thu, 24 Oct 2024 03:01:54 GMT, Ioi Lam wrote: >> This is an implementation of [JEP 483: Ahead-of-Time Class Loading & >> Linking](https://openjdk.org/jeps/483). >> >> >> Note: this is a combined PR of the following individual PRs >> - https://github.com/openjdk/jdk/pull/20516 >> - https

Re: RFR: 8342958: Use jvmArgs consistently in microbenchmarks

2024-10-28 Thread Andrey Turbanov
On Thu, 24 Oct 2024 13:52:57 GMT, Claes Redestad wrote: > Many OpenJDK micros use `@Fork(jvmArgs/-Append/-Prepend)` to add JVM > reasonable or necessary flags, but when deploying and running micros we often > want to add or replace flags to tune to the machine, test different GCs, etc. > The i

Integrated: 8342083: Make a few fields in FileSystemPreferences final

2024-10-26 Thread Andrey Turbanov
On Mon, 23 Sep 2024 09:13:58 GMT, Andrey Turbanov wrote: > 8342083: Make a few fields in FileSystemPreferences final This pull request has now been integrated. Changeset: 0e3fc93d Author: Andrey Turbanov URL: https://git.openjdk.org/jdk/com

Re: RFR: 8338383: Implementation of Synchronize Virtual Threads without Pinning

2024-10-21 Thread Andrey Turbanov
On Thu, 17 Oct 2024 14:28:30 GMT, Patricio Chilano Mateo wrote: > This is the implementation of JEP 491: Synchronize Virtual Threads without > Pinning. See [JEP 491](https://bugs.openjdk.org/browse/JDK-8337395) for > further details. > > In order to make the code review easier the changes hav

Re: RFR: 8341260: Add Float16 to jdk.incubator.vector [v2]

2024-10-21 Thread Andrey Turbanov
On Sun, 20 Oct 2024 18:59:36 GMT, Joe Darcy wrote: >> Port of Float16 from java.lang in the lworld+fp16 branch to >> jdk.incubabor.vector. > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Remove comments for intrinsics per rev

RFR: 8342083: Make a few fields in FileSystemPreferences final

2024-10-14 Thread Andrey Turbanov
8342083: Make a few fields in FileSystemPreferences final - Commit messages: - [PATCH] Make a few fields in FileSystemPreferences final Changes: https://git.openjdk.org/jdk/pull/21131/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21131&range=00 Issue: https://bugs.openj

Re: RFR: 8341470: BigDecimal.stripTrailingZeros() optimization [v35]

2024-10-11 Thread Andrey Turbanov
On Thu, 10 Oct 2024 20:36:26 GMT, fabioromano1 wrote: >> An optimized algorithm for `BigDecimal.stripTrailingZeros()` that uses >> repeated squares trick. > > fabioromano1 has updated the pull request incrementally with one additional > commit since the last revision: > > Refining mathematic

Re: RFR: 8293336: AOT-linking of invokedynamic for lambda expression and string concat

2024-10-08 Thread Andrey Turbanov
On Mon, 23 Sep 2024 18:45:49 GMT, Ioi Lam wrote: > This is the 7th and final PR for [JEP 483: Ahead-of-Time Class Loading & > Linking](https://bugs.openjdk.org/browse/JDK-8315737). > > This PR implements the AOT-linking of invokedynamic callsites: > - We only link lambda expressions (`LambdaMet

Re: RFR: 8338918: Remove non translated file name from WinResources resource bundle [v2]

2024-09-20 Thread Andrey Turbanov
On Fri, 20 Sep 2024 02:53:00 GMT, Alexey Semenyuk wrote: >> Move `resource.wxl-file-name` property from `WinResources.properties` files >> to the new `WinResourcesNoL10N.properties` files. The later are supposed to >> be excluded from automatic translations. > > Alexey Semenyuk has updated the

Re: RFR: 8338694: x86_64 intrinsic for tanh using libm [v4]

2024-09-13 Thread Andrey Turbanov
On Wed, 11 Sep 2024 00:29:30 GMT, Srinivas Vamsi Parasa wrote: >> The goal of this PR is to implement an x86_64 intrinsic for >> java.lang.Math.tanh() using libm >> >> Benchmark (ops/ms) | Stock JDK | Tanh intrinsic | Speedup >> -- | -- | -- | -- >> MathBench.tanhDouble | 70900 | 95618 | 1.35x

Re: RFR: 8325397: sun/java2d/Disposer/TestDisposerRace.java fails in linux-aarch64

2024-09-03 Thread Andrey Turbanov
On Thu, 29 Aug 2024 17:06:19 GMT, Andrey Turbanov wrote: >> My suspicion is that Condition::await() throws before having successfully >> reacquired the lock, and this exception is swallowed because Lock::unlock() >> then throws when invoke with an IllegalMonitorStateExcept

Re: RFR: 8325397: sun/java2d/Disposer/TestDisposerRace.java fails in linux-aarch64

2024-09-03 Thread Andrey Turbanov
On Thu, 15 Aug 2024 18:22:54 GMT, Viktor Klang wrote: > My suspicion is that Condition::await() throws before having successfully > reacquired the lock, and this exception is swallowed because Lock::unlock() > then throws when invoke with an IllegalMonitorStateException as the current > thread

Re: RFR: 8339132: Make DirectCodeBuilder write through without allocating instruction objects

2024-08-28 Thread Andrey Turbanov
On Wed, 28 Aug 2024 01:49:21 GMT, Chen Liang wrote: > Make `DirectCodeBuilder` write instructions actually directly without > allocating extra objects. This speed up a lot of simple Class-File building > cases that never go through intermediate transforms. src/java.base/share/classes/java/lang

Re: RFR: 8338765: ScheuledThreadPoolExecutor struggles with extremely long delays

2024-08-27 Thread Andrey Turbanov
On Tue, 20 Aug 2024 18:52:23 GMT, Viktor Klang wrote: > Unfortunately there is no good, deterministic reproducer which can be used as > a regression test at this point in time. There is now typo in interface name. `ScheuledThreadPoolExecutor` -> `ScheduledThreadPoolExecutor` - PR

Re: RFR: 8338021: Support saturating vector operators in VectorAPI [v3]

2024-08-17 Thread Andrey Turbanov
On Wed, 14 Aug 2024 04:59:23 GMT, Jatin Bhateja wrote: >> Hi All, >> >> As per the discussion on panama-dev mailing list[1], patch adds the support >> following new vector operators. >> >> >> . SUADD : Saturating unsigned addition. >> . SADD: Saturating signed addition. >>

Re: RFR: 8338023: Support two vector selectFrom API

2024-08-17 Thread Andrey Turbanov
On Thu, 8 Aug 2024 06:57:28 GMT, Jatin Bhateja wrote: > Hi All, > > As per the discussion on panama-dev mailing list[1], patch adds the support > for following new two vector permutation APIs. > > > Declaration:- > Vector.selectFrom(Vector v1, Vector v2) > > > Semantics:- > Using in

Integrated: 8337839: Make a few fields in MergeCollation static

2024-08-16 Thread Andrey Turbanov
On Thu, 25 Jul 2024 08:59:17 GMT, Andrey Turbanov wrote: > 3 fields in java.text.MergeCollation could be made 'static': > 1. BITARRAYMASK > 2. BYTEPOWER > 3. BYTEMASK This pull request has now been integrated. Changeset: 60c9b5cd Author:Andrey Turbanov URL: h

Integrated: 8337840: Remove redundant null check in ObjectOutputStream.writeProxyDesc

2024-08-09 Thread Andrey Turbanov
On Fri, 26 Jul 2024 13:09:19 GMT, Andrey Turbanov wrote: > There is implicit null check in line before. > > https://github.com/openjdk/jdk/blob/431d4f7e18369466eedd00926a5162a1461d0b25/src/java.base/share/classes/java/io/ObjectOutputStream.java#L1267-L1277 > > 'cl'

Re: RFR: 8337840: Remove redundant null check in ObjectOutputStream.writeProxyDesc

2024-08-09 Thread Andrey Turbanov
On Fri, 26 Jul 2024 13:09:19 GMT, Andrey Turbanov wrote: > There is implicit null check in line before. > > https://github.com/openjdk/jdk/blob/431d4f7e18369466eedd00926a5162a1461d0b25/src/java.base/share/classes/java/io/ObjectOutputStream.java#L1267-L1277 > > 'cl'

Re: RFR: 8337838: Remove unused methods from ChronoLocalDateImpl

2024-08-06 Thread Andrey Turbanov
On Tue, 6 Aug 2024 19:46:02 GMT, Roger Riggs wrote: >> A few methods in `java.time.chrono.ChronoLocalDateImpl` are unused and could >> be removed: >> 1. plusWeeks(long) >> 2. minusYears(long) >> 3. minusMonths(long) >> 4. minusWeeks(long) >> 5. minusDays(long) >> >> Tested `test/jdk/java/time`

RFR: 8337840: Remove redundant null check in ObjectOutputStream.writeProxyDesc

2024-08-05 Thread Andrey Turbanov
There is implicit null check in line before. https://github.com/openjdk/jdk/blob/431d4f7e18369466eedd00926a5162a1461d0b25/src/java.base/share/classes/java/io/ObjectOutputStream.java#L1267-L1277 'cl' can't be null after that. - Commit messages: - [PATCH] Remove redundant null check

RFR: 8337839: Make a few fields in MergeCollation static

2024-08-05 Thread Andrey Turbanov
3 fields in java.text.MergeCollation could be made 'static': 1. BITARRAYMASK 2. BYTEPOWER 3. BYTEMASK - Commit messages: - [PATCH] Make a few fields in MergeCollation static Changes: https://git.openjdk.org/jdk/pull/20323/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=2032

RFR: 8337838: Remove unused methods from ChronoLocalDateImpl

2024-08-05 Thread Andrey Turbanov
A few methods in `java.time.chrono.ChronoLocalDateImpl` are unused and could be removed: 1. plusWeeks(long) 2. minusYears(long) 3. minusMonths(long) 4. minusWeeks(long) 5. minusDays(long) Tested `test/jdk/java/time` on Linux x64 release - Commit messages: - [PATCH] Remove unused me

Re: RFR: 8337225: Demote maxStack and maxLocals from CodeModel to CodeAttribute [v3]

2024-07-29 Thread Andrey Turbanov
On Mon, 29 Jul 2024 02:22:11 GMT, Chen Liang wrote: >> As discussed in offline meeting, the max stack and locals information are >> part of the code attribute and not meaningful for buffered code elements. >> Computation would be costly and these see no real usage during >> transformations. Th

Re: RFR: 8336754: Remodel TypeAnnotation to "has" instead of "be" an Annotation [v6]

2024-07-24 Thread Andrey Turbanov
On Wed, 24 Jul 2024 13:00:47 GMT, Chen Liang wrote: >> `TypeAnnotation` is not an annotation, as it should not be used in places >> like `AnnotationValue.ofAnnotation`. Thus it's remodeled to contain an >> annotation at a given location instead of to be an annotation. >> >> Depends on #20205.

Re: RFR: 8336847: Use pattern match switch in NumberFormat classes [v2]

2024-07-24 Thread Andrey Turbanov
On Tue, 23 Jul 2024 20:54:08 GMT, Justin Lu wrote: >> As discussed in >> https://github.com/openjdk/jdk/pull/19513#discussion_r1684957942, there is >> code within java.text.NumberFormat (and subclasses) that can use the pattern >> match switch to improve readability. >> >> As this is simply c

Re: RFR: 8315884: New Object to ObjectMonitor mapping [v9]

2024-07-19 Thread Andrey Turbanov
On Mon, 15 Jul 2024 00:50:30 GMT, Axel Boldt-Christmas wrote: >> When inflating a monitor the `ObjectMonitor*` is written directly over the >> `markWord` and any overwritten data is displaced into a displaced >> `markWord`. This is problematic for concurrent GCs which needs extra care or >> l

Re: RFR: 8336254: Virtual thread implementation + test updates

2024-07-19 Thread Andrey Turbanov
On Thu, 11 Jul 2024 17:30:21 GMT, Alan Bateman wrote: > Bringover some of the changes accumulated in the loom repo to the main line, > most of these changes are test updates and have been baking in the loom repo > for several months. The motive is partly to reduce the large set of changes > th

Re: RFR: 8336300: DateFormatSymbols#getInstanceRef returns non-cached instance [v2]

2024-07-17 Thread Andrey Turbanov
On Tue, 16 Jul 2024 16:54:09 GMT, Naoto Sato wrote: >> Removing a redundant private method, which has the same implementation with >> the public sibling and obsolete method description. > > Naoto Sato has updated the pull request incrementally with one additional > commit since the last revisio

Re: [jdk23] RFR: 8334653: ISO 4217 Amendment 177 Update

2024-07-12 Thread Andrey Turbanov
On Wed, 10 Jul 2024 22:08:47 GMT, Justin Lu wrote: >Please review this PR, which is a backport of commit >[86b0cf25](https://github.com/openjdk/jdk/commit/86b0cf259fb3cbe3a1973151148e5d36c6a99d91) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. This message is kind of confusin

Re: RFR: 8335182: Consolidate and streamline String concat code shapes [v2]

2024-07-09 Thread Andrey Turbanov
On Fri, 28 Jun 2024 12:39:32 GMT, Claes Redestad wrote: >> This PR attains a speed-up on some microbenchmarks by simplifying how we >> build up the MH combinator tree shape >> (only use prependers with prefix, always add a suffix to the newArray >> combinator), then simplifying/inlining some of

Re: RFR: 8334333: MissingResourceCauseTestRun.java fails if run by root [v2]

2024-06-17 Thread Andrey Turbanov
On Tue, 18 Jun 2024 02:00:41 GMT, SendaoYan wrote: >> Hi all, >> Testcase >> `test/jdk/java/util/ResourceBundle/Control/MissingResourceCauseTestRun.java` >> run fails with root user privileged. I think it's necessary to skip this >> testcase when user is root. >> Why run the jtreg test by root

Re: RFR: 8333867: SHA3 performance can be improved [v2]

2024-06-13 Thread Andrey Turbanov
On Wed, 12 Jun 2024 14:08:43 GMT, Ferenc Rakoczi wrote: >> This PR removes some unnecessary conversions between byte arrays and long >> arrays during SHA3 digest computations. > > Ferenc Rakoczi has updated the pull request incrementally with one additional > commit since the last revision: >

Re: RFR: 8332490: JMH org.openjdk.bench.java.util.zip.InflaterInputStreams.inflaterInputStreamRead OOM

2024-05-21 Thread Andrey Turbanov
On Wed, 22 May 2024 05:16:42 GMT, Jaikiran Pai wrote: > Can I please get a review of this test-only change for addressing > https://bugs.openjdk.org/browse/JDK-8332490? > > The jmh test opens a `InflaterInputStream`, reads the stream contents, but > then doesn't close the stream. This can lead

Re: RFR: 8305457: Implement java.io.IO [v10]

2024-05-21 Thread Andrey Turbanov
On Tue, 21 May 2024 21:16:52 GMT, Pavel Rappo wrote: >> src/java.base/share/classes/jdk/internal/io/JdkConsoleImpl.java line 78: >> >>> 76: String line = null; >>> 77: synchronized (writeLock) { >>> 78: synchronized(readLock) { >> >> Suggestion: >> >> sy

Re: RFR: 8305457: Implement java.io.IO [v10]

2024-05-21 Thread Andrey Turbanov
On Tue, 21 May 2024 15:44:18 GMT, Pavel Rappo wrote: >> Please review this PR which introduces the `java.io.IO` top-level class and >> three methods to `java.io.Console` for [Implicitly Declared Classes and >> Instance Main Methods (Third Preview)]. >> >> This PR has been obtained as `git merg

Re: RFR: JDK-8327474 Review use of java.io.tmpdir in jdk tests [v3]

2024-03-26 Thread Andrey Turbanov
On Thu, 21 Mar 2024 17:13:46 GMT, Bill Huang wrote: >> This task addresses an essential aspect of our testing infrastructure: the >> proper handling and cleanup of temporary files and socket files created >> during test execution. The motivation behind these changes is to prevent the >> accumu

Re: RFR: JDK-8327640: Allow NumberFormat strict parsing [v2]

2024-03-19 Thread Andrey Turbanov
On Tue, 19 Mar 2024 00:07:37 GMT, Justin Lu wrote: >> Please review this PR and associated >> [CSR](https://bugs.openjdk.org/browse/JDK-8327703) which introduces strict >> parsing for NumberFormat. >> >> The concrete subclasses that will utilize this leniency value are >> `DecimalFormat` and

Re: RFR: 8327994: Update code gen in CallGeneratorHelper [v2]

2024-03-16 Thread Andrey Turbanov
l request incrementally with one additional > commit since the last revision: > > Delete extra space > > Co-authored-by: Andrey Turbanov test/jdk/java/foreign/CallGeneratorHelper.java line 195: > 193: } > 194: > 195: private static void generateStructDecl

Re: RFR: 8327839: Crash with unboxing and widening primitive conversion in switch

2024-03-16 Thread Andrey Turbanov
On Tue, 12 Mar 2024 14:06:11 GMT, Aggelos Biboudis wrote: > In cases where the compiler needs to unbox a `long`, `float`, `double` and > then run the exactness check, we were getting a crash. While the selector > value is always boxed, the type (which controls the execution flow) was not, > b

Re: RFR: JDK-8327487: Further augment WorstCaseTests with more cases [v3]

2024-03-12 Thread Andrey Turbanov
On Mon, 11 Mar 2024 17:17:21 GMT, Joe Darcy wrote: >> The atan2 and hypot cases added would fail for a particular test library >> that has errors in the millions of ulps for those inputs, rather than the >> small number of ulps specified for the error. > > Joe Darcy has updated the pull request

Re: RFR: JDK-8327487: Further augment WorstCaseTests with more cases [v2]

2024-03-11 Thread Andrey Turbanov
On Wed, 6 Mar 2024 20:49:55 GMT, Joe Darcy wrote: >> The atan2 and hypot cases added would fail for a particular test library >> that has errors in the millions of ulps for those inputs, rather than the >> small number of ulps specified for the error. > > Joe Darcy has updated the pull request

Re: RFR: 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily

2024-03-05 Thread Andrey Turbanov
On Tue, 16 Jan 2024 10:19:44 GMT, Andrey Turbanov wrote: > There are 3 methods in `java.util.TimeZone` which are `public static` and > marked as `synchronized`: > 1. getTimeZone(String) > 2. getAvailableIDs(int) > 3. getAvailableIDs() > > This means it is a bottle neck for

Re: RFR: 8174269: Remove COMPAT locale data provider from JDK

2024-02-24 Thread Andrey Turbanov
On Fri, 23 Feb 2024 21:24:10 GMT, Naoto Sato wrote: > This PR intends to remove the legacy `COMPAT` locale data from the JDK. The > `COMPAT` locale data was introduced for applications' migratory purposes > transitioning to `CLDR`. It is becoming a technical debt and now is the time > to remov

Re: RFR: JDK-8325898: ChoiceFormat returns erroneous result when formatting bad pattern

2024-02-22 Thread Andrey Turbanov
On Thu, 15 Feb 2024 19:44:42 GMT, Justin Lu wrote: > Please review this PR which handles an edge case pattern bug with > ChoiceFormat. > > > var d = new ChoiceFormat("0#foo|1#bar|baz|") // creates cFmt equivalent to > "0.0#foo|1.0#bar|1.0#" > d.format(1) // unexpectedly returns "" > > > Not

Re: RFR: 8325576: java/lang/ProcessHandle/InfoTest.java fails on systems with coreutils with --enable-single-binary [v2]

2024-02-14 Thread Andrey Turbanov
On Tue, 13 Feb 2024 18:03:14 GMT, Dan Lutker wrote: >> Ran the test on AmazonLinux 2 which has multiple binaries from coreutils >> package and no coreutils executable as well as AmazonLinux 2023 that uses >> `--enable-single-binary` > > Dan Lutker has updated the pull request incrementally with

Re: RFR: 8325485: IncrementInstructions.of(int, int) is not storing the args

2024-02-09 Thread Andrey Turbanov
On Thu, 8 Feb 2024 13:18:41 GMT, Adam Sotona wrote: > ClassFile API provides two sets of instructions implementations (bound and > unbound). > Unbound implementation of `IncrementInstruction::constant` returns invalid > value. > This bug discovered a hole in the ClassFile API test coverage. >

Re: RFR: JDK-8318761: MessageFormat pattern support for CompactNumberFormat, ListFormat, and DateTimeFormatter [v3]

2024-02-04 Thread Andrey Turbanov
On Fri, 2 Feb 2024 22:43:28 GMT, Justin Lu wrote: >> Please review this PR and [CSR](https://bugs.openjdk.org/browse/JDK-8319344) >> which adds MessageFormat pattern support for the following subformats: >> ListFormat, CompactNumberFormat, and DateTimeFormatter. This change is >> intended to p

Re: RFR: 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily

2024-01-24 Thread Andrey Turbanov
On Wed, 17 Jan 2024 18:19:18 GMT, Naoto Sato wrote: >> src/java.base/share/classes/java/util/TimeZone.java line 629: >> >>> 627: */ >>> 628: public static String[] getAvailableIDs(int rawOffset) { >>> 629: return ZoneInfo.getAvailableIDs(rawOffset); >> >> BTW can we call `ZoneI

Re: RFR: 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily

2024-01-16 Thread Andrey Turbanov
On Tue, 16 Jan 2024 10:19:44 GMT, Andrey Turbanov wrote: > 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily src/java.base/share/classes/java/util/TimeZone.java line 629: > 627: */ > 628: public static String[] getAvailableIDs(int rawOffset) { &g

RFR: 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily

2024-01-16 Thread Andrey Turbanov
8291027: Some of TimeZone methods marked 'synchronized' unnecessarily - Commit messages: - 8291027: Some of TimeZone methods marked 'synchronized' unnecessarily Changes: https://git.openjdk.org/jdk/pull/17441/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=17441&range=00 I

Re: RFR: 8303866: Allow ZipInputStream.readEnd to parse small Zip64 ZIP files [v12]

2024-01-15 Thread Andrey Turbanov
On Wed, 10 Jan 2024 13:39:52 GMT, Eirik Bjørsnøs wrote: >> ZipInputStream.readEnd currently assumes a Zip64 data descriptor if the >> number of compressed or uncompressed bytes read from the inflater is larger >> than the Zip64 magic value. >> >> While the ZIP format mandates that the data de

Re: RFR: JDK-8320448 Accelerate IndexOf using AVX2 [v7]

2024-01-15 Thread Andrey Turbanov
On Thu, 11 Jan 2024 23:06:32 GMT, Scott Gibbons wrote: >> Re-write the IndexOf code without the use of the pcmpestri instruction, only >> using AVX2 instructions. This change accelerates String.IndexOf on average >> 1.3x for AVX2. The benchmark numbers: >> >> >> Benchmark

Re: RFR: 8320575: generic type information lost on mandated parameters [v10]

2024-01-15 Thread Andrey Turbanov
On Thu, 14 Dec 2023 04:00:58 GMT, Vicente Romero wrote: >> Reflection is not retrieving generic type information for mandated >> parameters. This is a known issue which has been explicitly stated in the >> API of some reflection methods. Fix for >> [JDK-8292275](https://bugs.openjdk.org/browse

Re: RFR: 8313739: ZipOutputStream.close() should always close the wrapped stream [v3]

2024-01-15 Thread Andrey Turbanov
On Tue, 2 Jan 2024 12:21:21 GMT, Eirik Bjørsnøs wrote: >> Please consider this PR which makes `DeflaterOutputStream.close()` always >> close its wrapped output stream exactly once. >> >> Currently, closing of the wrapped output stream happens outside the finally >> block where `finish()` is ca

Re: RFR: 8322768: Optimize non-subword vector compress and expand APIs for AVX2 target. [v5]

2024-01-14 Thread Andrey Turbanov
On Tue, 9 Jan 2024 16:48:56 GMT, Jatin Bhateja wrote: >> Hi, >> >> Patch optimizes non-subword vector compress and expand APIs for x86 AVX2 >> only targets. >> Upcoming E-core Xeons (Sierra Forest) and Hybrid CPUs only support AVX2 >> instruction set. >> These are very frequently used APIs in

Re: RFR: 8323183: ClassFile API performance improvements [v6]

2024-01-14 Thread Andrey Turbanov
On Tue, 9 Jan 2024 13:30:58 GMT, Adam Sotona wrote: >> ClassFile API performance related improvements have been separated from >> #17121 into this PR. >> >> These improvements are important to minimize performance regression of >> 8294961: Convert java.base/java.lang.reflect.ProxyGenerator to u

Re: RFR: 8323659: LinkedTransferQueue add and put methods call overridable offer [v3]

2024-01-14 Thread Andrey Turbanov
On Fri, 12 Jan 2024 15:06:01 GMT, Chris Hegarty wrote: >> Update LinkedTransferQueue add and put methods to not call overridable offer. > > Chris Hegarty has updated the pull request incrementally with one additional > commit since the last revision: > > timed offer src/java.base/share/class

Re: RFR: 8321786: SegmentAllocator:allocateFrom(ValueLayout, MemorySegment, ValueLayout, long, long) spec mismatch in exception scenario [v7]

2023-12-20 Thread Andrey Turbanov
On Tue, 12 Dec 2023 15:45:47 GMT, Per Minborg wrote: >> This PR proposes to change the specification for some methods that take >> `long` offsets so that they will throw an `IllegalArgumentException` rather >> than an `IndexOutOfBoundsException` for negative values. >> >> The PR also proposes

Re: RFR: 8321124: java/util/stream/GatherersTest.java times out [v5]

2023-12-05 Thread Andrey Turbanov
On Tue, 5 Dec 2023 14:55:02 GMT, Viktor Klang wrote: >> Splits GatherersTest out to distinct files per built-in gatherer >> >> Fixes a test ordering issue for mapConcurrent which placed GatherersTest on >> the ProblemList. >> >> Adding increased maxOutputSize for Gatherer-related tests to impr

Re: RFR: JDK-8319413: Start of release updates for JDK 23 [v4]

2023-12-02 Thread Andrey Turbanov
On Thu, 30 Nov 2023 23:49:24 GMT, Joe Darcy wrote: >> Time to start making preparations for JDK 23. > > Joe Darcy has updated the pull request incrementally with one additional > commit since the last revision: > > Update symbol files to JDK 22 b26. test/langtools/tools/javac/versions/Versio

Re: RFR: 8319123: Implement JEP 461: Stream Gatherers (Preview) [v12]

2023-11-30 Thread Andrey Turbanov
On Fri, 17 Nov 2023 18:46:57 GMT, Andrey Turbanov wrote: >> Viktor Klang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Addressing trailing whitespace complaint > > src/java.base/share/classes/java/util/s

  1   2   3   4   >