Re: RFR: 8361717: Refactor Collections.emptyList() in Locale related classes

2025-07-09 Thread Johannes Döbler
On Wed, 9 Jul 2025 18:39:40 GMT, Naoto Sato wrote: > modernizing the code by using List.of() is still a desirable improvement except that `Collections.emptyList()` and `List.of()` unfortunately have different tolerance to calls `List.indexOf(null)` and `List.contains(null)`. - PR

Re: RFR: 8361587: AssertionError in File.listFiles() when path is empty and -esa is enabled

2025-07-09 Thread Johannes Döbler
On Wed, 9 Jul 2025 18:04:08 GMT, Brian Burkhalter wrote: > Changes to address `File.listFiles` invoked on an empty path. This fixes an > oversight in #22821. test/jdk/java/io/File/EmptyPath.java line 212: > 210: File[] files = f.listFiles(); > 211: for (File file : files) > 212

Re: RFR: 8359337: XML/JAXP tests that make network connections should ensure that no proxy is selected [v2]

2025-06-30 Thread Johannes Döbler
On Mon, 30 Jun 2025 16:52:55 GMT, Jaikiran Pai wrote: >> Can I please get a review of this test-only change which addresses the issue >> noted in https://bugs.openjdk.org/browse/JDK-8359337? >> >> On macOS, the JDK by default (without any explicit system properties) picks >> up the proxy setti

Re: RFR: 8358533: Improve performance of java.io.Reader.readAllLines [v2]

2025-06-24 Thread Johannes Döbler
On Tue, 24 Jun 2025 14:42:57 GMT, Brian Burkhalter wrote: >> Replaces the implementation `readAllCharsAsString().lines().toList()` with >> reading into a temporary `char` array which is then processed to detect line >> terminators and copy non-terminating characters into strings which are added

Re: RFR: 8359761: JDK 25 RDP1 L10n resource files update [v2]

2025-06-23 Thread Johannes Döbler
On Mon, 23 Jun 2025 16:34:05 GMT, Alisen Chung wrote: >> I agree. I'd expect consistency here. > > What would be the correct translation of majorticks here? If "major tick" is translated to "Hauptteilstrich", then the plural would be `[SliderDemo.majorticks=]Hauptteilstriche` (which is a rather

Re: RFR: 8359761: JDK 25 RDP1 L10n resource files update [v2]

2025-06-19 Thread Johannes Döbler
On Wed, 18 Jun 2025 15:25:42 GMT, Alexey Ivanov wrote: >> Alisen Chung has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fix unicode escapes > > src/java.base/share/classes/sun/security/tools/keytool/resources/keytool_de.properties > line

Re: RFR: 8358729: jdk/internal/loader/URLClassPath/ClassnameCharTest.java depends on Applet [v6]

2025-06-17 Thread Johannes Döbler
On Mon, 16 Jun 2025 17:30:12 GMT, Justin Lu wrote: >> Please review this PR which finishes Applet removal for the test: >> jdk/internal/loader/URLClassPath/ClassnameCharTest.java. >> >> `testclasses.jar` is updated such that the two classes no longer extend >> Applet. >> >> >> $ javap fo\ o.

Re: RFR: 8358729: jdk/internal/loader/URLClassPath/ClassnameCharTest.java depends on Applet [v6]

2025-06-17 Thread Johannes Döbler
On Mon, 16 Jun 2025 17:30:12 GMT, Justin Lu wrote: >> Please review this PR which finishes Applet removal for the test: >> jdk/internal/loader/URLClassPath/ClassnameCharTest.java. >> >> `testclasses.jar` is updated such that the two classes no longer extend >> Applet. >> >> >> $ javap fo\ o.

Re: RFR: 8358729: jdk/internal/loader/URLClassPath/ClassnameCharTest.java depends on Applet [v2]

2025-06-13 Thread Johannes Döbler
On Thu, 12 Jun 2025 15:29:55 GMT, Jaikiran Pai wrote: > I went back and looked at the JDK-5017871 issue through which the `fo > o.class` was being tested and from what I see in there, the current test > changes continue to test that issue. I think there might be better ways to > test that orig

Re: RFR: 8358729: jdk/internal/loader/URLClassPath/ClassnameCharTest.java depends on Applet [v5]

