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

2024-05-22 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

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: >> >>

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

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 >>

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
lly 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(PrintStream out, &

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, >

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

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

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 "" > > >

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

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

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

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) { > 629:

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=17441=00 Issue:

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

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 >>

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

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

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

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

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.

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

Re: RFR: 8306055: Add a built-in Catalog to JDK XML module [v3]

2023-11-22 Thread Andrey Turbanov
On Mon, 20 Nov 2023 17:46:53 GMT, Joe Wang wrote: >> Implement the built-in Catalog. > > Joe Wang has updated the pull request incrementally with one additional > commit since the last revision: > > add a note; fix alignment

Re: RFR: JDK-8319662 ForkJoinPool trims worker threads too slowly [v3]

2023-11-22 Thread Andrey Turbanov
On Tue, 21 Nov 2023 17:12:39 GMT, Doug Lea wrote: >> This update cascades timeouts to trim subsequent workers after the first >> keepAlive inactive period. > > Doug Lea has updated the pull request with a new target base due to a merge > or a rebase. The incremental webrev excludes the

RFR: 8320400: Make fields final in 'jdk.internal.util.xml.impl' package

2023-11-20 Thread Andrey Turbanov
A few classes in `jdk.internal.util.xml.impl` package have non-final fields which could easily be marked `final`. - Commit messages: - [PATCH] Make fields final in jdk.internal.util.xml.impl package Changes: https://git.openjdk.org/jdk/pull/15691/files Webrev:

Integrated: 8316557: Make fields final in 'sun.util' package

2023-11-20 Thread Andrey Turbanov
On Thu, 14 Sep 2023 08:58:56 GMT, Andrey Turbanov wrote: > A few classes in `sun.util` package have non-final fields which could easily > be marked `final`. This pull request has now been integrated. Changeset: 6c5e15c1 Author:Andrey Turbanov URL: https://git.openjdk.o

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

2023-11-17 Thread Andrey Turbanov
On Fri, 17 Nov 2023 13:15:12 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision: > > Addressing trailing whitespace complaint

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

2023-11-17 Thread Andrey Turbanov
On Fri, 17 Nov 2023 13:15:12 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision: > > Addressing trailing whitespace complaint

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

2023-11-17 Thread Andrey Turbanov
On Fri, 17 Nov 2023 13:15:12 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision: > > Addressing trailing whitespace complaint

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

2023-11-17 Thread Andrey Turbanov
On Fri, 17 Nov 2023 13:15:12 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision: > > Addressing trailing whitespace complaint

Re: RFR: 8316557: Make fields final in 'sun.util' package [v2]

2023-11-17 Thread Andrey Turbanov
On Fri, 17 Nov 2023 08:13:05 GMT, Per Minborg wrote: >> src/java.base/share/classes/sun/util/cldr/CLDRCalendarDataProviderImpl.java >> line 48: >> >>> 46: public class CLDRCalendarDataProviderImpl extends >>> CalendarDataProviderImpl { >>> 47: >>> 48: private static final Map firstDays =

Re: RFR: 8316557: Make fields final in 'sun.util' package [v3]

2023-11-16 Thread Andrey Turbanov
> A few classes in `sun.util` package have non-final fields which could easily > be marked `final`. Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8316557: Make fields final in 'sun.util' package "First Day&qu

Re: RFR: 8316557: Make fields final in 'sun.util' package [v2]

2023-11-16 Thread Andrey Turbanov
> A few classes in `sun.util` package have non-final fields which could easily > be marked `final`. Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8316557: Make fields final in 'sun.util' package rename 'fi

Re: RFR: 8316557: Make fields final in 'sun.util' package [v2]

2023-11-16 Thread Andrey Turbanov
On Mon, 13 Nov 2023 11:40:27 GMT, Per Minborg wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8316557: Make fields final in 'sun.util' package >> >> rename 'firstD

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

2023-11-14 Thread Andrey Turbanov
On Tue, 14 Nov 2023 16:35:53 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision: > > Unpacking the rethrown exceptions from

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v4]

2023-11-13 Thread Andrey Turbanov
On Mon, 13 Nov 2023 07:24:24 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision: > > Addressing further review feedback

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v4]

