Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v8]

2025-07-17 Thread Volkan Yazici
On Thu, 17 Jul 2025 07:04:00 GMT, Tobias Hartmann wrote: >> @TobiHartmann, this change results in the following compiler error: >> >> >> /home/vy/.../src/hotspot/share/opto/library_call.cpp:958:35: error: invalid >> conversion from 'Node*' to 'RegionNode*' [-fpermissive] >> 958 | generate_

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v8]

2025-07-17 Thread Volkan Yazici
try { > > jdk.internal.access.SharedSecrets.getJavaLangAccess().countPositives(new > byte[]{1,2,3}, 2, 5); > } catch (Exception exception) { > lastException = exception; > } > } > if (lastException != null) { >

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v7]

2025-07-16 Thread Volkan Yazici
On Thu, 17 Jul 2025 06:13:30 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >&g

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v7]

2025-07-16 Thread Volkan Yazici
On Thu, 17 Jul 2025 06:13:30 GMT, Volkan Yazici wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >&g

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v3]

2025-07-16 Thread Volkan Yazici
On Wed, 16 Jul 2025 05:28:55 GMT, Tobias Hartmann wrote: >> Volkan Yazici 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 cont

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v7]

2025-07-16 Thread Volkan Yazici
try { > > jdk.internal.access.SharedSecrets.getJavaLangAccess().countPositives(new > byte[]{1,2,3}, 2, 5); > } catch (Exception exception) { > lastException = exception; > } > } > if (lastException != null) { >

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v6]

2025-07-16 Thread Volkan Yazici
On Thu, 10 Jul 2025 12:23:06 GMT, Volkan Yazici wrote: >> Volkan Yazici has refreshed the contents of this pull request, and previous >> commits have been removed. The incremental views will show differences >> compared to the previous content of the PR. The pull request co

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v6]

2025-07-16 Thread Volkan Yazici
try { > > jdk.internal.access.SharedSecrets.getJavaLangAccess().countPositives(new > byte[]{1,2,3}, 2, 5); > } catch (Exception exception) { > lastException = exception; > } > } > if (lastException != null) { >

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v5]

2025-07-16 Thread Volkan Yazici
try { > > jdk.internal.access.SharedSecrets.getJavaLangAccess().countPositives(new > byte[]{1,2,3}, 2, 5); > } catch (Exception exception) { > lastException = exception; > } > } > if (lastException != null) { >

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v4]

2025-07-16 Thread Volkan Yazici
try { > > jdk.internal.access.SharedSecrets.getJavaLangAccess().countPositives(new > byte[]{1,2,3}, 2, 5); > } catch (Exception exception) { > lastException = exception; > } > } > if (lastException != null) { >

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Tue, 15 Jul 2025 19:45:33 GMT, Roger Riggs wrote: >> Volkan Yazici has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Minimize the number of touched lines in `vmIntrinsics.hpp` >> - Remove Markdown-sty

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Tue, 15 Jul 2025 19:25:31 GMT, Roger Riggs wrote: >> Volkan Yazici has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Minimize the number of touched lines in `vmIntrinsics.hpp` >> - Remove Markdown-sty

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v3]