2025-06-13 Thread Johannes Döbler
On Fri, 13 Jun 2025 17:47:16 GMT, Justin Lu wrote: >> Please review this PR which finishes Applet removal for the test: >> jdk/internal/loader/URLClassPath/ClassnameCharTest.java. >> >> `testclasses.jar` is updated such that the two classes no longer extend >> Applet. >> >> >> $ javap fo\ o.

Re: RFR: 8358729: jdk/internal/loader/URLClassPath/ClassnameCharTest.java depends on Applet [v5]

2025-06-13 Thread Johannes Döbler
On Fri, 13 Jun 2025 17:47:16 GMT, Justin Lu wrote: >> Please review this PR which finishes Applet removal for the test: >> jdk/internal/loader/URLClassPath/ClassnameCharTest.java. >> >> `testclasses.jar` is updated such that the two classes no longer extend >> Applet. >> >> >> $ javap fo\ o.

Re: RFR: 8358426: Improve lazy computation in Locale

2025-06-05 Thread Johannes Döbler
On Wed, 4 Jun 2025 21:20:46 GMT, Justin Lu wrote: > Please review this PR which improves occurrences of lazy computation in > `Locale` and `BaseLocale`. > > Existing lazy initialization strategies such as CHM, static nested class, and > local inner class are replaced with Stable Values. > > L

Re: RFR: 8358426: Improve lazy computation in Locale

2025-06-05 Thread Johannes Döbler
On Wed, 4 Jun 2025 21:20:46 GMT, Justin Lu wrote: > Please review this PR which improves occurrences of lazy computation in > `Locale` and `BaseLocale`. > > Existing lazy initialization strategies such as CHM, static nested class, and > local inner class are replaced with Stable Values. > > L

Re: RFR: 8358015: Fix SequencedMap sequenced view method specifications [v2]

2025-06-04 Thread Johannes Döbler
On Wed, 4 Jun 2025 16:19:23 GMT, Stuart Marks wrote: >> It would be helpful in situations like this to have the inverse annotation >> -- "All methods should be overridden, except the ones marked `@NoOverride`". > > Interesting. This `@NoOverride` idea could be useful on a subclass that wants >

Re: RFR: 8358158: test/jdk/java/io/Console/CharsetTest.java failing with NoClassDefFoundError: jtreg/SkippedException

2025-06-02 Thread Johannes Döbler
On Mon, 2 Jun 2025 21:48:04 GMT, Naoto Sato wrote: > Fixing a regression caused by the fix to JDK-8356985. Although the fix in > `CharsetTest` was a clean-up and not the gist of the original issue, the > change seem to have caused not finding `SkippedException` at runtime in > certain cases. C

Re: RFR: 8357681: Fixed the DigitList::toString method causing incorrect results during debugging

2025-05-27 Thread Johannes Döbler
On Sun, 18 May 2025 11:11:32 GMT, Shaojin Wen wrote: > When debugging getLong/getDouble/getDecimal of DigitList, the debugger will > call the DigitList::toString method. At this time, DigitList::toString will > modify tempBuilder, which will cause incorrect results. src/java.base/share/classes

Re: RFR: 8357647 : Stream gatherers forward upstream size information to downstream

2025-05-23 Thread Johannes Döbler
On Fri, 23 May 2025 16:06:08 GMT, Viktor Klang wrote: >> @jdlib I guess that would depend on the definition of *value* and *cost* in >> this context. > > API modifications would definitely be its own thing. @viktorklang-ora, @liach I agree given the artificial starting point of the discussion

Re: RFR: 8357647 : Stream gatherers forward upstream size information to downstream

2025-05-23 Thread Johannes Döbler
On Fri, 23 May 2025 15:15:30 GMT, Viktor Klang wrote: > While it could be argued that unbounded Spliterators should not report SIZED > / SUBSIZED, GatherSink should report an unknown emission size, so switching > to downstream.begin(-1) rather than downstream.begin(size). > > Includes a regres

Re: RFR: 8347491: IllegalArgumentationException thrown by ThreadPoolExecutor doesn't have a useful message

2025-05-22 Thread Johannes Döbler
On Thu, 22 May 2025 07:26:29 GMT, Viktor Klang wrote: >> @viktorklang-ora @liach, I think we need a contribution guide that explains >> how to set up the work in the IDE, how to perform tests, etc. > > @He-Pin Please suggest improvements to https://openjdk.org/guide/ 👍 > @viktorklang-ora @liach

Re: Towards a JSON API for the JDK