2023-11-13 Thread Andrey Turbanov
On Mon, 13 Nov 2023 07:24:24 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision: > > Addressing further review feedback

Re: RFR: JDK-8319123 : Implementation of JEP-461: Stream Gatherers (Preview) [v4]

2023-11-13 Thread Andrey Turbanov
On Mon, 13 Nov 2023 07:24:24 GMT, Viktor Klang wrote: >> This Pull-Request implements [JEP-461](https://openjdk.org/jeps/461) > > Viktor Klang has updated the pull request incrementally with one additional > commit since the last revision: > > Addressing further review feedback

Re: RFR: 8311906: Improve robustness of String constructors with mutable array inputs [v2]

2023-11-13 Thread Andrey Turbanov
On Thu, 9 Nov 2023 04:16:25 GMT, Roger Riggs wrote: >> Strings, after construction, are immutable but may be constructed from >> mutable arrays of bytes, characters, or integers. >> The string constructors should guard against the effects of mutating the >> arrays during construction that

Re: RFR: 8319820: Use unnamed variables in the FFM implementation

2023-11-13 Thread Andrey Turbanov
On Fri, 10 Nov 2023 07:19:42 GMT, Per Minborg wrote: > This PR proposes to use unnamed variables now that they have become available > in Java. > > There is also a cosmetic cleanup making a switch rake smaller and where > variables are pre-calculated rather than spreading expressions around.

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-11-12 Thread Andrey Turbanov
On Thu, 14 Sep 2023 08:58:56 GMT, Andrey Turbanov wrote: > A few classes in `sun.util` package have non-final fields which could easily > be marked `final`. Can I get a review? - PR Comment: https://git.openjdk.org/jdk/pull/15736#issuecomment-1807066050

Re: RFR: 8254693: Add Panama feature to pass heap segments to native code [v12]

2023-10-26 Thread Andrey Turbanov
On Tue, 24 Oct 2023 15:09:57 GMT, Jorn Vernee wrote: >> Add the ability to pass heap segments to native code. This requires using >> `Linker.Option.critical(true)` as a linker option. It has the same >> limitations as normal critical calls, namely: upcalls into Java are not >> allowed, and

Re: RFR: 8318486: Rename JavaLangAccess.xxNoRepl to xxReportError [v2]

2023-10-26 Thread Andrey Turbanov
On Fri, 20 Oct 2023 02:29:15 GMT, Chen Liang wrote: >> Please review a patch that renames `JavaLangAccess::xxNoRepl` to >> `xxReportError` to explicitly indicate these APIs report encoding errors. >> >> The old "NoRepl" suffix presumably means "No Replacement", but it has been >>

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

2023-10-19 Thread Andrey Turbanov
On Tue, 12 Sep 2023 20:04:54 GMT, Andrey Turbanov wrote: > A field `short _Depth` in the > `jdk.internal.util.xml.impl.XMLStreamWriterImpl.Element` class is unused and > can be removed. This pull request has now been integrated. Changeset: 80bd22d0 Author: Andrey Turb

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

2023-10-18 Thread Andrey Turbanov
On Tue, 12 Sep 2023 20:04:54 GMT, Andrey Turbanov wrote: > A field `short _Depth` in the > `jdk.internal.util.xml.impl.XMLStreamWriterImpl.Element` class is unused and > can be removed. Anyone want to review? I will integrate tomorrow. - PR Comment: https://git.openjd

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers

2023-10-16 Thread Andrey Turbanov
On Sun, 17 Sep 2023 16:01:33 GMT, Shaojin Wen wrote: > @cl4es made performance optimizations for the simple specifiers of > String.format in PR https://github.com/openjdk/jdk/pull/2830. Based on the > same idea, I continued to make improvements. I made patterns like %2d %02d > also be

Re: RFR: 8318124: JFR: Rewrite instrumentation to use Class-File API [v2]

2023-10-16 Thread Andrey Turbanov
On Mon, 16 Oct 2023 05:07:42 GMT, Erik Gahlin wrote: >> Hi, >> >> Could I have a review of an enhancement that replaces the use of ASM with >> the new Class-File API. This change only deals with bytecode that writes >> event data into buffers. Bytecode transformations carried out by classes

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

2023-10-12 Thread Andrey Turbanov
On Tue, 12 Sep 2023 20:04:54 GMT, Andrey Turbanov wrote: > A field `short _Depth` in the > `jdk.internal.util.xml.impl.XMLStreamWriterImpl.Element` class is unused and > can be removed. @JoeWang-Java can I have a review, please? - PR Comment: https://git.openjdk.org

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

2023-09-27 Thread Andrey Turbanov
On Thu, 14 Sep 2023 21:30:39 GMT, Lance Andersen wrote: >Joe is on holiday so please wait for his input as there are some additional >constants that may also be removed. BTW, Who is Joe?  - PR Comment: https://git.openjdk.org/jdk/pull/15692#issuecomment-1737031055

Re: RFR: 8316704: Regex-free parsing of Formatter and FormatProcessor specifiers [v10]

2023-09-27 Thread Andrey Turbanov
On Mon, 25 Sep 2023 14:28:56 GMT, 温绍锦 wrote: >> @cl4es made performance optimizations for the simple specifiers of >> String.format in PR https://github.com/openjdk/jdk/pull/2830. Based on the >> same idea, I continued to make improvements. I made patterns like %2d %02d >> also be optimized.

Re: RFR: 8316557: Make fields final in 'sun.util' package

2023-09-25 Thread Andrey Turbanov
On Mon, 18 Sep 2023 14:41:14 GMT, Chen Liang wrote: >> A few classes in `sun.util` package have non-final fields which could easily >> be marked `final`. > > src/java.base/share/classes/sun/util/PropertyResourceBundleCharset.java line > 71: > >> 69: private final class

Re: RFR: JDK-8316559: Refactor some util/Calendar tests to JUnit

2023-09-22 Thread Andrey Turbanov
On Wed, 20 Sep 2023 23:20:43 GMT, Justin Lu wrote: > Please review this PR which converts some tests under _Calendar_ to use > JUnit. These tests either previously used the internal _IntlTest_, or used no > framework at all. > > Any files named BugXXX.java will be renamed after review.

Re: RFR: JDK-8316435: sun.util.calendar.CalendarSystem subclassing should be restricted [v5]

2023-09-20 Thread Andrey Turbanov
On Wed, 20 Sep 2023 07:00:23 GMT, Justin Lu wrote: >> Please review this PR which restricts sub-classing of the internal calendar >> system in sun.util.calendar to only the existing implementations. Drive by >> cleanup included. >> >> As the implementation is long-standing and complete with

RFR: 8316557: Make fields final in 'sun.util' package

2023-09-19 Thread Andrey Turbanov
A few classes in `sun.util` package have non-final fields which could easily be marked `final`. - Commit messages: - [PATCH] Make fields final in 'sun.util' package Changes: https://git.openjdk.org/jdk/pull/15736/files Webrev: https://webrevs.openjdk.org/?repo=jdk=15736=00

Re: RFR: 8313813: Field sun.util.calendar.CalendarDate#forceStandardTime is never set [v5]

2023-09-16 Thread Andrey Turbanov
On Fri, 15 Sep 2023 23:31:16 GMT, Naoto Sato wrote: >> Justin Lu has updated the pull request incrementally with one additional >> commit since the last revision: >> >> cleanup existing typos > > src/java.base/share/classes/sun/util/calendar/ImmutableGregorianDate.java > line 160: > >>

Re: RFR: 8296246: Update Unicode Data Files to Version 15.1.0

2023-09-15 Thread Andrey Turbanov
On Wed, 13 Sep 2023 20:15:09 GMT, Naoto Sato wrote: > This PR is to incorporate the latest Unicode 15.1, which was released > yesterday. Besides the usual character data update, an upgraded > implementation of RegEx which reflects the Indic Consonant Break specified in > the latest Unicode

Integrated: 8315973: Remove unused fields from ThreadLocalRandom

2023-09-14 Thread Andrey Turbanov
On Mon, 21 Aug 2023 15:07:45 GMT, Andrey Turbanov wrote: > These messages were used before > [JDK-8248862](https://bugs.openjdk.org/browse/JDK-8248862) This pull request has now been integrated. Changeset: 14408bc8 Author:Andrey Turbanov URL: https://git.openjdk.org/jdk/

Re: RFR: 8313813: Field sun.util.calendar.CalendarDate#forceStandardTime is never set [v3]

2023-09-13 Thread Andrey Turbanov
On Wed, 13 Sep 2023 20:21:20 GMT, Justin Lu wrote: >> Please review this PR which is a continuation of >> [JDK-6453901](https://bugs.openjdk.org/browse/JDK-6453901) to remove unused >> code from the _sun.util.Calendar_ classes. >> >> `forceStandardTime` is always false. >> >> In addition,

Re: RFR: 8313813: Field sun.util.calendar.CalendarDate#forceStandardTime is never set [v2]

2023-09-13 Thread Andrey Turbanov
On Wed, 13 Sep 2023 19:46:08 GMT, Justin Lu wrote: >> Please review this PR which is a continuation of >> [JDK-6453901](https://bugs.openjdk.org/browse/JDK-6453901) to remove unused >> code from the _sun.util.Calendar_ classes. >> >> `forceStandardTime` is always false. >> >> In addition,

Re: RFR: 8313813: Field sun.util.calendar.CalendarDate#forceStandardTime is never set

2023-09-13 Thread Andrey Turbanov
On Wed, 13 Sep 2023 17:52:13 GMT, Justin Lu wrote: > Please review this PR which is a continuation of > [JDK-6453901](https://bugs.openjdk.org/browse/JDK-6453901) to remove unused > code from the _sun.util.Calendar_ classes. > > `forceStandardTime` is always false. > > In addition, `locale`

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

2023-09-12 Thread Andrey Turbanov
A field `short _Depth` in the `jdk.internal.util.xml.impl.XMLStreamWriterImpl.Element` class is unused and can be removed. - Commit messages: - [PATCH] Remove unused field jdk.internal.util.xml.impl.XMLStreamWriterImpl.Element#_Depth Changes:

Re: RFR: 8314891: Additional Zip64 extra header validation

2023-09-12 Thread Andrey Turbanov
On Sat, 9 Sep 2023 14:33:53 GMT, Lance Andersen wrote: > Please review this PR which improves the Zip64 extra header validation: > > - Throw a ZipException If the extra len field is 0 and : > -- size, csize, or loc offset are set to 0x > -- disk starting number is set to 0x > > -

Re: RFR: 8315968: Consolidate java.util.Digits and StringLatin1::PACKED_DIGITS [v6]

2023-09-11 Thread Andrey Turbanov
On Mon, 11 Sep 2023 04:00:34 GMT, 温绍锦 wrote: >> Some codes in core libs are duplicated, including: >> java.util.DecimalDigits::DIGITS -> java.lang.StringLatin1.PACKED_DIGITS >> java.util.DecimalDigits::size -> java.lang.Long.stringSize >> >> We can reduce duplication through JavaLangAccess,

RFR: 8315973: Remove unused fields from ThreadLocalRandom

2023-09-11 Thread Andrey Turbanov
These messages were used before [JDK-8248862](https://bugs.openjdk.org/browse/JDK-8248862) - Commit messages: - [PATCH] Remove unused fields from ThreadLocalRandom Changes: https://git.openjdk.org/jdk/pull/15363/files Webrev: https://webrevs.openjdk.org/?repo=jdk=15363=00

Re: RFR: 8315810: Reimplement sun.reflect.ReflectionFactory::newConstructorForSerialization with method handles

2023-09-07 Thread Andrey Turbanov
On Wed, 6 Sep 2023 18:34:29 GMT, Mandy Chung wrote: > This reimplements > `sun.reflect.ReflectionFactory::newConstructorForSerialization` with method > handles. > > This API currently generates the bytecode which fails the verification > because `new C; invokespecial A()` where the given

Re: RFR: 8298619: java/io/File/GetXSpace.java is failing [v4]

2023-09-04 Thread Andrey Turbanov
On Wed, 29 Mar 2023 18:05:46 GMT, Brian Burkhalter wrote: >> Modify the `Space` instances used for size comparison to be created with >> total number of bytes derived from the Windows `diskFree` utility instead of >> Cygwin’s `df`. > > Brian Burkhalter has updated the pull request

Integrated: 8312521: Unused field LocaleProviderAdapter#defaultLocaleProviderAdapter could be removed

2023-08-31 Thread Andrey Turbanov
On Tue, 22 Aug 2023 12:22:54 GMT, Andrey Turbanov wrote: > After [JDK-8245241](https://bugs.openjdk.org/browse/JDK-8245241), the field > `sun.util.locale.provider.LocaleProviderAdapter#defaultLocaleProviderAdapter` > is only written in `` and then is not used after. > W

Re: RFR: 8314263: Signed jars triggering Logger finder recursion and StackOverflowError [v7]

2023-08-30 Thread Andrey Turbanov
On Tue, 29 Aug 2023 15:31:03 GMT, Sean Coffey wrote: >> Recursive initialization calls possible during loading of LoggerFinder >> service. >> >> This fix detects the recursive call and returns a temporary LoggerFinder >> that is backed by a lazy logger. Automated test case developed to

Re: RFR: 8314483: Optionally override copyright header in generated source [v2]

2023-08-25 Thread Andrey Turbanov
On Thu, 24 Aug 2023 17:36:46 GMT, Erik Joelsson wrote: >> In the JDK build we have various build tools that generate source code from >> data files. For most of these tools, the source files are based on template >> files, which already have copyright headers, but for some, the complete >>

Re: RFR: 8314759: VirtualThread.parkNanos timeout adjustment when pinned should be replaced

2023-08-24 Thread Andrey Turbanov
On Wed, 23 Aug 2023 16:41:23 GMT, Alan Bateman wrote: > If yielding fails due to the pinning then VirtualThread.parkNanos parks on > the carrier thread with the remaining time. The calculation of the remaining > time needs to be replaced so that it obviously uses the difference between > the

Integrated: 8314734: Remove unused field TypeVariableImpl.EMPTY_ANNOTATION_ARRAY

2023-08-23 Thread Andrey Turbanov
On Tue, 22 Aug 2023 06:57:23 GMT, Andrey Turbanov wrote: > Field is unused since > [JDK-8004698](https://bugs.openjdk.org/browse/JDK-8004698) - > https://github.com/openjdk/jdk/commit/b29b4794613a2aca125c2a6e9f8ed1d0f01a4ce2#diff-2b6035b7134d61a89cfee1ad7bdc1bf21ce37421358375d6399de95

RFR: 8312521: Unused field LocaleProviderAdapter#defaultLocaleProviderAdapter could be removed

2023-08-22 Thread Andrey Turbanov
After [JDK-8245241](https://bugs.openjdk.org/browse/JDK-8245241), the field `sun.util.locale.provider.LocaleProviderAdapter#defaultLocaleProviderAdapter` is only written in `` and then is not used after. We can remove it. - Commit messages: - 8312521: Unused field

RFR: 8314734: Remove unused field TypeVariableImpl.EMPTY_ANNOTATION_ARRAY

2023-08-22 Thread Andrey Turbanov
Field is unused since [JDK-8004698](https://bugs.openjdk.org/browse/JDK-8004698) - https://github.com/openjdk/jdk/commit/b29b4794613a2aca125c2a6e9f8ed1d0f01a4ce2#diff-2b6035b7134d61a89cfee1ad7bdc1bf21ce37421358375d6399de950c17c0c8e - Commit messages: - [PATCH] Remove unused field

Re: RFR: 8314063 : The socket is not closed in Connection::createSocket when the handshake failed for LDAP connection [v7]

2023-08-19 Thread Andrey Turbanov
On Sat, 19 Aug 2023 02:15:06 GMT, Weibing Xiao wrote: >> Please refer to JDK-8314063. >> >> The failure scenario is due to the setting of connection timeout. It is >> either too small or not an optimal value for the system. When the client >> tries to connect to the server with LDAPs

Integrated: 8314129: Make fields final in java.util.Scanner

2023-08-17 Thread Andrey Turbanov
On Thu, 13 Jul 2023 08:57:05 GMT, Andrey Turbanov wrote: > Made a few fields `final` in java.util.Scanner. > Also made `digits`, `non0Digit`, `SIMPLE_GROUP_INDEX` as `static.` This pull request has now been integrated. Changeset: d27daf01 Author:Andrey Turbanov URL:

Integrated: 8314321: Remove unused field jdk.internal.util.xml.impl.Attrs.mAttrIdx

2023-08-17 Thread Andrey Turbanov
On Tue, 15 Aug 2023 20:13:18 GMT, Andrey Turbanov wrote: > A field `char mAttrIdx` in the `jdk.internal.util.xml.impl.Attrs` class is > unused and can be removed. This pull request has now been integrated. Changeset: 249dc374 Author:Andrey Turbanov URL: https://git.openjdk.o

RFR: 8314321: Remove unused field jdk.internal.util.xml.impl.Attrs.mAttrIdx

2023-08-15 Thread Andrey Turbanov
A field `char mAttrIdx` in the `jdk.internal.util.xml.impl.Attrs` class is unused and can be removed. - Commit messages: - [PATCH] Remove unused field jdk.internal.util.xml.impl.Attrs.mAttrIdx Changes: https://git.openjdk.org/jdk/pull/15298/files Webrev:

Re: RFR: 8313612: Use JUnit in lib-test/jdk tests

2023-08-15 Thread Andrey Turbanov
On Wed, 2 Aug 2023 23:25:13 GMT, Qing Xiao wrote: > Modified all tests under lib-test/jdk to use JUnit test/lib-test/jdk/test/lib/hexdump/HexPrinterTest.java line 84: > 82: Arguments.of("canonical", "%08x ", "%02x ", 16, "|", 31, > HexPrinter.Formatters.PRINTABLE, "|" +

RFR: 8314129: Make fields final in java.util.Scanner

2023-08-10 Thread Andrey Turbanov
Made a few fields `final` in java.util.Scanner. Also made `digits`, `non0Digit`, `SIMPLE_GROUP_INDEX` as `static.` - Commit messages: - [PATHC] Make fields final in java.util.Scanner Changes: https://git.openjdk.org/jdk/pull/14863/files Webrev:

Integrated: 8313875: Use literals instead of static fields in java.util.Math: twoToTheDoubleScaleUp, twoToTheDoubleScaleDown

2023-08-08 Thread Andrey Turbanov
On Thu, 13 Jul 2023 17:57:16 GMT, Andrey Turbanov wrote: > Couple of static fields in Math are used only once and can be replaced with > literals `0x1p512`/`0x1p-512 ` This pull request has now been integrated. Changeset: 41bdcded Author:Andrey Turbanov URL:

Re: RFR: 8313875: Use literals instead of static fields in java.util.Math: twoToTheDoubleScaleUp, twoToTheDoubleScaleDown [v2]

2023-08-08 Thread Andrey Turbanov
On Mon, 7 Aug 2023 19:44:48 GMT, Andrey Turbanov wrote: >> Couple of static fields in Math are used only once and can be replaced with >> literals `0x1p512`/`0x1p-512 ` > > Andrey Turbanov has updated the pull request incrementally with one > additional commit si

Re: RFR: 8313875: Use literals instead of static fields in java.util.Math: twoToTheDoubleScaleUp, twoToTheDoubleScaleDown [v2]

2023-08-08 Thread Andrey Turbanov
On Tue, 8 Aug 2023 08:42:05 GMT, Raffaello Giulietti wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8313875: Make fields final in java.util.Math: twoToTheDoubleScaleUp, &g

Re: RFR: 8313875: Use literals instead of static fields final in java.util.Math: twoToTheDoubleScaleUp, twoToTheDoubleScaleDown [v2]

2023-08-07 Thread Andrey Turbanov
> Couple of static fields in Math are used only once and can be replaced with > literals `0x1p512`/`0x1p-512 ` Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8313875: Make fields final in java.util.Math: twoToTheDoubleS

Re: RFR: 8313875: Make fields final in java.util.Math: twoToTheDoubleScaleUp, twoToTheDoubleScaleDown

2023-08-07 Thread Andrey Turbanov
On Mon, 7 Aug 2023 16:43:49 GMT, Raffaello Giulietti wrote: >> Couple of static fields in Math could be declared `final`. > > src/java.base/share/classes/java/lang/Math.java line 3425: > >> 3423: // Constants used in scalb >> 3424: private static final double twoToTheDoubleScaleUp =

RFR: 8313875: Make fields final in java.util.Math: twoToTheDoubleScaleUp, twoToTheDoubleScaleDown

2023-08-07 Thread Andrey Turbanov
Couple of static fields in Math could be declared `final`. - Commit messages: - [PATCH] Make fields final in java.util.Math: twoToTheDoubleScaleUp, twoToTheDoubleScaleDown Changes: https://git.openjdk.org/jdk/pull/14875/files Webrev: https://webrevs.openjdk.org/?repo=jdk=14875=00

Re: RFR: 8311630: [s390] Implementation of Foreign Function & Memory API (Preview) [v10]

2023-08-06 Thread Andrey Turbanov
On Tue, 1 Aug 2023 06:29:28 GMT, sid8606 wrote: >> Implementation of "Foreign Function & Memory API" for s390x (Big Endian). > > sid8606 has updated the pull request incrementally with one additional commit > since the last revision: > > Fix typo > > Signed-off-by: Sidraya

Integrated: 8312414: Make java.util.ServiceLoader.LANG_ACCESS final

2023-07-21 Thread Andrey Turbanov
On Tue, 18 Jul 2023 20:06:56 GMT, Andrey Turbanov wrote: > Found opportunity to make static `ServiceLoader.LANG_ACCESS` field `final`. This pull request has now been integrated. Changeset: f4ba7b21 Author: Andrey Turbanov URL: https://git.openjdk.org/jdk/com

RFR: 8312414: Make java.util.ServiceLoader.LANG_ACCESS final

2023-07-19 Thread Andrey Turbanov
Found opportunity to make static `ServiceLoader.LANG_ACCESS` field `final`. - Commit messages: - 8312414: Make java.util.ServiceLoader.LANG_ACCESS final - [PATCH] Make java.util.ServiceLoader.LANG_ACCESS final Changes: https://git.openjdk.org/jdk/pull/14926/files Webrev:

Re: RFR: 8301341: LinkedTransferQueue does not respect timeout for poll() [v6]

2023-07-17 Thread Andrey Turbanov
On Thu, 13 Jul 2023 19:21:01 GMT, Doug Lea wrote: >> This now uses Thread.isVirtual to distinguish spin vs immediate block cases, >> enabling re-introduction of spin control from the previous version, removing >> anomalies like this one. > > Doug Lea has updated the pull request with a new

Re: RFR: 8311663: Additional refactoring of Locale tests to JUnit

2023-07-17 Thread Andrey Turbanov
On Thu, 13 Jul 2023 23:23:42 GMT, Justin Lu wrote: > Please review this PR which refactors more java.util.Locale tests to JUnit > with some minor cleanup as well. > > Although some of the files could benefit from being renamed bugNNN to > something more descriptive, this makes reviewing

Re: RFR: 8288899: java/util/concurrent/ExecutorService/CloseTest.java failed with "InterruptedException: sleep interrupted"

2023-06-27 Thread Andrey Turbanov
On Sat, 3 Jun 2023 14:08:02 GMT, Doug Lea wrote: > Addresses Jdk 8288899 : java/util/concurrent/ExecutorService/CloseTest.java > failed with "InterruptedException: sleep interrupted" and related issues. > > This is a major ForkJoin update (and hard to review -- sorry) that finally > addresses

Re: RFR: 8310849: Pattern matching for instanceof and arrayType cleanup in j.l.invoke and j.l.reflect [v3]

2023-06-26 Thread Andrey Turbanov
On Mon, 26 Jun 2023 13:51:25 GMT, Chen Liang wrote: >> This patch touches java.lang.reflect and java.lang.invoke packages. It >> replaces instanceof + cast with pattern matching and updates >> Array.newInstance().getClass() patterns with arrayType() for obtaining array >> types of a class. >

Re: RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v24]

2023-06-26 Thread Andrey Turbanov
On Sun, 25 Jun 2023 20:38:28 GMT, 温绍锦 wrote: >> By optimizing the implementation of java.lang.Long#fastUUID, the performance >> of the java.util.UUID#toString method can be significantly improved. >> >> The following are the test results of JMH: >> >> Benchmark Mode Cnt

  1   2   3   >