2025-07-15 Thread Volkan Yazici
try { > > jdk.internal.access.SharedSecrets.getJavaLangAccess().countPositives(new > byte[]{1,2,3}, 2, 5); > } catch (Exception exception) { > lastException = exception; > } > } > if (lastException != null) { >

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Mon, 14 Jul 2025 10:32:24 GMT, Damon Fenacci wrote: > I left a couple of minor comments. I also noticed that you haven't yet added > the benchmark results to the description: do you want to run them again after > the reviews? @dafedafe, thanks so much for the review! I've implemented the ch

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Mon, 14 Jul 2025 09:11:08 GMT, Damon Fenacci wrote: >> Volkan Yazici has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Minimize the number of touched lines in `vmIntrinsics.hpp` >> - Remov

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Mon, 14 Jul 2025 10:27:45 GMT, Damon Fenacci wrote: >> Volkan Yazici has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Minimize the number of touched lines in `vmIntrinsics.hpp` >> - Remov

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
On Mon, 14 Jul 2025 08:49:44 GMT, Damon Fenacci wrote: >> Volkan Yazici has updated the pull request incrementally with three >> additional commits since the last revision: >> >> - Minimize the number of touched lines in `vmIntrinsics.hpp` >> - Remov

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics [v2]

2025-07-15 Thread Volkan Yazici
try { > > jdk.internal.access.SharedSecrets.getJavaLangAccess().countPositives(new > byte[]{1,2,3}, 2, 5); > } catch (Exception exception) { > lastException = exception; > } > } > if (lastException != null) { >

Re: RFR: 8361842: Move input validation checks to Java for String-related intrinsics

2025-07-11 Thread Volkan Yazici
On Thu, 10 Jul 2025 20:54:24 GMT, John R Rose wrote: >> Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve >> their documentation, enhance the checks in the associated IR or assembly >> code, and adapt them to cause VM crash on invalid input. >> >> ## Implementation no

Re: RFR: 8361842: Validate input in both Java and C++ for java.lang.StringCoding intrinsics

2025-07-10 Thread Volkan Yazici
On Thu, 26 Jun 2025 10:48:37 GMT, Volkan Yazici wrote: > Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve > their documentation, enhance the checks in the associated C++ methods, and > adapt them to cause VM crash on invalid input. > > ## Imple

Re: RFR: 8361842: Validate input in both Java and C++ for java.lang.StringCoding intrinsics

2025-07-10 Thread Volkan Yazici
On Fri, 27 Jun 2025 20:21:31 GMT, ExE Boss wrote: >> My point is this is a performance-sensitive API. We are using a known-slow >> check method `checkFromIndexSize` which may introduce a performance >> regression. > > Maybe use `jdk.internal.util.Preconditions` directly instead? > Suggestion: >

Re: RFR: 8361842: Validate input in both Java and C++ for java.lang.StringCoding intrinsics

2025-07-10 Thread Volkan Yazici
On Fri, 27 Jun 2025 13:24:52 GMT, Chen Liang wrote: >> But the original code already checks for `len >= 0`, right? See >> `LibraryCallKit::inline_countPositives` -> `generate_string_range_check` -> >> `// Offset and count must not be negative` >> >> This PR is about moving the range checks fro

Re: RFR: 8361842: Validate input in both Java and C++ for java.lang.StringCoding intrinsics

2025-07-10 Thread Volkan Yazici
On Fri, 4 Jul 2025 15:03:33 GMT, Volkan Yazici wrote: >> Maybe use `jdk.internal.util.Preconditions` directly instead? >> Suggestion: >> >> Preconditions.checkFromIndexSize(off, len, ba.length, null); > > @ExE-Boss, I consulted this internally and de

RFR: 8361842: Validate input in both Java and C++ for java.lang.StringCoding intrinsics

2025-07-10 Thread Volkan Yazici
Validate input in `java.lang.StringCoding` intrinsic Java wrappers, improve their documentation, enhance the checks in the associated C++ methods, and adapt them to cause VM crash on invalid input. ## Implementation notes The goal of the associated umbrella issue [JDK-8156534](https://bugs.ope

Re: RFR: 8354872: Clarify java.lang.Process resource cleanup

2025-06-23 Thread Volkan Yazici
On Wed, 18 Jun 2025 20:16:18 GMT, Roger Riggs wrote: > Improve the documentation of Process use of system resources. > > Describe the implementation closing streams when no longer referenced. > Clarify the interactions between inputStream and inputReader and errorStream > and errorReader. > Add

Re: RFR: 8359732: Make standard i/o encoding related system properties `StaticProperty`

2025-06-18 Thread Volkan Yazici
On Tue, 17 Jun 2025 20:16:05 GMT, Naoto Sato wrote: > Refactored the internal handling of `stdin/out/err.encoding` to allow setting > them only via command-line options by converting them into `StaticProperty`. > This change prevents unexpected behavior caused by applications modifying > these

Integrated: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core]

2025-06-16 Thread Volkan Yazici
On Fri, 30 May 2025 11:07:30 GMT, Volkan Yazici wrote: > Passes the `Charset` read from the `stdin.encoding` system property while > creating `InputStreamReader` or `Scanner` instances for `System.in`. > > `stdin.encoding` is a recently added property for Java 25 in > [JDK

Re: RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core] [v4]

2025-06-16 Thread Volkan Yazici
On Tue, 3 Jun 2025 20:09:51 GMT, Naoto Sato wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix missing `java.io.Reader` import in `Ktab` > > I was thinking if someone made a typo fo