2025-05-19 Thread Johannes Döbler
Developers use JSON libraries like Fastjson, Jackson and Gson primarily (my claim) because they can marshal between JSON files and POJOs in one line of code with great performance and can easily tweak the mapping using annotations or adapter classes. Being able to read/write a JSON file from/to

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

2025-05-19 Thread Johannes Döbler
On Thu, 15 May 2025 22:32:12 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

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

2025-05-15 Thread Johannes Döbler
On Thu, 15 May 2025 10:22:51 GMT, Markus KARG wrote: >> If the source is a `Reader` **and** target is a `Writer`, yes. But what if >> it is a native piece of hardware, like an IoT device, which produces / >> consumes `CharSequence`? > > Also, in JAX-RS for example, you cannot make use of `trans

Re: RFR: 8355954: File.delete removes read-only files (win) [v3]

2025-05-15 Thread Johannes Döbler
On Thu, 15 May 2025 09:40:13 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8355954: Fix HashedPasswordFileTest failure due to obsolete read-only >> attribute being set > > test/jdk/java/io/

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

2025-05-14 Thread Johannes Döbler
On Wed, 14 May 2025 20:52:00 GMT, Markus KARG wrote: >> There's nothing in the CharSequence interface that requires or indicates >> that the implementation is or is not immutable. Interfaces only have loosely >> defined contracts, only the signature of the methods, the caller can not >> hold a

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

2025-05-14 Thread Johannes Döbler
On Wed, 14 May 2025 17:57:36 GMT, Markus KARG wrote: >> BTW, it will not fail with OOME, but it should throw IOE in that case. > > BTW, it will *already* throw OOME as-is, *because* it returns a `String` even > if the Reader is attached to an infinite source. Maybe a good idea at this point if

Re: potential performance improvement in sun.nio.cs.UTF_8

2025-05-12 Thread Johannes Döbler
Hi Chen, thanks for your feedback. Indeed it does not make sense to optimize UTF-8 processing for a rather vague set of beneficiaries when there are realistic counterexamples. Still I don't want to give up on my idea too early :-) I tried this modification: * harvest pure ASCII-bytes before

potential performance improvement in sun.nio.cs.UTF_8

2025-05-12 Thread Johannes Döbler
I have a suggestion for a performance improvement in sun.nio.cs.UTF_8, the workhorse for stream based UTF-8 encoding and decoding, but don't know if this has been discussed before. I explain my idea for the decoding case: Claes Redestad describes in his blog https://cl4es.github.io/2021/02/23/F

Re: RFR: 8356255: Add Stable Field Updaters to allow efficient lazy field evaluations [v11]

2025-05-09 Thread Johannes Döbler
On Fri, 9 May 2025 09:21:14 GMT, Viktor Klang wrote: >> Per Minborg has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 24 additional >> commits sin

Re: Namespace Prefix Issue in XML to XSL Transformation

2025-04-28 Thread Johannes Döbler
Probably best to nail down the problem in a bug report first, providing XML input, XSLT stylesheet, actual and expected XML output to demonstrate the problem. Now if https://bugs.openjdk.org/browse/JDK-8168664 describes your problem: The Xalan version bundled with the JDK /afaik/ seems to get oc

Re: RFR: 8355301: Simplify Throwable::printStackTrace by using record [v4]

2025-04-25 Thread Johannes Döbler
On Fri, 25 Apr 2025 07:06:05 GMT, Alan Bateman wrote: >>> What should we replace it with? Do you have any suggestions? >> >> The wrapper classes were needed when there were was a mix of synchronized >> and j.u.concurrent locks in use. With JEP 491 integrated it meant that the >> java.io classe

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

2025-04-23 Thread Johannes Döbler
On Tue, 22 Apr 2025 17:12:52 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: Add missing toList(), tweak verbiage; update

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

2025-04-23 Thread Johannes Döbler
On Wed, 23 Apr 2025 15:39:35 GMT, Brian Burkhalter wrote: >> test/jdk/java/io/BufferedReader/ReadAll.java line 83: >> >>> 81: int toIndex = rnd.nextInt(fromIndex, plen); >>> 82: String str = PHRASE.substring(fromIndex, toIndex); >>> 83: byte[] strB

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

2025-04-23 Thread Johannes Döbler
On Tue, 22 Apr 2025 17:12:52 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: Add missing toList(), tweak verbiage; update