Integrated: 8359225: Remove unused test/jdk/javax/script/MyContext.java

2025-06-13 Thread Volkan Yazici
On Wed, 11 Jun 2025 11:22:57 GMT, Volkan Yazici wrote: > Both `javax/script/PluggableContextTest.java` and its companion > `test/jdk/javax/script/MyContext.java` were added in > [JDK-6398614](https://bugs.openjdk.org/browse/JDK-6398614). > [JDK-8246113](https://bugs.openjdk.or

Re: RFR: 8359225: Remove unused test/jdk/javax/script/MyContext.java

2025-06-13 Thread Volkan Yazici
On Fri, 13 Jun 2025 08:52:37 GMT, Athijegannathan Sundararajan wrote: >> Both `javax/script/PluggableContextTest.java` and its companion >> `test/jdk/javax/script/MyContext.java` were added in >> [JDK-6398614](https://bugs.openjdk.org/browse/JDK-6398614). >> [JDK-8246113](https://bugs.openjdk

Re: RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core] [v7]

2025-06-13 Thread Volkan Yazici
). Employing it > throughout the entire code base is addressed by the parent ticket > [JDK-8356893](https://bugs.openjdk.org/browse/JDK-8356893). JDK-8357995 this > PR is addressing is a sub-task of JDK-8356893 and is concerned with only > areas related to core libraries. Volkan Yazici h

RFR: 8359225: Remove unused test/jdk/javax/script/MyContext.java

2025-06-11 Thread Volkan Yazici
Both `javax/script/PluggableContextTest.java` and its companion `test/jdk/javax/script/MyContext.java` were added in [JDK-6398614](https://bugs.openjdk.org/browse/JDK-6398614). [JDK-8246113](https://bugs.openjdk.org/browse/JDK-8246113) removed `PluggableContextTest`, yet forgot `MyContext`, and

Re: RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core] [v6]

2025-06-11 Thread Volkan Yazici
). Employing it > throughout the entire code base is addressed by the parent ticket > [JDK-8356893](https://bugs.openjdk.org/browse/JDK-8356893). JDK-8357995 this > PR is addressing is a sub-task of JDK-8356893 and is concerned with only > areas related to core libraries. Volkan Yazici h

Re: RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core] [v5]

2025-06-11 Thread Volkan Yazici
On Wed, 11 Jun 2025 10:29:52 GMT, Volkan Yazici wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Improve code style >> >> Co-authored-by: Andrey Turbanov > > te

Re: RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core] [v5]

2025-06-11 Thread Volkan Yazici
On Thu, 5 Jun 2025 10:13:24 GMT, Volkan Yazici wrote: >> Passes the `Charset` read from the `stdin.encoding` system property while >> creating `InputStreamReader` or `Scanner` instances for `System.in`. >> >> `stdin.encoding` is a recently added property for Java 25 in

Re: RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core] [v5]

2025-06-11 Thread Volkan Yazici
On Thu, 5 Jun 2025 10:13:24 GMT, Volkan Yazici wrote: >> Passes the `Charset` read from the `stdin.encoding` system property while >> creating `InputStreamReader` or `Scanner` instances for `System.in`. >> >> `stdin.encoding` is a recently added property for Java 25 in

Re: RFR: 8358626: Emit UTF-8 CLDR resources [v2]

2025-06-06 Thread Volkan Yazici
On Thu, 5 Jun 2025 18:30:40 GMT, Naoto Sato wrote: >> Changes to generate CLDR resource bundles in UTF-8 encoding. The resource >> files in `java.base` are supposed to be US English only, but they also need >> to use UTF-8 as some of the names are non-ASCII (e.g., Türkiye) > > Naoto Sato has up

Integrated: 8357821: Revert incorrectly named JavaLangAccess::unchecked* methods

2025-06-05 Thread Volkan Yazici
On Fri, 30 May 2025 11:57:39 GMT, Volkan Yazici wrote: > Reverts certain [JDK-8353197](https://bugs.openjdk.org/browse/JDK-8353197) > (which implements JavaDoc improvement and precautionary naming for certain > unsafe methods in `jdk.internal.access.JavaLangAccess`) changes that are

Re: RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core] [v5]

2025-06-05 Thread Volkan Yazici
). Employing it > throughout the entire code base is addressed by the parent ticket > [JDK-8356893](https://bugs.openjdk.org/browse/JDK-8356893). JDK-8357995 this > PR is addressing is a sub-task of JDK-8356893 and is concerned with only > areas related to core libraries. Volkan Yazici h

Re: RFR: 8358626: Emit UTF-8 CLDR resources

2025-06-04 Thread Volkan Yazici
On Wed, 4 Jun 2025 21:54:15 GMT, Naoto Sato wrote: > The resource files in `java.base` are supposed to be US English only, but > they also need to use UTF-8 as some of the names are non-ASCII (e.g., Türkiye) @naotoj, shall we add this note as a comment to places where `-utf8` is added? ---

Re: RFR: 8357821: Revert incorrectly named JavaLangAccess::unchecked* methods [v2]

2025-06-04 Thread Volkan Yazici
tails on the followed > evaluation process. Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision: Add `@implSpec` - Changes: - all: https://git.openjdk.org/jdk/pull/25545/files - new: https://git.openjdk.org/jdk/pull/25545

Re: RFR: 8357821: Revert incorrectly named JavaLangAccess::unchecked* methods

2025-06-04 Thread Volkan Yazici
On Wed, 4 Jun 2025 11:39:34 GMT, Per Minborg wrote: >>> I wonder if we should add that implementations of the affected method >>> _shall_ do bounds checking to reduce the likelihood of a new/updated native >>> implementation miss that? >> >> @minborg, would you mind elaborating on this a bit,

Re: RFR: 8358558: (zipfs) Reorder the listing of accessMode property in the ZIP file system's documentation

2025-06-04 Thread Volkan Yazici
On Wed, 4 Jun 2025 06:47:59 GMT, Jaikiran Pai wrote: > Can I please get a review of this trivial doc-only change to the > `jdk.zipfs`'s documentation? This moves the `accessMode` property listing to > the top of the table instead of being at the bottom. With this change, the > text about throw

Re: RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core]

2025-06-03 Thread Volkan Yazici
On Tue, 3 Jun 2025 16:35:01 GMT, Weijun Wang wrote: > I’m just not sure if we’ll end up changing the rule again in the future. > Hardcoding the system property name makes me a bit uneasy, and the default > fallback being hardcoded as well adds to that concern. Thanks so much for the review @wa

Re: RFR: 8357821: Revert incorrectly named JavaLangAccess::unchecked* methods

2025-06-03 Thread Volkan Yazici
On Fri, 30 May 2025 11:57:39 GMT, Volkan Yazici wrote: > Reverts certain [JDK-8353197](https://bugs.openjdk.org/browse/JDK-8353197) > (which implements JavaDoc improvement and precautionary naming for certain > unsafe methods in `jdk.internal.access.JavaLangAccess`) changes that are

Re: RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core] [v4]

2025-06-03 Thread Volkan Yazici
). Employing it > throughout the entire code base is addressed by the parent ticket > [JDK-8356893](https://bugs.openjdk.org/browse/JDK-8356893). JDK-8357995 this > PR is addressing is a sub-task of JDK-8356893 and is concerned with only > areas related to core libraries. Volkan Yazici h

Re: RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core] [v3]

2025-06-02 Thread Volkan Yazici
On Mon, 2 Jun 2025 19:27:14 GMT, Chris Plummer wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Clean-up `MultiBreakpointsTarg` > > test/jdk/com/sun/jdi/MultiBreakpointsTest.java l

Re: RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core] [v3]

2025-06-02 Thread Volkan Yazici
). Employing it > throughout the entire code base is addressed by the parent ticket > [JDK-8356893](https://bugs.openjdk.org/browse/JDK-8356893). JDK-8357995 this > PR is addressing is a sub-task of JDK-8356893 and is concerned with only > areas related to core libraries. Volkan Yazici h

Re: RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core] [v2]

2025-06-02 Thread Volkan Yazici
On Fri, 30 May 2025 14:23:24 GMT, Alan Bateman wrote: >> Volkan Yazici has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Provide fallback for `stdin.encoding` >> - Revert changes to `Application` and

Re: RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core] [v2]

2025-06-02 Thread Volkan Yazici
). Employing it > throughout the entire code base is addressed by the parent ticket > [JDK-8356893](https://bugs.openjdk.org/browse/JDK-8356893). JDK-8357995 this > PR is addressing is a sub-task of JDK-8356893 and is concerned with only > areas related to core libraries. Volkan Yazici h

Re: RFR: 8351594: JFR: Rate-limited sampling of Java events [v2]

2025-06-02 Thread Volkan Yazici
On Sun, 1 Jun 2025 20:56:50 GMT, Erik Gahlin wrote: >> Could I have review of an enhancement that adds rate-limited sampling to >> Java event, including five events in the JDK (SocketRead, SocketWrite, >> FileRead, FileWrite, and JavaExceptionThrow). >> >> Testing: test/jdk/jdk/jfr >> >> Than

Re: RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core]

2025-05-30 Thread Volkan Yazici
On Fri, 30 May 2025 13:44:08 GMT, Weijun Wang wrote: > Have you thought about creating a helper method for this purpose even if it's > internal? At least, for the tests you can create one in `/test/lib`. Required changes are pretty minimal – passing `System.getProperty("stdin.encoding")` as an

RFR: 8357821: Revert incorrectly named JavaLangAccess::unchecked* methods

2025-05-30 Thread Volkan Yazici
Reverts certain [JDK-8353197](https://bugs.openjdk.org/browse/JDK-8353197) (which implements JavaDoc improvement and precautionary naming for certain unsafe methods in `jdk.internal.access.JavaLangAccess`) changes that are found to be incorrect. See the JBS issue for details on the followed eval

RFR: 8357995: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner [core]

2025-05-30 Thread Volkan Yazici
Passes the `Charset` read from the `stdin.encoding` system property while creating `InputStreamReader` or `Scanner` instances for `System.in`. `stdin.encoding` is a recently added property for Java 25 in [JDK-8350703](https://bugs.openjdk.org/browse/JDK-8350703). Employing it throughout the ent

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

2025-05-27 Thread Volkan Yazici
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. _Nit:_ Would it be an overk

Withdrawn: 8356893: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner

2025-05-22 Thread Volkan Yazici
On Wed, 21 May 2025 20:56:31 GMT, Volkan Yazici wrote: > There are several locations in the JDK source where `System.in` and > `FileDescriptor.in` is read with `InputStreamReader` and `Scanner` using the > default charset. As recommended by the recently merged > [JDK-83

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v4]

2025-05-22 Thread Volkan Yazici
On Wed, 21 May 2025 19:29:08 GMT, Naoto Sato wrote: >> `java.io.Console` uses the charset specified by the `stdout.encoding` system >> property for both input and output. While this is generally sufficient, >> since Console is intended for interactive terminal use, some platforms allow >> diff

Re: RFR: 8356893: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner

2025-05-22 Thread Volkan Yazici
On Wed, 21 May 2025 21:37:07 GMT, Roger Riggs wrote: >> There are several locations in the JDK source where `System.in` and >> `FileDescriptor.in` is read with `InputStreamReader` and `Scanner` using the >> default charset. As recommended by the recently merged >> [JDK-8356420](https://bugs.op

RFR: 8356893: Use "stdin.encoding" for reading System.in with InputStreamReader/Scanner

2025-05-21 Thread Volkan Yazici
There are several locations in the JDK source where `System.in` and `FileDescriptor.in` is read with `InputStreamReader` and `Scanner` using the default charset. As recommended by the recently merged [JDK-8356420](https://bugs.openjdk.org/browse/JDK-8356420), this PR replaces the default charse

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v2]

2025-05-21 Thread Volkan Yazici
On Tue, 20 May 2025 22:04:41 GMT, Naoto Sato wrote: >> test/jdk/java/io/Console/StdinEncodingTest.java line 46: >> >>> 44: * @run junit StdinEncodingTest >>> 45: */ >>> 46: public class StdinEncodingTest { >> >> AFAICT, there is no similar test (e.g., one using a mock `CharsetProvider`) >> f

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v2]

2025-05-21 Thread Volkan Yazici
On Tue, 20 May 2025 22:04:24 GMT, Naoto Sato wrote: >> All `FileDescriptor.in` encounters in `jdk.internal.org.jline.terminal` that >> might need attention: >> >> src/jdk.internal.le/share/classes/jdk/internal/org/jline/terminal/impl/DumbTerminalProvider.java >> src/jdk.internal.le/share/classe

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods

2025-05-20 Thread Volkan Yazici
On Tue, 20 May 2025 19:18:43 GMT, Volkan Yazici wrote: >> src/jdk.internal.le/share/classes/jdk/internal/org/jline/JdkConsoleProviderImpl.java >> line 160: >> >>> 158: >>> 159: try { >>> 160: Terminal terminal = >

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods

2025-05-20 Thread Volkan Yazici
On Tue, 20 May 2025 10:40:39 GMT, Volkan Yazici wrote: >> `java.io.Console` uses the charset specified by the `stdout.encoding` system >> property for both input and output. While this is generally sufficient, >> since Console is intended for interactive terminal use, so

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods

2025-05-20 Thread Volkan Yazici
On Fri, 16 May 2025 18:11:39 GMT, Naoto Sato wrote: > `java.io.Console` uses the charset specified by the `stdout.encoding` system > property for both input and output. While this is generally sufficient, since > Console is intended for interactive terminal use, some platforms allow > differen

Re: RFR: 8357063: Document preconditions for DecimalDigits methods [v4]

2025-05-19 Thread Volkan Yazici
On Fri, 16 May 2025 16:10:29 GMT, Shaojin Wen wrote: >> Similar to PR #24982 >> Document preconditions on certain DecimalDigits methods that use operations >> either unsafe and/or without range checks. > > Shaojin Wen has updated the pull request incrementally with one additional > commit sinc

Re: RFR: 8357063: Document preconditions for DecimalDigits methods [v2]

2025-05-16 Thread Volkan Yazici
On Fri, 16 May 2025 09:45:43 GMT, Shaojin Wen wrote: >> Similar to PR #24982 >> Document preconditions on certain DecimalDigits methods that use operations >> either unsafe and/or without range checks. > > Shaojin Wen has updated the pull request incrementally with two additional > commits sin

Re: RFR: 8357063: Document preconditions for DecimalDigits methods

2025-05-16 Thread Volkan Yazici
On Thu, 15 May 2025 06:24:44 GMT, Shaojin Wen wrote: > Similar to PR #24982 > Document preconditions on certain DecimalDigits methods that use operations > either unsafe and/or without range checks. src/java.base/share/classes/jdk/internal/util/DecimalDigits.java line 297: > 295: */ > 29

Integrated: 8353197: Document preconditions for JavaLangAccess methods

2025-05-15 Thread Volkan Yazici
On Thu, 1 May 2025 05:33:29 GMT, Volkan Yazici wrote: > Document preconditions on certain `JavaLangAccess` methods that use > operations either unsafe and/or without range checks. This pull request has now been integrated. Changeset: 8fcfddb2 Author:Volkan Yazici Committer: Chen

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v7]

2025-05-15 Thread Volkan Yazici
On Mon, 12 May 2025 19:42:15 GMT, Volkan Yazici wrote: >> Document preconditions on certain `JavaLangAccess` methods that use >> operations either unsafe and/or without range checks. > > Volkan Yazici has updated the pull request with a new target base due to a > m

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v7]

2025-05-13 Thread Volkan Yazici
On Tue, 13 May 2025 15:51:12 GMT, Alan Bateman wrote: >> Volkan Yazici 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 contai

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

2025-05-13 Thread Volkan Yazici
On Tue, 13 May 2025 12:34:01 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/io/InputStreamReader.java line 59: >> >>> 57: * new InputStreamReader(System.in, >>> System.getProperty("stdin.encoding")); >>> 58: * } >>> 59: * >> >> There are several places in the sources that st

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

2025-05-13 Thread Volkan Yazici
On Tue, 13 May 2025 03:15:25 GMT, Naoto Sato wrote: >> With the introduction of `stdin.encoding` >> ([JDK-8350703](https://bugs.openjdk.org/browse/JDK-8350703)), some guidance >> for users to decode `System.in` would be desirable. Adding examples in the >> field description would help. > > Nao

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v5]

2025-05-12 Thread Volkan Yazici
On Mon, 12 May 2025 17:07:57 GMT, Roger Riggs wrote: >> Volkan Yazici has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Prefixed `JavaLangAccess::stringConcat1` with `unchecked` >> - Fix `HexDigits` co

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v7]

2025-05-12 Thread Volkan Yazici
> Document preconditions on certain `JavaLangAccess` methods that use > operations either unsafe and/or without range checks. Volkan Yazici 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

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v6]

2025-05-12 Thread Volkan Yazici
> Document preconditions on certain `JavaLangAccess` methods that use > operations either unsafe and/or without range checks. Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision: Apply suggestions from code review Co-autho

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v4]

2025-05-12 Thread Volkan Yazici
On Mon, 12 May 2025 08:52:00 GMT, Jaikiran Pai wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix copyright years > > src/java.base/share/classes/jdk/internal/access/JavaLangA

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v5]

2025-05-12 Thread Volkan Yazici
> Document preconditions on certain `JavaLangAccess` methods that use > operations either unsafe and/or without range checks. Volkan Yazici has updated the pull request incrementally with two additional commits since the last revision: - Prefixed `JavaLangAccess::stringConcat1

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v3]

2025-05-09 Thread Volkan Yazici
On Thu, 8 May 2025 14:51:48 GMT, Chen Liang wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Prefix touched methods with `unchecked` > > Let's re-approve after copyright fix

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v4]

2025-05-09 Thread Volkan Yazici
> Document preconditions on certain `JavaLangAccess` methods that use > operations either unsafe and/or without range checks. Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision: Fix copyright years - Changes:

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v3]

2025-05-09 Thread Volkan Yazici
On Thu, 8 May 2025 14:46:29 GMT, Chen Liang wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Prefix touched methods with `unchecked` > > src/java.base/share/classes/java/io/DataIn

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v2]

2025-05-07 Thread Volkan Yazici
On Wed, 7 May 2025 07:52:37 GMT, Alan Bateman wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix typo in pre-existing JavaDoc > > src/java.base/share/classes/jdk/internal/acces

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v3]

2025-05-07 Thread Volkan Yazici
> Document preconditions on certain `JavaLangAccess` methods that use > operations either unsafe and/or without range checks. Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision: Prefix touched methods with `unc

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v2]

2025-05-07 Thread Volkan Yazici
On Wed, 7 May 2025 13:22:11 GMT, Raffaello Giulietti wrote: >> src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 355: >> >>> 353: * UTF-16 representation. >>> 354: * >>> 355: * WARNING: This method does not perform any bound checks. >> >> Maybe not this P

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v2]

2025-05-07 Thread Volkan Yazici
On Wed, 7 May 2025 07:37:48 GMT, Alan Bateman wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix typo in pre-existing JavaDoc > > src/java.base/share/classes/jdk/internal/acces

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v2]

2025-05-07 Thread Volkan Yazici
On Thu, 1 May 2025 13:00:37 GMT, Chen Liang wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix typo in pre-existing JavaDoc > > src/java.base/share/classes/jdk/internal/acces

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v2]

2025-05-07 Thread Volkan Yazici
On Fri, 2 May 2025 14:39:55 GMT, Roger Riggs wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fix typo in pre-existing JavaDoc > > src/java.base/share/classes/jdk/internal/acces

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v2]

2025-05-07 Thread Volkan Yazici
On Wed, 7 May 2025 07:26:56 GMT, Volkan Yazici wrote: >> Document preconditions on certain `JavaLangAccess` methods that use >> operations either unsafe and/or without range checks. > > Volkan Yazici has updated the pull request incrementally with one additional >

Re: RFR: 8353197: Document preconditions for JavaLangAccess methods [v2]

2025-05-07 Thread Volkan Yazici
> Document preconditions on certain `JavaLangAccess` methods that use > operations either unsafe and/or without range checks. Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision: Fix typo in pre-existing JavaDoc - C

RFR: 8353197: Document preconditions for JavaLangAccess methods

2025-04-30 Thread Volkan Yazici
Document preconditions on certain `JavaLangAccess` methods that use operations either unsafe and/or without range checks. - Commit messages: - Improve `JavaLangAccess` documentation Changes: https://git.openjdk.org/jdk/pull/24982/files Webrev: https://webrevs.openjdk.org/?repo=jd

Integrated: 8355391: Use Long::hashCode in java.time

2025-04-30 Thread Volkan Yazici
On Wed, 30 Apr 2025 06:46:07 GMT, Volkan Yazici wrote: > Replace manual bitwise operations in `hashCode` implementations of > `java.time` with `Long::hashCode`. This pull request has now been integrated. Changeset: 18983b63 Author:Volkan Yazici Committer: Naoto Sato URL:

Re: RFR: 8355391: Use Long::hashCode in java.time

2025-04-30 Thread Volkan Yazici
On Wed, 30 Apr 2025 15:01:08 GMT, Roger Riggs wrote: >> Replace manual bitwise operations in `hashCode` implementations of >> `java.time` with `Long::hashCode`. > > lgtm @RogerRiggs, @minborg, @naotoj, thanks for the reviews. I've attached successful `tier1,2` results to the ticket. I'd apprec

RFR: 8355391: Use Long::hashCode in java.time

2025-04-29 Thread Volkan Yazici
Replace manual bitwise operations in `hashCode` implementations of `java.time` with `Long::hashCode`. - Commit messages: - Use `Long::hashCode` Changes: https://git.openjdk.org/jdk/pull/24959/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24959&range=00 Issue: https://b

Re: RFR: 8355443: [java.io] Use @requires tag instead of exiting based on File.separatorChar value

2025-04-24 Thread Volkan Yazici
On Thu, 24 Apr 2025 00:33:20 GMT, Brian Burkhalter wrote: > For tests of the `java.io` package, instead of doing this > > public static void main(String[] args) throws Exception { > if (File.separatorChar != '\') { > /* This test is only valid on win32 systems */ >

Re: RFR: 8066583: DeflaterInput/OutputStream and InflaterInput/OutputStream should explain responsibility for freeing resources [v3]

2025-03-03 Thread Volkan Yazici
On Sat, 1 Mar 2025 07:50:44 GMT, Jaikiran Pai wrote: >> Can I please get a review of this doc-only change which proposes to improve >> the API documentation of `DeflaterInputStream`, `DeflaterOutputStream`, >> `InflaterInputStream` and `InflaterOutputStream` classes? >> >> As noted in https://

Integrated: 8343074: test/jdk/com/sun/net/httpserver/docs/test1/largefile.txt could be generated

2025-02-10 Thread Volkan Yazici
On Fri, 31 Jan 2025 19:42:55 GMT, Volkan Yazici wrote: > Adds `test.lib.Utils::createTempFileOfSize` to generate > `test/jdk/com/sun/net/httpserver/docs` contents at runtime. This directory > contains `largefile.txt` of size 2.6MiB showing up as the 4th largest file > tr

Re: RFR: 8343074: test/jdk/com/sun/net/httpserver/docs/test1/largefile.txt could be generated [v6]

2025-02-04 Thread Volkan Yazici
On Tue, 4 Feb 2025 14:26:23 GMT, Volkan Yazici wrote: >> Adds `test.lib.Utils::createTempFileOfSize` to generate >> `test/jdk/com/sun/net/httpserver/docs` contents at runtime. This directory >> contains `largefile.txt` of size 2.6MiB showing up as the 4th largest file

Re: RFR: 8343074: test/jdk/com/sun/net/httpserver/docs/test1/largefile.txt could be generated [v4]

2025-02-04 Thread Volkan Yazici
On Tue, 4 Feb 2025 10:47:22 GMT, Daniel Fuchs wrote: >> Volkan Yazici has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Assert that multiple files can be served using the same >> `FileServerHandler`

Re: RFR: 8343074: test/jdk/com/sun/net/httpserver/docs/test1/largefile.txt could be generated [v5]

2025-02-04 Thread Volkan Yazici
On Tue, 4 Feb 2025 14:15:00 GMT, Daniel Fuchs wrote: >> Volkan Yazici has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Replace `assert`s with conditionally thrown exceptions > > test/jdk/java/net/httpclient/

Re: RFR: 8343074: test/jdk/com/sun/net/httpserver/docs/test1/largefile.txt could be generated [v6]

2025-02-04 Thread Volkan Yazici
malizationTest.txt > 3574947 test/jdk/java/foreign/libTestDowncallStack.c > 7128495 test/jdk/java/foreign/libTestUpcallStack.c > > > **Other highlights:** > > - `jdk.httpclient.test.lib.common.TestUtil` is removed in favor of similar > alternatives in `test.lib.Utils` and `te

Re: RFR: 8343074: test/jdk/com/sun/net/httpserver/docs/test1/largefile.txt could be generated [v4]

2025-02-04 Thread Volkan Yazici
On Tue, 4 Feb 2025 10:46:33 GMT, Daniel Fuchs wrote: >> Volkan Yazici has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Assert that multiple files can be served using the same >> `FileServerHandler`

  1   2   >