From alanb at openjdk.org Fri Aug 1 12:35:00 2025 From: alanb at openjdk.org (Alan Bateman) Date: Fri, 1 Aug 2025 12:35:00 GMT Subject: RFR: 8364213: (bf) Improve java/nio/Buffer/GetChars.java test comments [v4] In-Reply-To: References: Message-ID: <9vgJjBF08ScDCdTq96bI8qdOhE7yoAJoNKj1RiC2UVs=.6558431e-7d89-444b-b4b2-59a05ca8aa60@github.com> On Thu, 31 Jul 2025 16:17:55 GMT, Alan Bateman wrote: >> Brett Okken has updated the pull request incrementally with one additional commit since the last revision: >> >> whitespace > > [JDK-8364345](https://bugs.openjdk.org/browse/JDK-8364345) tracks an intermittent failure with the test where CharBufferAsCharSequenceTest.randomizeRange fails. > @AlanBateman [JDK-8364345](https://bugs.openjdk.org/browse/JDK-8364345) was fixed in [5ec88b8](https://github.com/openjdk/jdk/commit/5ec88b87cf525d5ac19147b28e98f225f9f67deb) > > The problem was when a `CharBuffer` which had already had a random range applied was sliced and then randomized again. Good, it means we can close the other issue once the test update goes in. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26512#issuecomment-3144428710 From duke at openjdk.org Fri Aug 1 13:40:01 2025 From: duke at openjdk.org (Brett Okken) Date: Fri, 1 Aug 2025 13:40:01 GMT Subject: RFR: 8364213: (bf) Improve java/nio/Buffer/GetChars.java test comments [v4] In-Reply-To: References: Message-ID: On Tue, 29 Jul 2025 15:49:33 GMT, Alan Bateman wrote: >> Brett Okken has updated the pull request incrementally with one additional commit since the last revision: >> >> whitespace > > test/jdk/java/nio/Buffer/CharBufferAsCharSequenceTest.java line 104: > >> 102: *
  • String - description of the test scenario
  • >> 103: * >> 104: */ > > That helps a bit but I think we need to break up charBufferArguments into simpler/maintainable methods that have clear comments to document the test cases that they generate. Right now it's just way too hard to see what is tested and not tested. @AlanBateman @RogerRiggs any thoughts on just keeping the "random" tests and removing the "static"? As I started breaking the static tests up into simpler methods, they ended up looking like the "random" tests, just with fixed offsets instead of what `randomizeRange` is doing, which did not really seem all that valuable. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26512#discussion_r2248015202 From rriggs at openjdk.org Fri Aug 1 14:05:56 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 1 Aug 2025 14:05:56 GMT Subject: RFR: 8364213: (bf) Improve java/nio/Buffer/GetChars.java test comments [v4] In-Reply-To: References: Message-ID: On Wed, 30 Jul 2025 18:03:10 GMT, Brett Okken wrote: >> Address code review comments which came in post integration/merge of https://github.com/openjdk/jdk/pull/26282. >> >> Update/clarify test summary tag >> Document the values generated for arguments >> Move the endian-ness qualifier in the test descriptor string to not be first >> Change test method names to more closely match arg names of method under test > > Brett Okken has updated the pull request incrementally with one additional commit since the last revision: > > whitespace I updated the issue title (8364213) to match the current test name; please update the PR description. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26512#issuecomment-3144701811 From rriggs at openjdk.org Fri Aug 1 14:16:55 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 1 Aug 2025 14:16:55 GMT Subject: RFR: 8364213: (bf) Improve java/nio/Buffer/GetChars.java test comments [v4] In-Reply-To: References: Message-ID: <-wZ_04zmIGii_Aabj7TMpeICmz0cLBbvqOC0eofKeuI=.202dfa03-0f3c-4445-8051-c1eb74ee8a7e@github.com> On Fri, 1 Aug 2025 13:37:29 GMT, Brett Okken wrote: >> test/jdk/java/nio/Buffer/CharBufferAsCharSequenceTest.java line 104: >> >>> 102: *
  • String - description of the test scenario
  • >>> 103: * >>> 104: */ >> >> That helps a bit but I think we need to break up charBufferArguments into simpler/maintainable methods that have clear comments to document the test cases that they generate. Right now it's just way too hard to see what is tested and not tested. > > @AlanBateman @RogerRiggs any thoughts on just keeping the "random" tests and removing the "static"? > > As I started breaking the static tests up into simpler methods, they ended up looking like the "random" tests, just with fixed offsets instead of what `randomizeRange` is doing, which did not really seem all that valuable. If they duplicate the random tests, then can be removed. Which cases would you remove? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26512#discussion_r2248098512 From duke at openjdk.org Fri Aug 1 15:08:56 2025 From: duke at openjdk.org (Brett Okken) Date: Fri, 1 Aug 2025 15:08:56 GMT Subject: RFR: 8364213: (bf) Improve java/nio/Buffer/CharBufferAsCharSequenceTest test comments [v4] In-Reply-To: <-wZ_04zmIGii_Aabj7TMpeICmz0cLBbvqOC0eofKeuI=.202dfa03-0f3c-4445-8051-c1eb74ee8a7e@github.com> References: <-wZ_04zmIGii_Aabj7TMpeICmz0cLBbvqOC0eofKeuI=.202dfa03-0f3c-4445-8051-c1eb74ee8a7e@github.com> Message-ID: <4bLBYwqOHTgs-zkSj3J-Lsmqugt-xnqQJn-WAoCN5n8=.cd2954d3-0140-4099-b0c5-8eb79ee2f85a@github.com> On Fri, 1 Aug 2025 14:14:47 GMT, Roger Riggs wrote: > Which cases would you remove? All of these: https://github.com/openjdk/jdk/blob/master/test/jdk/java/nio/Buffer/CharBufferAsCharSequenceTest.java#L108-L182 As I walked through documenting what they cover, and then worked on breaking them out into smaller methods, they are just exercising the different types, at different ranges and offsets. I do not see a single scenario the static tests are covering which the dynamic/random tests do not. There are actually more combos covered with the random tests. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26512#discussion_r2248217647 From rriggs at openjdk.org Fri Aug 1 15:20:55 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 1 Aug 2025 15:20:55 GMT Subject: RFR: 8364213: (bf) Improve java/nio/Buffer/CharBufferAsCharSequenceTest test comments [v4] In-Reply-To: <4bLBYwqOHTgs-zkSj3J-Lsmqugt-xnqQJn-WAoCN5n8=.cd2954d3-0140-4099-b0c5-8eb79ee2f85a@github.com> References: <-wZ_04zmIGii_Aabj7TMpeICmz0cLBbvqOC0eofKeuI=.202dfa03-0f3c-4445-8051-c1eb74ee8a7e@github.com> <4bLBYwqOHTgs-zkSj3J-Lsmqugt-xnqQJn-WAoCN5n8=.cd2954d3-0140-4099-b0c5-8eb79ee2f85a@github.com> Message-ID: <40gl3gSIegSMi9AdkQVUViwy4SpxY0Rdun3Ub2J5pQo=.21db223e-0010-4634-8472-461c948564e4@github.com> On Fri, 1 Aug 2025 15:06:41 GMT, Brett Okken wrote: >> If they duplicate the random tests, then can be removed. >> Which cases would you remove? > >> Which cases would you remove? > > All of these: > https://github.com/openjdk/jdk/blob/master/test/jdk/java/nio/Buffer/CharBufferAsCharSequenceTest.java#L108-L182 > > As I walked through documenting what they cover, and then worked on breaking them out into smaller methods, they are just exercising the different types, at different ranges and offsets. I do not see a single scenario the static tests are covering which the dynamic/random tests do not. There are actually more combos covered with the random tests. Looks fine to remove those as duplicates. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26512#discussion_r2248242428 From duke at openjdk.org Fri Aug 1 16:28:11 2025 From: duke at openjdk.org (Brett Okken) Date: Fri, 1 Aug 2025 16:28:11 GMT Subject: RFR: 8364213: (bf) Improve java/nio/Buffer/CharBufferAsCharSequenceTest test comments [v5] In-Reply-To: References: Message-ID: <9_5FaV4QTFnERfhlbO4T1ALBLBLS2XnzfEFIakiMdJM=.18e999fa-2772-4c8b-9249-ee4241141cf4@github.com> > Address code review comments which came in post integration/merge of https://github.com/openjdk/jdk/pull/26282. > > Update/clarify test summary tag > Document the values generated for arguments > Move the endian-ness qualifier in the test descriptor string to not be first > Change test method names to more closely match arg names of method under test Brett Okken has updated the pull request incrementally with one additional commit since the last revision: remove static test cases ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26512/files - new: https://git.openjdk.org/jdk/pull/26512/files/0263f51b..9ecfcb0c Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26512&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26512&range=03-04 Stats: 103 lines in 1 file changed: 1 ins; 78 del; 24 mod Patch: https://git.openjdk.org/jdk/pull/26512.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26512/head:pull/26512 PR: https://git.openjdk.org/jdk/pull/26512 From bpb at openjdk.org Fri Aug 1 16:41:56 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Fri, 1 Aug 2025 16:41:56 GMT Subject: RFR: 8364213: (bf) Improve java/nio/Buffer/CharBufferAsCharSequenceTest test comments [v5] In-Reply-To: <40gl3gSIegSMi9AdkQVUViwy4SpxY0Rdun3Ub2J5pQo=.21db223e-0010-4634-8472-461c948564e4@github.com> References: <-wZ_04zmIGii_Aabj7TMpeICmz0cLBbvqOC0eofKeuI=.202dfa03-0f3c-4445-8051-c1eb74ee8a7e@github.com> <4bLBYwqOHTgs-zkSj3J-Lsmqugt-xnqQJn-WAoCN5n8=.cd2954d3-0140-4099-b0c5-8eb79ee2f85a@github.com> <40gl3gSIegSMi9AdkQVUViwy4SpxY0Rdun3Ub2J5pQo=.21db223e-0010-4634-8472-461c948564e4@github.com> Message-ID: <0ZC-5Q81Yj5kNCaomgrw7cTSZwdAPxSY8KiviWcQSuo=.90d3810b-0afc-4c97-bb08-db9cde983f0f@github.com> On Fri, 1 Aug 2025 15:18:06 GMT, Roger Riggs wrote: >>> Which cases would you remove? >> >> All of these: >> https://github.com/openjdk/jdk/blob/master/test/jdk/java/nio/Buffer/CharBufferAsCharSequenceTest.java#L108-L182 >> >> As I walked through documenting what they cover, and then worked on breaking them out into smaller methods, they are just exercising the different types, at different ranges and offsets. I do not see a single scenario the static tests are covering which the dynamic/random tests do not. There are actually more combos covered with the random tests. > > Looks fine to remove those as duplicates. > I do not see a single scenario the static tests are covering which the dynamic/random tests do not. There are actually more combos covered with the random tests. I have observed this situation before elsewhere. Although random tests can be irritating and sometimes tricky to get right, I think in the end the coverage is better. And with the `RandomFactory` seed available, the results are reproducible. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26512#discussion_r2248410226 From bpb at openjdk.org Mon Aug 4 21:45:21 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Mon, 4 Aug 2025 21:45:21 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed Message-ID: Change `BasicFileAttributes` for Windows such that for a directory junction `isOther` returns `true` but all other `is*` methods return `false`. Without this change, `isDirectory` also returns `true`. ------------- Commit messages: - 8364277: Add sub-test to existing test - 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed Changes: https://git.openjdk.org/jdk/pull/26631/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26631&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8364277 Stats: 218 lines in 4 files changed: 206 ins; 1 del; 11 mod Patch: https://git.openjdk.org/jdk/pull/26631.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26631/head:pull/26631 PR: https://git.openjdk.org/jdk/pull/26631 From bpb at openjdk.org Mon Aug 4 21:54:03 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Mon, 4 Aug 2025 21:54:03 GMT Subject: RFR: 8364213: (bf) Improve java/nio/Buffer/CharBufferAsCharSequenceTest test comments [v5] In-Reply-To: <9_5FaV4QTFnERfhlbO4T1ALBLBLS2XnzfEFIakiMdJM=.18e999fa-2772-4c8b-9249-ee4241141cf4@github.com> References: <9_5FaV4QTFnERfhlbO4T1ALBLBLS2XnzfEFIakiMdJM=.18e999fa-2772-4c8b-9249-ee4241141cf4@github.com> Message-ID: On Fri, 1 Aug 2025 16:28:11 GMT, Brett Okken wrote: >> Address code review comments which came in post integration/merge of https://github.com/openjdk/jdk/pull/26282. >> >> Update/clarify test summary tag >> Document the values generated for arguments >> Move the endian-ness qualifier in the test descriptor string to not be first >> Change test method names to more closely match arg names of method under test > > Brett Okken has updated the pull request incrementally with one additional commit since the last revision: > > remove static test cases Looks all right. ------------- Marked as reviewed by bpb (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26512#pullrequestreview-3085864666 From alanb at openjdk.org Tue Aug 5 06:56:10 2025 From: alanb at openjdk.org (Alan Bateman) Date: Tue, 5 Aug 2025 06:56:10 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed In-Reply-To: References: Message-ID: On Mon, 4 Aug 2025 21:38:34 GMT, Brian Burkhalter wrote: > Change `BasicFileAttributes` for Windows such that for a directory junction `isOther` returns `true` but all other `is*` methods return `false`. Without this change, `isDirectory` also returns `true`. On the surface, treating a NTFS directory junction as "other" make sense as they don't fit the file kinds known to the platform. The only reparse points that the JDK can sensibly deal with are symbolic links and Unix domain socket files. My main concern is what might be depending on existing behavior and what inconsistencies will surface if we change this. Would it be possible to enumerate how some of the APIs behave before+after this change? I'm specifically wondering about toRealPath and Files.list/walk behave now and how they will behave with the change. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26631#issuecomment-3153735203 From vyazici at openjdk.org Tue Aug 5 08:37:57 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Tue, 5 Aug 2025 08:37:57 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character Message-ID: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> Fix `HKSCS` encoder to correctly set the replacement character, and add tests to verify the `CodingErrorAction.REPLACE` behavior of all available encoders. ------------- Commit messages: - Add test to verify `CodingErrorAction.REPLACE` for all charsets - Fix incorrect `HKSCS::repl` override Changes: https://git.openjdk.org/jdk/pull/26635/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26635&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8364365 Stats: 483 lines in 3 files changed: 472 ins; 9 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/26635.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26635/head:pull/26635 PR: https://git.openjdk.org/jdk/pull/26635 From vyazici at openjdk.org Tue Aug 5 08:38:02 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Tue, 5 Aug 2025 08:38:02 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character In-Reply-To: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> Message-ID: On Tue, 5 Aug 2025 08:17:40 GMT, Volkan Yazici wrote: > Fix `HKSCS` encoder to correctly set the replacement character, and add tests to verify the `CodingErrorAction.REPLACE` behavior of all available encoders. test/jdk/sun/nio/cs/TestEncoderReplaceLatin1.java line 1: > 1: /* Without the `HKSCS` fix, this test fails for following charsets: Big5-HKSCS x-Big5-HKSCS-2001 x-MS950-HKSCS x-MS950-HKSCS-XP test/jdk/sun/nio/cs/TestEncoderReplaceLatin1.java line 139: > 137: return coderResult.isUnmappable(); > 138: }; > 139: } I'd appreciate it if you can double-check these _"Is the given `char[]` unmappable for a particular encoder?"_ test generators. test/jdk/sun/nio/cs/TestEncoderReplaceLatin1.java line 145: > 143: * different from the given unmappable and the default one. > 144: */ > 145: static byte[] findCustomReplacement(CharsetEncoder encoder, byte[] unmappable) { I'd appreciate it if you can double-check this method. test/jdk/sun/nio/cs/TestEncoderReplaceUTF16.java line 50: > 48: * @build TestEncoderReplaceLatin1 > 49: * @run junit/timeout=10 TestEncoderReplaceUTF16 > 50: * @run junit/timeout=10/othervm -XX:-CompactStrings TestEncoderReplaceUTF16 1. Exercising both compact and inflated layouts for UTF-16. 2. Timeouts ensure that if the `CHARSETS_WITHOUT_UNMAPPABLE` fast-path in `findUnmappableNonLatin1()` becomes ineffective, we will get to know test/jdk/sun/nio/cs/TestEncoderReplaceUTF16.java line 140: > 138: * Finds an {@linkplain CoderResult#isUnmappable() unmappable} non-Latin-1 {@code char[]} for the given encoder. > 139: */ > 140: private static char[] findUnmappableNonLatin1(CharsetEncoder encoder) { I'd appreciate it if you can double-check this method. test/jdk/sun/nio/cs/TestEncoderReplaceUTF16.java line 146: > 144: System.err.println("Character set is known to be absent of unmappable non-Latin-1 characters!"); > 145: return null; > 146: } Without this fast-path, this test take several minutes to complete due to `findUnmappableNonLatin1()` taking ~20 seconds for each character set absent of unmappable Latin-1 characters. test/jdk/sun/nio/cs/TestEncoderReplaceUTF16.java line 184: > 182: } > 183: return sa; > 184: } Used `JavaLangAccess::uncheckedPutCharUTF16` to, given a `char[]`, extract the `byte[]` backing the associated `String`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2253526576 PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2253550878 PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2253554481 PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2253532986 PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2253556174 PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2253530248 PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2253542908 From pminborg at openjdk.org Tue Aug 5 09:08:47 2025 From: pminborg at openjdk.org (Per Minborg) Date: Tue, 5 Aug 2025 09:08:47 GMT Subject: RFR: 8359119: Change Charset to use StableValue [v3] In-Reply-To: References: Message-ID: <_slUSdx6gVElcqEg71xpeHsa99DhZ3YteV84gZvR5Hc=.73afbad1-6ba8-487b-ac44-b6cc09fdafc7@github.com> > Fields and methods can better leverage the Stable Value API compared to using DCL and holder classes. There are also some fields that can be marked `@Stable`. > > This PR passes tier1, tier2, and tier3 tests on multiple platforms. 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 six additional commits since the last revision: - Address comments in PR - Merge branch 'master' into stablify-charset - Revert for loop - Revert more - Revert changes - Add stable value functionality ------------- Changes: - all: https://git.openjdk.org/jdk/pull/25727/files - new: https://git.openjdk.org/jdk/pull/25727/files/21a43faa..728b190f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=25727&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25727&range=01-02 Stats: 98272 lines in 2418 files changed: 56523 ins; 27371 del; 14378 mod Patch: https://git.openjdk.org/jdk/pull/25727.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/25727/head:pull/25727 PR: https://git.openjdk.org/jdk/pull/25727 From pminborg at openjdk.org Tue Aug 5 09:32:05 2025 From: pminborg at openjdk.org (Per Minborg) Date: Tue, 5 Aug 2025 09:32:05 GMT Subject: RFR: 8359119: Change Charset to use StableValue [v2] In-Reply-To: <1HAw1r5SQYTZXX2x4yX6se2gllfH4-o_awAHam6ryKY=.c1da7095-c3ac-4dd0-a9af-d7cc29442a03@github.com> References: <1HAw1r5SQYTZXX2x4yX6se2gllfH4-o_awAHam6ryKY=.c1da7095-c3ac-4dd0-a9af-d7cc29442a03@github.com> Message-ID: On Sun, 20 Jul 2025 22:14:37 GMT, Shaojin Wen wrote: >> Per Minborg has updated the pull request incrementally with three additional commits since the last revision: >> >> - Revert for loop >> - Revert more >> - Revert changes > > After this proposal, the startup will load 9 more classes > > * Java Code > > public class Startup { > public static void main(String[] args) throws Exception { > Thread.sleep(1000); > } > } > > > > ./build/macosx-aarch64-server-release/images/jdk/bin/java -verbose:class Startup > > > By comparing the output before and after this proposal, we can see that 9 more classes are loaded, as follows: > > [info][class,load] java.nio.charset.Charset$2 > [info][class,load] java.lang.StableValue > [info][class,load] java.util.Objects > [info][class,load] jdk.internal.lang.stable.StableSupplier > [info][class,load] jdk.internal.lang.stable.StableValueImpl > [info][class,load] java.nio.charset.Charset$3 > [info][class,load] java.nio.charset.Charset$4 > [info][class,load] java.nio.charset.Charset$5 > [info][class,load] jdk.internal.ref.Cleaner After the most recent updates, here is what I see if I run the `Startup` code by @wenshao (comparing with main line JDK 26): [0.017s][info][class,load] java.lang.ScopedValue source: shared objects file [0.017s][info][class,load] java.lang.ScopedValue$Cache source: shared objects file [0.017s][info][class,load] java.nio.charset.Charset$3 source: shared objects file [0.017s][info][class,load] java.nio.charset.Charset$4 source: shared objects file [0.017s][info][class,load] java.nio.charset.Charset$5 source: shared objects file ------------- PR Comment: https://git.openjdk.org/jdk/pull/25727#issuecomment-3154291506 From alanb at openjdk.org Tue Aug 5 10:14:15 2025 From: alanb at openjdk.org (Alan Bateman) Date: Tue, 5 Aug 2025 10:14:15 GMT Subject: RFR: 8359119: Change Charset to use StableValue [v3] In-Reply-To: <_slUSdx6gVElcqEg71xpeHsa99DhZ3YteV84gZvR5Hc=.73afbad1-6ba8-487b-ac44-b6cc09fdafc7@github.com> References: <_slUSdx6gVElcqEg71xpeHsa99DhZ3YteV84gZvR5Hc=.73afbad1-6ba8-487b-ac44-b6cc09fdafc7@github.com> Message-ID: On Tue, 5 Aug 2025 09:08:47 GMT, Per Minborg wrote: >> Fields and methods can better leverage the Stable Value API compared to using DCL and holder classes. There are also some fields that can be marked `@Stable`. >> >> This PR passes tier1, tier2, and tier3 tests on multiple platforms. > > 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 six additional commits since the last revision: > > - Address comments in PR > - Merge branch 'master' into stablify-charset > - Revert for loop > - Revert more > - Revert changes > - Add stable value functionality src/java.base/share/classes/java/nio/charset/Charset.java line 387: > 385: } > 386: > 387: private static final ScopedValue IN_LOOKUP = ScopedValue.newInstance(); Thanks for change this to use ScopedValue. Once we change URL and ZipFile to do the same then it should remove the loading of ThreadTracker from startup to offset the loading of other classes. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25727#discussion_r2253875925 From bpb at openjdk.org Tue Aug 5 16:07:02 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 5 Aug 2025 16:07:02 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 06:53:24 GMT, Alan Bateman wrote: > Would it be possible to enumerate how some of the APIs behave before+after this change? I will investigate this. Meanwhile I should note that all `jdk_nio` pass in the CI. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26631#issuecomment-3155743847 From bpb at openjdk.org Tue Aug 5 17:48:59 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 5 Aug 2025 17:48:59 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v2] In-Reply-To: References: Message-ID: > Change `BasicFileAttributes` for Windows such that for a directory junction `isOther` returns `true` but all other `is*` methods return `false`. Without this change, `isDirectory` also returns `true`. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8364277: 1) Add and use package scope isDirectoryJunction(); 2) Remove explicit delete of junction from test ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26631/files - new: https://git.openjdk.org/jdk/pull/26631/files/c5794766..cf9eab46 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26631&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26631&range=00-01 Stats: 12 lines in 3 files changed: 8 ins; 3 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/26631.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26631/head:pull/26631 PR: https://git.openjdk.org/jdk/pull/26631 From duke at openjdk.org Tue Aug 5 18:20:04 2025 From: duke at openjdk.org (Johannes =?UTF-8?B?RMO2Ymxlcg==?=) Date: Tue, 5 Aug 2025 18:20:04 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v2] In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 17:48:59 GMT, Brian Burkhalter wrote: >> Change `BasicFileAttributes` for Windows such that for a directory junction `isOther` returns `true` but all other `is*` methods return `false`. Without this change, `isDirectory` also returns `true`. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8364277: 1) Add and use package scope isDirectoryJunction(); 2) Remove explicit delete of junction from test test/lib/jdk/test/lib/util/FileUtils.java line 457: > 455: // Create a directory junction or a symbolic link > 456: if (IS_WINDOWS) { > 457: if (!nativeLibLoaded) { Suggestion: Since this logic to load the FileUtils library is now used twice, why not move it into a helper method which might also be synchronized (if tests are executed in parallel). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2255022423 From bpb at openjdk.org Tue Aug 5 18:24:07 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 5 Aug 2025 18:24:07 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v2] In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 18:17:32 GMT, Johannes D?bler wrote: > Since this logic to load the FileUtils library is now used twice, why not move it into a helper method Sounds like a good idea. I'll investigate. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2255029517 From duke at openjdk.org Tue Aug 5 18:45:05 2025 From: duke at openjdk.org (Johannes =?UTF-8?B?RMO2Ymxlcg==?=) Date: Tue, 5 Aug 2025 18:45:05 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v2] In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 17:48:59 GMT, Brian Burkhalter wrote: >> Change `BasicFileAttributes` for Windows such that for a directory junction `isOther` returns `true` but all other `is*` methods return `false`. Without this change, `isDirectory` also returns `true`. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8364277: 1) Add and use package scope isDirectoryJunction(); 2) Remove explicit delete of junction from test test/lib/jdk/test/lib/util/FileUtils.java line 449: > 447: > 448: // Create a link from "junction" to the real path of "target" > 449: public static boolean createDirectoryJunction(String junction, String target) Suggestion: Use Path as type for parameters `junction` and `target` to avoid Path|File->String->Path|File conversions (e.g. the only caller Basic.java already has a Path object for parameter junction, why convert to a String just to recreate a File inside `createDirectoryJunction`). test/lib/jdk/test/lib/util/FileUtils.java line 463: > 461: return createWinDirectoryJunction(junction, target); > 462: } else { > 463: Files.createSymbolicLink(Path.of(junction), Path.of(target)); Suggestion: Junctions are Windows-only, so why not throw a RuntimeException for the non-windows case (and maybe also rename the method to something like `createWindowsDirectoryJunction`) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2255068530 PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2255040929 From duke at openjdk.org Tue Aug 5 19:31:05 2025 From: duke at openjdk.org (Johannes =?UTF-8?B?RMO2Ymxlcg==?=) Date: Tue, 5 Aug 2025 19:31:05 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v2] In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 17:48:59 GMT, Brian Burkhalter wrote: >> Change `BasicFileAttributes` for Windows such that for a directory junction `isOther` returns `true` but all other `is*` methods return `false`. Without this change, `isDirectory` also returns `true`. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8364277: 1) Add and use package scope isDirectoryJunction(); 2) Remove explicit delete of junction from test test/lib/jdk/test/lib/util/libFileUtils.c line 167: > 165: lpInBuffer = NULL; > 166: > 167: if (result == 0) { Suggestion: Would it be possible to avoid the dreaded goto if ((result != 0) && (CloseHandle(hJunction) != 0)) { return JNI_TRUE; } ...do error handling... ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2255151112 From bpb at openjdk.org Tue Aug 5 19:31:04 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 5 Aug 2025 19:31:04 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v2] In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 18:27:13 GMT, Johannes D?bler wrote: >> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: >> >> 8364277: 1) Add and use package scope isDirectoryJunction(); 2) Remove explicit delete of junction from test > > test/lib/jdk/test/lib/util/FileUtils.java line 463: > >> 461: return createWinDirectoryJunction(junction, target); >> 462: } else { >> 463: Files.createSymbolicLink(Path.of(junction), Path.of(target)); > > Suggestion: Junctions are Windows-only, so why not throw a RuntimeException for the non-windows case (and maybe also rename the method to something like `createWindowsDirectoryJunction`) A `RuntimeException` for non-Windows, i.e., Unix, would be a test failure and we can't have that. I think it would be better to convert the test to JUnit 5 and use [@EnabledOnOs(OS.WINDOWS)](https://docs.junit.org/5.2.0/api/org/junit/jupiter/api/condition/EnabledOnOs.html), but that might not be in this PR. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2255155387 From duke at openjdk.org Tue Aug 5 19:44:09 2025 From: duke at openjdk.org (Johannes =?UTF-8?B?RMO2Ymxlcg==?=) Date: Tue, 5 Aug 2025 19:44:09 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v2] In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 19:28:25 GMT, Brian Burkhalter wrote: >> test/lib/jdk/test/lib/util/FileUtils.java line 463: >> >>> 461: return createWinDirectoryJunction(junction, target); >>> 462: } else { >>> 463: Files.createSymbolicLink(Path.of(junction), Path.of(target)); >> >> Suggestion: Junctions are Windows-only, so why not throw a RuntimeException for the non-windows case (and maybe also rename the method to something like `createWindowsDirectoryJunction`) > > A `RuntimeException` for non-Windows, i.e., Unix, would be a test failure and we can't have that. I think it would be better to convert the test to JUnit 5 and use [@EnabledOnOs(OS.WINDOWS)](https://docs.junit.org/5.2.0/api/org/junit/jupiter/api/condition/EnabledOnOs.html), but that might not be in this PR. Right, but this method is just a helper method not a test method and the caller, e.g. Basic.attributeReadWriteTests|checkAttributesOfJunction should only call it if on Windows. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2255177168 From bpb at openjdk.org Tue Aug 5 19:44:10 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 5 Aug 2025 19:44:10 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v2] In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 19:38:57 GMT, Johannes D?bler wrote: > Right, but this method is just a helper method Okay, I'll look into this and the other suggestions. Thanks. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2255181551 From bpb at openjdk.org Tue Aug 5 21:10:19 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 5 Aug 2025 21:10:19 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 06:53:24 GMT, Alan Bateman wrote: > I'm specifically wondering about toRealPath and Files.list/walk behave now and how they will behave with the change. For a file tree rooted at dir dir: file1* file2* file3* subdir/ dir/subdir: file4* file5* and a directory junction `junction` whose target is `dir`, then for `p = Path.of("junction")`, the results of `p.toRealPath()`, `p.toRealPath(NOFOLLOW_LINKS)`, `Files.list(p)`, and `Files.walk(p, FOLLOW_LINKS)` are identical before and after this change. Only the results of `Files.walk(p)` differ and are as follows: - **before** ```[junction, junction\file1, junction\file2, junction\file3, junction\subdir, junction\subdir\file4, junction\subdir\file5]``` - **after** ```[junction]```. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26631#issuecomment-3156651833 From sherman at openjdk.org Wed Aug 6 00:29:04 2025 From: sherman at openjdk.org (Xueming Shen) Date: Wed, 6 Aug 2025 00:29:04 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character In-Reply-To: References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> Message-ID: On Tue, 5 Aug 2025 08:29:21 GMT, Volkan Yazici wrote: >> Fix `HKSCS` encoder to correctly set the replacement character, and add tests to verify the `CodingErrorAction.REPLACE` behavior of all available encoders. > > test/jdk/sun/nio/cs/TestEncoderReplaceLatin1.java line 139: > >> 137: return coderResult.isUnmappable(); >> 138: }; >> 139: } > > I'd appreciate it if you can double-check these _"Is the given `char[]` unmappable for a particular encoder?"_ test generators. I might be missing something you're trying to do here, but any reason why we can't just go return c -> !encoder.canEncode(c[0]); as the predicate? I think we are doing 'single char', no surrogates, here, right? or simply do with private static char[] findUnmappable(CharsetEncoder encoder) { for (char c = 0; c < 0xff; c++) { if (!encoder.canEncode(c)) return new char[]{c}; } System.err.println("Could not find an unmappable character!"); return null; } ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2255587104 From bpb at openjdk.org Wed Aug 6 01:11:48 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Wed, 6 Aug 2025 01:11:48 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v3] In-Reply-To: References: Message-ID: > Change `BasicFileAttributes` for Windows such that for a directory junction `isOther` returns `true` but all other `is*` methods return `false`. Without this change, `isDirectory` also returns `true`. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8364277: Clean up per reviewer comments ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26631/files - new: https://git.openjdk.org/jdk/pull/26631/files/cf9eab46..ebd6f415 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26631&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26631&range=01-02 Stats: 34 lines in 3 files changed: 9 ins; 12 del; 13 mod Patch: https://git.openjdk.org/jdk/pull/26631.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26631/head:pull/26631 PR: https://git.openjdk.org/jdk/pull/26631 From bpb at openjdk.org Wed Aug 6 01:14:10 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Wed, 6 Aug 2025 01:14:10 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v2] In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 18:41:44 GMT, Johannes D?bler wrote: >> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: >> >> 8364277: 1) Add and use package scope isDirectoryJunction(); 2) Remove explicit delete of junction from test > > test/lib/jdk/test/lib/util/FileUtils.java line 449: > >> 447: >> 448: // Create a link from "junction" to the real path of "target" >> 449: public static boolean createDirectoryJunction(String junction, String target) > > Suggestion: Use Path as type for parameters `junction` and `target` to avoid Path|File->String->Path|File conversions (e.g. the only caller Basic.java already has a Path object for parameter junction, why convert to a String just to recreate a File inside `createDirectoryJunction`). Done in ebd6f41. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2255636088 From bpb at openjdk.org Wed Aug 6 01:14:11 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Wed, 6 Aug 2025 01:14:11 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v2] In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 18:21:12 GMT, Brian Burkhalter wrote: >> test/lib/jdk/test/lib/util/FileUtils.java line 457: >> >>> 455: // Create a directory junction or a symbolic link >>> 456: if (IS_WINDOWS) { >>> 457: if (!nativeLibLoaded) { >> >> Suggestion: Since this logic to load the FileUtils library is now used twice, why not move it into a helper method which might also be synchronized (if tests are executed in parallel). > >> Since this logic to load the FileUtils library is now used twice, why not move it into a helper method > > Sounds like a good idea. I'll investigate. Done in ebd6f41. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2255635632 From bpb at openjdk.org Wed Aug 6 01:14:11 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Wed, 6 Aug 2025 01:14:11 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v2] In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 19:41:11 GMT, Brian Burkhalter wrote: >> Right, but this method is just a helper method not a test method and the caller, e.g. Basic.attributeReadWriteTests|checkAttributesOfJunction should only call it if on Windows. > >> Right, but this method is just a helper method > > Okay, I'll look into this and the other suggestions. Thanks. Done in ebd6f41. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2255635876 From bpb at openjdk.org Wed Aug 6 01:17:20 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Wed, 6 Aug 2025 01:17:20 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v2] In-Reply-To: References: Message-ID: On Tue, 5 Aug 2025 19:26:36 GMT, Johannes D?bler wrote: > Would it be possible to avoid the dreaded goto I expect so, with some careful editing. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2255638428 From sherman at openjdk.org Wed Aug 6 01:54:14 2025 From: sherman at openjdk.org (Xueming Shen) Date: Wed, 6 Aug 2025 01:54:14 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character In-Reply-To: References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> Message-ID: <7s4yftGeq4vQ9KGg-Ir2kYeGB14AM5NO2-7cFrMyweA=.985d6857-b33d-4c4a-a901-a0c42f06849d@github.com> On Tue, 5 Aug 2025 08:31:31 GMT, Volkan Yazici wrote: >> Fix `HKSCS` encoder to correctly set the replacement character, and add tests to verify the `CodingErrorAction.REPLACE` behavior of all available encoders. > > test/jdk/sun/nio/cs/TestEncoderReplaceUTF16.java line 140: > >> 138: * Finds an {@linkplain CoderResult#isUnmappable() unmappable} non-Latin-1 {@code char[]} for the given encoder. >> 139: */ >> 140: private static char[] findUnmappableNonLatin1(CharsetEncoder encoder) { > > I'd appreciate it if you can double-check this method. I would assume your "double char" actually means the "surrogate pair"? I believe for the first pass of scanning you might want to skip the 'surrogate", as a single dangling surrogate char should trigger a "malformed" error, instead of 'unmappable", if the charset is implemented to handle supplementary character. for (char c = 0xFF; c < 0xFFFF; c++) { if (Character.isSurrogate(c)) continue; if (!encoder.canEncode(c)) return new char[]{c}; } And for the second pass for the 'surrogates", I think we can just pick any non-bmp panel, which should always be translated into a surrogate pair and check if the charset can map/encode it, if not, it's our candidate. for (int i = 0x10000; i < 0x1FFFF; i++) { char[] cc = Character.toChars(i); if (!encoder.canEncode(new String(cc))) return cc; } ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2255682596 From sherman at openjdk.org Wed Aug 6 02:20:03 2025 From: sherman at openjdk.org (Xueming Shen) Date: Wed, 6 Aug 2025 02:20:03 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character In-Reply-To: References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> Message-ID: On Tue, 5 Aug 2025 08:20:55 GMT, Volkan Yazici wrote: >> Fix `HKSCS` encoder to correctly set the replacement character, and add tests to verify the `CodingErrorAction.REPLACE` behavior of all available encoders. > > test/jdk/sun/nio/cs/TestEncoderReplaceUTF16.java line 146: > >> 144: System.err.println("Character set is known to be absent of unmappable non-Latin-1 characters!"); >> 145: return null; >> 146: } > > Without this fast-path, this test take several minutes to complete due to `findUnmappableNonLatin1()` taking ~20 seconds for each character set absent of unmappable Latin-1 characters. we definitely want to exclude 'some' charsets here. yes, all unicode variants probably should be excluded, as they are expected to have a 'mapping' for every unicode character. Additionally, many charsets have an "internal status", meaning they might shift in and shift out its status based on input. See https://www.rfc-editor.org/rfc/rfc1468.html for an example. The encoder might/should add the shift-in/out escape sequence characters on top of the 'replacement', if the replacement character's target sub-charset does not match the 'existing' sub-charset. i would assume this is really out of the scope of this pr though :-) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2255705386 From alanb at openjdk.org Wed Aug 6 06:06:04 2025 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 6 Aug 2025 06:06:04 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v3] In-Reply-To: References: Message-ID: On Wed, 6 Aug 2025 01:11:48 GMT, Brian Burkhalter wrote: >> Change `BasicFileAttributes` for Windows such that for a directory junction `isOther` returns `true` but all other `is*` methods return `false`. Without this change, `isDirectory` also returns `true`. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8364277: Clean up per reviewer comments src/java.base/windows/classes/sun/nio/fs/WindowsFileAttributes.java line 419: > 417: return false; > 418: return ((fileAttrs & FILE_ATTRIBUTE_DIRECTORY) != 0 && > 419: (fileAttrs & FILE_ATTRIBUTE_REPARSE_POINT) != 0); Should this just check if reparseTag has the value IO_REPARSE_TAG_MOUNT_POINT? src/java.base/windows/classes/sun/nio/fs/WindowsFileAttributes.java line 436: > 434: if (isSymbolicLink()) > 435: return false; > 436: return ((fileAttrs & FILE_ATTRIBUTE_DIRECTORY) != 0 && I assume it means that isDirectory no longer needs to use isSymbolicLink as the change means it will return false for all files that are reparse points. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2255946387 PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2255949663 From vyazici at openjdk.org Wed Aug 6 10:01:13 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Wed, 6 Aug 2025 10:01:13 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character In-Reply-To: References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> Message-ID: On Wed, 6 Aug 2025 02:17:15 GMT, Xueming Shen wrote: > if the replacement character's target sub-charset does not match the 'existing' sub-charset In such a `replacement`, does `CharsetEncoder::isLegalReplacement` still return `true`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2256646879 From vyazici at openjdk.org Wed Aug 6 10:55:02 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Wed, 6 Aug 2025 10:55:02 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character In-Reply-To: <7s4yftGeq4vQ9KGg-Ir2kYeGB14AM5NO2-7cFrMyweA=.985d6857-b33d-4c4a-a901-a0c42f06849d@github.com> References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> <7s4yftGeq4vQ9KGg-Ir2kYeGB14AM5NO2-7cFrMyweA=.985d6857-b33d-4c4a-a901-a0c42f06849d@github.com> Message-ID: On Wed, 6 Aug 2025 01:51:54 GMT, Xueming Shen wrote: > for (char c = 0xFF; c < 0xFFFF; c++) Doesn't this exclude `0xFFFF`, which is a valid (single-`char`, non-surrogate) BMP character? > ... we can just pick any non-bmp panel ... > ``` > for (int i = 0x10000; i < 0x1FFFF; i++) { ... > ``` Doesn't the non-BMP range rather end with 0x10FFFF? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2256774007 From duke at openjdk.org Wed Aug 6 14:07:22 2025 From: duke at openjdk.org (duke) Date: Wed, 6 Aug 2025 14:07:22 GMT Subject: Withdrawn: 8353923: (fs) Further improve performance of URI -> Path conversion (win) In-Reply-To: References: Message-ID: On Mon, 14 Apr 2025 23:48:18 GMT, Brian Burkhalter wrote: > If the path portion of a `URI` permits, then simply replace all `'\'` with `'/'` instead of completely parsing the path. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jdk/pull/24638 From bpb at openjdk.org Wed Aug 6 17:39:25 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Wed, 6 Aug 2025 17:39:25 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v4] In-Reply-To: References: Message-ID: <-brKvHWh2bXqcbEOObF6pI7lZaS6P19CnWXppe4xt84=.4627fb30-7a31-45ed-b04e-a72fb2d2c7d0@github.com> > Change `BasicFileAttributes` for Windows such that for a directory junction `isOther` returns `true` but all other `is*` methods return `false`. Without this change, `isDirectory` also returns `true`. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8364277: 1) improve isDirectory[Junction] per Reviewer comments; 2) restructure native test code to remove the dreaded gotos ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26631/files - new: https://git.openjdk.org/jdk/pull/26631/files/ebd6f415..481bdbcc Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26631&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26631&range=02-03 Stats: 100 lines in 3 files changed: 31 ins; 35 del; 34 mod Patch: https://git.openjdk.org/jdk/pull/26631.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26631/head:pull/26631 PR: https://git.openjdk.org/jdk/pull/26631 From bpb at openjdk.org Wed Aug 6 17:39:27 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Wed, 6 Aug 2025 17:39:27 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v3] In-Reply-To: References: Message-ID: <0C-F2471I42736TtBGckvNQ_C6pv3urTQTLQ-4zcIbk=.8ff4af39-4d0d-41c5-8cb2-b857f9a98d3c@github.com> On Wed, 6 Aug 2025 06:01:07 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: >> >> 8364277: Clean up per reviewer comments > > src/java.base/windows/classes/sun/nio/fs/WindowsFileAttributes.java line 419: > >> 417: return false; >> 418: return ((fileAttrs & FILE_ATTRIBUTE_DIRECTORY) != 0 && >> 419: (fileAttrs & FILE_ATTRIBUTE_REPARSE_POINT) != 0); > > Should this just check if reparseTag has the value IO_REPARSE_TAG_MOUNT_POINT? So changed in 481bdbc. > src/java.base/windows/classes/sun/nio/fs/WindowsFileAttributes.java line 436: > >> 434: if (isSymbolicLink()) >> 435: return false; >> 436: return ((fileAttrs & FILE_ATTRIBUTE_DIRECTORY) != 0 && > > I assume it means that isDirectory no longer needs to use isSymbolicLink as the change means it will return false for all files that are reparse points. So changed in 481bdbc. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2257849276 PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2257849755 From bpb at openjdk.org Wed Aug 6 17:39:28 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Wed, 6 Aug 2025 17:39:28 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v2] In-Reply-To: References: Message-ID: On Wed, 6 Aug 2025 01:14:15 GMT, Brian Burkhalter wrote: >> test/lib/jdk/test/lib/util/libFileUtils.c line 167: >> >>> 165: lpInBuffer = NULL; >>> 166: >>> 167: if (result == 0) { >> >> Suggestion: Would it be possible to avoid the dreaded goto >> >> if ((result != 0) && (CloseHandle(hJunction) != 0)) { >> return JNI_TRUE; >> } >> ...do error handling... > >> Would it be possible to avoid the dreaded goto > > I expect so, with some careful editing. `goto`s removed in 481bdbc. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2257848055 From cushon at openjdk.org Wed Aug 6 17:49:26 2025 From: cushon at openjdk.org (Liam Miller-Cushon) Date: Wed, 6 Aug 2025 17:49:26 GMT Subject: RFR: 8344332: (bf) Migrate DirectByteBuffer away from jdk.internal.ref.Cleaner [v7] In-Reply-To: References: Message-ID: On Thu, 17 Jul 2025 15:23:10 GMT, Liam Miller-Cushon wrote: >> Kim Barrett has updated the pull request incrementally with two additional commits since the last revision: >> >> - add @Override for clean() method >> - more commentary for reserveMemory > > src/java.base/share/classes/java/nio/BufferCleaner.java line 203: > >> 201: } >> 202: >> 203: private static final class CleaningThread extends Thread { > > Similar to https://bugs.openjdk.org/browse/JDK-8346124, should this be creating an `InnocuousThread`? I filed https://bugs.openjdk.org/browse/JDK-8364954 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25289#discussion_r2257877328 From sherman at openjdk.org Wed Aug 6 18:04:28 2025 From: sherman at openjdk.org (Xueming Shen) Date: Wed, 6 Aug 2025 18:04:28 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character In-Reply-To: References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> <7s4yftGeq4vQ9KGg-Ir2kYeGB14AM5NO2-7cFrMyweA=.985d6857-b33d-4c4a-a901-a0c42f06849d@github.com> Message-ID: On Wed, 6 Aug 2025 10:52:00 GMT, Volkan Yazici wrote: >> I would assume your "double char" actually means the "surrogate pair"? >> >> I believe for the first pass of scanning you might want to skip the 'surrogate", as a single dangling surrogate char should trigger a "malformed" error, instead of 'unmappable", if the charset is implemented to handle supplementary character. >> >> for (char c = 0xFF; c < 0xFFFF; c++) { >> if (Character.isSurrogate(c)) >> continue; >> if (!encoder.canEncode(c)) >> return new char[]{c}; >> } >> >> And for the second pass for the 'surrogates", I think we can just pick any non-bmp panel, which should always be translated into a surrogate pair and check if the charset can map/encode it, if not, it's our candidate. >> >> for (int i = 0x10000; i < 0x1FFFF; i++) { >> char[] cc = Character.toChars(i); >> if (!encoder.canEncode(new String(cc))) >> return cc; >> } > >> for (char c = 0xFF; c < 0xFFFF; c++) > > Doesn't this exclude `0xFFFF`, which is a valid (single-`char`, non-surrogate) BMP character? > >> ... we can just pick any non-bmp panel ... >> ``` >> for (int i = 0x10000; i < 0x1FFFF; i++) { ... >> ``` > > Doesn't the non-BMP range rather end with 0x10FFFF? (1) we might want to include 0xffff in first pass (2) we just need to pick any unmappable non-bmp character, i would assume that it should be pretty safe we will find one in the first non-bmp panel that is not encoded by a specific charset. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2257902674 From alanb at openjdk.org Wed Aug 6 18:32:17 2025 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 6 Aug 2025 18:32:17 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v3] In-Reply-To: <0C-F2471I42736TtBGckvNQ_C6pv3urTQTLQ-4zcIbk=.8ff4af39-4d0d-41c5-8cb2-b857f9a98d3c@github.com> References: <0C-F2471I42736TtBGckvNQ_C6pv3urTQTLQ-4zcIbk=.8ff4af39-4d0d-41c5-8cb2-b857f9a98d3c@github.com> Message-ID: <58J2J4rqzVd5wTpMm7cf16SuQBGu0AtSoTRzoOMdyo0=.551b985d-5ef3-4945-85dd-9660103f90a1@github.com> On Wed, 6 Aug 2025 17:34:13 GMT, Brian Burkhalter wrote: >> src/java.base/windows/classes/sun/nio/fs/WindowsFileAttributes.java line 419: >> >>> 417: return false; >>> 418: return ((fileAttrs & FILE_ATTRIBUTE_DIRECTORY) != 0 && >>> 419: (fileAttrs & FILE_ATTRIBUTE_REPARSE_POINT) != 0); >> >> Should this just check if reparseTag has the value IO_REPARSE_TAG_MOUNT_POINT? > > So changed in 481bdbc. Thanks for these updates, the src changes look good now. I haven't looked at the test updates yet, will try to get to this soon. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2257960839 From sherman at openjdk.org Wed Aug 6 18:35:16 2025 From: sherman at openjdk.org (Xueming Shen) Date: Wed, 6 Aug 2025 18:35:16 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character In-Reply-To: References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> Message-ID: On Wed, 6 Aug 2025 09:58:16 GMT, Volkan Yazici wrote: >> we definitely want to exclude 'some' charsets here. yes, all unicode variants probably should be excluded, as they are expected to have a 'mapping' for every unicode character. Additionally, many charsets have an "internal status", meaning they might shift in and shift out its status based on input. See https://www.rfc-editor.org/rfc/rfc1468.html for an example. The encoder might/should add the shift-in/out escape sequence characters on top of the 'replacement', if the replacement character's target sub-charset does not match the 'existing' sub-charset. i would assume this is really out of the scope of this pr though :-) > >> if the replacement character's target sub-charset does not match the 'existing' sub-charset > > In such a `replacement`, does `CharsetEncoder::isLegalReplacement` still return `true`? it's 'tricky' :-) some charsets have a default initial status, ascii-charset for example, this might trigger false return if the replacement is set without the appropriate shift-in/out esc-seq when target-sub-charset and existing charset are not matched. I'm not confident that all our implementations really handle it correctly :-) it might be interested (not really :-) given these charsets might not be that important these days and it's rare people try to change the default replacement bytes) to do full-scan-check, but again probably is not in-scope of this change. iso2022-jp is one such charset. we attempt to shift-in to the correct sub-charset by keeping the requested mode in **_implReplaceWith_** protected void implReplaceWith(byte[] newReplacement) { /* It's almost impossible to decide which charset they belong to. The best thing we can do here is to "guess" based on the length of newReplacement. */ if (newReplacement.length == 1) { replaceMode = ASCII; } else if (newReplacement.length == 2) { replaceMode = JISX0208_1983; } } then during encoding if (unmappableCharacterAction() == CodingErrorAction.REPLACE && currentMode != replaceMode) { if (dl - dp < 3) return CoderResult.OVERFLOW; if (replaceMode == ASCII) { da[dp++] = (byte)0x1b; da[dp++] = (byte)0x28; da[dp++] = (byte)0x42; } else { da[dp++] = (byte)0x1b; da[dp++] = (byte)0x24; da[dp++] = (byte)0x42; } currentMode = replaceMode; } i believe this might not be really bulletproved. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2257966394 From bpb at openjdk.org Wed Aug 6 19:59:53 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Wed, 6 Aug 2025 19:59:53 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v5] In-Reply-To: References: Message-ID: <0_fTcRHQzc6aQs3Y_9iO__ygAcdP97VNH3eOVCMi_V8=.26d9cdbf-9fa5-487a-85de-03a15742d202@github.com> > Change `BasicFileAttributes` for Windows such that for a directory junction `isOther` returns `true` but all other `is*` methods return `false`. Without this change, `isDirectory` also returns `true`. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8364277: Ignore restricted warning building BUILD_TEST_LIB_JAR ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26631/files - new: https://git.openjdk.org/jdk/pull/26631/files/481bdbcc..60f5315b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26631&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26631&range=03-04 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/26631.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26631/head:pull/26631 PR: https://git.openjdk.org/jdk/pull/26631 From rriggs at openjdk.org Wed Aug 6 20:18:26 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Wed, 6 Aug 2025 20:18:26 GMT Subject: RFR: 8364213: (bf) Improve java/nio/Buffer/CharBufferAsCharSequenceTest test comments [v5] In-Reply-To: <9_5FaV4QTFnERfhlbO4T1ALBLBLS2XnzfEFIakiMdJM=.18e999fa-2772-4c8b-9249-ee4241141cf4@github.com> References: <9_5FaV4QTFnERfhlbO4T1ALBLBLS2XnzfEFIakiMdJM=.18e999fa-2772-4c8b-9249-ee4241141cf4@github.com> Message-ID: On Fri, 1 Aug 2025 16:28:11 GMT, Brett Okken wrote: >> Address code review comments which came in post integration/merge of https://github.com/openjdk/jdk/pull/26282. >> >> Update/clarify test summary tag >> Document the values generated for arguments >> Move the endian-ness qualifier in the test descriptor string to not be first >> Change test method names to more closely match arg names of method under test > > Brett Okken has updated the pull request incrementally with one additional commit since the last revision: > > remove static test cases Looks good, thanks for the test improvements. ------------- Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26512#pullrequestreview-3094103208 From cushon at openjdk.org Wed Aug 6 23:22:24 2025 From: cushon at openjdk.org (Liam Miller-Cushon) Date: Wed, 6 Aug 2025 23:22:24 GMT Subject: RFR: 8364954: Migrate CleaningThread in BufferCleaner to InnocuousThread Message-ID: This migrates a `Thread` introduced in [JDK-8344332](https://bugs.openjdk.org/browse/JDK-8344332) to use `InnocuousThread`, similar to the changes in [JDK-8345432](https://bugs.openjdk.org/browse/JDK-8345432) to migrate other uses of `Thread` in `java.nio` to `InnocuousThread`. ------------- Commit messages: - 8364954: Migrate CleaningThread in BufferCleaner to InnocuousThread Changes: https://git.openjdk.org/jdk/pull/26665/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26665&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8364954 Stats: 6 lines in 1 file changed: 2 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/26665.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26665/head:pull/26665 PR: https://git.openjdk.org/jdk/pull/26665 From bpb at openjdk.org Thu Aug 7 00:45:20 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 7 Aug 2025 00:45:20 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v6] In-Reply-To: References: Message-ID: > Change `BasicFileAttributes` for Windows such that for a directory junction `isOther` returns `true` but all other `is*` methods return `false`. Without this change, `isDirectory` also returns `true`. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8364277: Revert change to BuildTestLib.gmk; move @SuppressWarnings to correct place in FileUtils.java ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26631/files - new: https://git.openjdk.org/jdk/pull/26631/files/60f5315b..a30e0ce8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26631&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26631&range=04-05 Stats: 3 lines in 2 files changed: 1 ins; 2 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/26631.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26631/head:pull/26631 PR: https://git.openjdk.org/jdk/pull/26631 From duke at openjdk.org Thu Aug 7 13:33:16 2025 From: duke at openjdk.org (duke) Date: Thu, 7 Aug 2025 13:33:16 GMT Subject: RFR: 8364213: (bf) Improve java/nio/Buffer/CharBufferAsCharSequenceTest test comments [v5] In-Reply-To: <9_5FaV4QTFnERfhlbO4T1ALBLBLS2XnzfEFIakiMdJM=.18e999fa-2772-4c8b-9249-ee4241141cf4@github.com> References: <9_5FaV4QTFnERfhlbO4T1ALBLBLS2XnzfEFIakiMdJM=.18e999fa-2772-4c8b-9249-ee4241141cf4@github.com> Message-ID: On Fri, 1 Aug 2025 16:28:11 GMT, Brett Okken wrote: >> Address code review comments which came in post integration/merge of https://github.com/openjdk/jdk/pull/26282. >> >> Update/clarify test summary tag >> Document the values generated for arguments >> Move the endian-ness qualifier in the test descriptor string to not be first >> Change test method names to more closely match arg names of method under test > > Brett Okken has updated the pull request incrementally with one additional commit since the last revision: > > remove static test cases @bokken Your change (at version 9ecfcb0c9ebb4f76eb58b6a42c7805a7645bb82a) is now ready to be sponsored by a Committer. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26512#issuecomment-3164219463 From alanb at openjdk.org Thu Aug 7 13:40:15 2025 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 7 Aug 2025 13:40:15 GMT Subject: RFR: 8364954: Migrate CleaningThread in BufferCleaner to InnocuousThread In-Reply-To: References: Message-ID: On Wed, 6 Aug 2025 23:17:27 GMT, Liam Miller-Cushon wrote: > This migrates a `Thread` introduced in [JDK-8344332](https://bugs.openjdk.org/browse/JDK-8344332) to use `InnocuousThread`, similar to the changes in [JDK-8345432](https://bugs.openjdk.org/browse/JDK-8345432) to migrate other uses of `Thread` in `java.nio` to `InnocuousThread`. Marked as reviewed by alanb (Reviewer). src/java.base/share/classes/java/nio/BufferCleaner.java line 239: > 237: private static final CleanerList cleanerList = new CleanerList(); > 238: private static final ReferenceQueue queue = new ReferenceQueue(); > 239: private static Thread cleaningThread = null; "= null" can be dropped. ------------- PR Review: https://git.openjdk.org/jdk/pull/26665#pullrequestreview-3097205092 PR Review Comment: https://git.openjdk.org/jdk/pull/26665#discussion_r2260365146 From rriggs at openjdk.org Thu Aug 7 14:12:17 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 7 Aug 2025 14:12:17 GMT Subject: RFR: 8364954: Migrate CleaningThread in BufferCleaner to InnocuousThread In-Reply-To: References: Message-ID: On Wed, 6 Aug 2025 23:17:27 GMT, Liam Miller-Cushon wrote: > This migrates a `Thread` introduced in [JDK-8344332](https://bugs.openjdk.org/browse/JDK-8344332) to use `InnocuousThread`, similar to the changes in [JDK-8345432](https://bugs.openjdk.org/browse/JDK-8345432) to migrate other uses of `Thread` in `java.nio` to `InnocuousThread`. Looks good. ------------- Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26665#pullrequestreview-3097344154 From vyazici at openjdk.org Thu Aug 7 15:07:08 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Thu, 7 Aug 2025 15:07:08 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character [v2] In-Reply-To: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> Message-ID: > Fix `HKSCS` encoder to correctly set the replacement character, and add tests to verify the `CodingErrorAction.REPLACE` behavior of all available encoders. Volkan Yazici has updated the pull request incrementally with two additional commits since the last revision: - Improve double-`char` unmappable search - Improve single-`char` unmappable search ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26635/files - new: https://git.openjdk.org/jdk/pull/26635/files/4956a5b1..f567f2c8 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26635&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26635&range=00-01 Stats: 55 lines in 2 files changed: 3 ins; 37 del; 15 mod Patch: https://git.openjdk.org/jdk/pull/26635.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26635/head:pull/26635 PR: https://git.openjdk.org/jdk/pull/26635 From vyazici at openjdk.org Thu Aug 7 15:07:10 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Thu, 7 Aug 2025 15:07:10 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character [v2] In-Reply-To: References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> Message-ID: <9pnkM5rC_Exr8vfI4RKcvA_0YFj84V9qMPnQLD45qq4=.3899a66f-0418-4117-afae-9fd7fc12f1b8@github.com> On Wed, 6 Aug 2025 00:25:58 GMT, Xueming Shen wrote: >> test/jdk/sun/nio/cs/TestEncoderReplaceLatin1.java line 139: >> >>> 137: return coderResult.isUnmappable(); >>> 138: }; >>> 139: } >> >> I'd appreciate it if you can double-check these _"Is the given `char[]` unmappable for a particular encoder?"_ test generators. > > I might be missing something you're trying to do here, but any reason why we can't just do > > return c -> !encoder.canEncode(c[0]); > > as the predicate? I think we are doing 'single char', no surrogates, here, right? > > or simply go with > > private static char[] findUnmappable(CharsetEncoder encoder) { > for (char c = 0; c <= 0xff; c++) { > if (!encoder.canEncode(c)) > return new char[]{c}; > } > System.err.println("Could not find an unmappable character!"); > return null; > } You're right. Simplified as suggested in ba1e5ff4de6. I wanted to use `{Single,Double}Byte.Encoder` methods deliberately, since those were the ones triggering the failure. Though `CharsetEncoder#canEncode(char)` should do the trick, plus, it is public. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2260610086 From vyazici at openjdk.org Thu Aug 7 15:07:11 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Thu, 7 Aug 2025 15:07:11 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character [v2] In-Reply-To: References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> <7s4yftGeq4vQ9KGg-Ir2kYeGB14AM5NO2-7cFrMyweA=.985d6857-b33d-4c4a-a901-a0c42f06849d@github.com> Message-ID: On Wed, 6 Aug 2025 18:00:00 GMT, Xueming Shen wrote: >>> for (char c = 0xFF; c < 0xFFFF; c++) >> >> Doesn't this exclude `0xFFFF`, which is a valid (single-`char`, non-surrogate) BMP character? >> >>> ... we can just pick any non-bmp panel ... >>> ``` >>> for (int i = 0x10000; i < 0x1FFFF; i++) { ... >>> ``` >> >> Doesn't the non-BMP range rather end with 0x10FFFF? > > (1) we might want to include 0xffff in first pass > (2) we just need to pick any unmappable non-bmp character, i would assume that it should be pretty safe we will find one in the first non-bmp panel that is not encoded by a specific charset. In f567f2c81a3, improved `findUnmappableNonLatin1()` as suggested: Single-`char`: for (int i = 0xFF; i <= 0xFFFF; i++) { char c = (char) i; Double-`char` (i.e., surrogate pair): int[] nonBmpRange = {0x10000, 0x10FFFF}; for (int i = nonBmpRange[0]; i < nonBmpRange[1]; i++) { Note that I took the incentive to use 0x10FFFF as the non-BMP range end ? easier to understand the exhaustive search. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2260609569 From cushon at openjdk.org Thu Aug 7 15:42:57 2025 From: cushon at openjdk.org (Liam Miller-Cushon) Date: Thu, 7 Aug 2025 15:42:57 GMT Subject: RFR: 8364954: (bf) CleaningThread should be InnocuousThread [v2] In-Reply-To: References: Message-ID: On Thu, 7 Aug 2025 13:36:25 GMT, Alan Bateman wrote: >> Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove '= null' > > src/java.base/share/classes/java/nio/BufferCleaner.java line 239: > >> 237: private static final CleanerList cleanerList = new CleanerList(); >> 238: private static final ReferenceQueue queue = new ReferenceQueue(); >> 239: private static Thread cleaningThread = null; > > "= null" can be dropped. Done ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26665#discussion_r2260711742 From cushon at openjdk.org Thu Aug 7 15:42:56 2025 From: cushon at openjdk.org (Liam Miller-Cushon) Date: Thu, 7 Aug 2025 15:42:56 GMT Subject: RFR: 8364954: (bf) CleaningThread should be InnocuousThread [v2] In-Reply-To: References: Message-ID: > This migrates a `Thread` introduced in [JDK-8344332](https://bugs.openjdk.org/browse/JDK-8344332) to use `InnocuousThread`, similar to the changes in [JDK-8345432](https://bugs.openjdk.org/browse/JDK-8345432) to migrate other uses of `Thread` in `java.nio` to `InnocuousThread`. Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision: Remove '= null' ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26665/files - new: https://git.openjdk.org/jdk/pull/26665/files/89394ce2..d306f87b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26665&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26665&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/26665.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26665/head:pull/26665 PR: https://git.openjdk.org/jdk/pull/26665 From bpb at openjdk.org Thu Aug 7 16:13:57 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 7 Aug 2025 16:13:57 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v7] In-Reply-To: References: Message-ID: > Change `BasicFileAttributes` for Windows such that for a directory junction `isOther` returns `true` but all other `is*` methods return `false`. Without this change, `isDirectory` also returns `true`. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8364277: Put IO_REPARSE_TAG_* constants in numerical order ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26631/files - new: https://git.openjdk.org/jdk/pull/26631/files/a30e0ce8..584e04e9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26631&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26631&range=05-06 Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/26631.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26631/head:pull/26631 PR: https://git.openjdk.org/jdk/pull/26631 From alanb at openjdk.org Thu Aug 7 16:13:57 2025 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 7 Aug 2025 16:13:57 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v6] In-Reply-To: References: Message-ID: On Thu, 7 Aug 2025 00:45:20 GMT, Brian Burkhalter wrote: >> Change `BasicFileAttributes` for Windows such that for a directory junction `isOther` returns `true` but all other `is*` methods return `false`. Without this change, `isDirectory` also returns `true`. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8364277: Revert change to BuildTestLib.gmk; move @SuppressWarnings to correct place in FileUtils.java I don't have any other comments. For the FileUtil test infra then we can probably replace the JNI with FFM codes at some point. ------------- Marked as reviewed by alanb (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26631#pullrequestreview-3097818857 From bpb at openjdk.org Thu Aug 7 16:13:57 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 7 Aug 2025 16:13:57 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v6] In-Reply-To: References: Message-ID: <6cd79hZcjbhBwWolEeJqexgluykpgQSdX2UFJGi3YOo=.21d62827-aced-4281-aeb5-334e9c31af56@github.com> On Thu, 7 Aug 2025 16:02:08 GMT, Alan Bateman wrote: > For the FileUtil test infra then we can probably replace the JNI with FFM codes at some point. I will put that on the list. I just pushed another minor commit right after you approved. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26631#issuecomment-3164852054 From alanb at openjdk.org Thu Aug 7 16:13:57 2025 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 7 Aug 2025 16:13:57 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v7] In-Reply-To: References: Message-ID: On Thu, 7 Aug 2025 16:10:37 GMT, Brian Burkhalter wrote: >> Change `BasicFileAttributes` for Windows such that for a directory junction `isOther` returns `true` but all other `is*` methods return `false`. Without this change, `isDirectory` also returns `true`. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8364277: Put IO_REPARSE_TAG_* constants in numerical order Marked as reviewed by alanb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26631#pullrequestreview-3097842635 From bpb at openjdk.org Thu Aug 7 18:38:21 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 7 Aug 2025 18:38:21 GMT Subject: RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v7] In-Reply-To: References: Message-ID: On Thu, 7 Aug 2025 16:13:57 GMT, Brian Burkhalter wrote: >> Change `BasicFileAttributes` for Windows such that for a directory junction `isOther` returns `true` but all other `is*` methods return `false`. Without this change, `isDirectory` also returns `true`. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8364277: Put IO_REPARSE_TAG_* constants in numerical order CI tiers 1-3 passed. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26631#issuecomment-3165288250 From bpb at openjdk.org Thu Aug 7 18:38:33 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 7 Aug 2025 18:38:33 GMT Subject: Integrated: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed In-Reply-To: References: Message-ID: On Mon, 4 Aug 2025 21:38:34 GMT, Brian Burkhalter wrote: > Change `BasicFileAttributes` for Windows such that for a directory junction `isOther` returns `true` but all other `is*` methods return `false`. Without this change, `isDirectory` also returns `true`. This pull request has now been integrated. Changeset: 02e18711 Author: Brian Burkhalter URL: https://git.openjdk.org/jdk/commit/02e187119d0ca94d46e631a174c55db4945f3295 Stats: 236 lines in 6 files changed: 211 ins; 8 del; 17 mod 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed Reviewed-by: alanb ------------- PR: https://git.openjdk.org/jdk/pull/26631 From sherman at openjdk.org Thu Aug 7 19:19:16 2025 From: sherman at openjdk.org (Xueming Shen) Date: Thu, 7 Aug 2025 19:19:16 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character [v2] In-Reply-To: References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> Message-ID: On Thu, 7 Aug 2025 15:07:08 GMT, Volkan Yazici wrote: >> Fix `HKSCS` encoder to correctly set the replacement character, and add tests to verify the `CodingErrorAction.REPLACE` behavior of all available encoders. > > Volkan Yazici has updated the pull request incrementally with two additional commits since the last revision: > > - Improve double-`char` unmappable search > - Improve single-`char` unmappable search test/jdk/sun/nio/cs/TestEncoderReplaceLatin1.java line 251: > 249: sb.append("%sU+%04X".formatted(i > 0 ? ", " : "", (int) c)); > 250: } > 251: return sb.append(']').toString(); just for fun :-) return IntStream.range(0, cs.length) .mapToObj(i -> String.format("U+%04X", (int) cs[i])) .collect(Collectors.joining(", ", "[", "]")); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2261207568 From duke at openjdk.org Thu Aug 7 19:32:20 2025 From: duke at openjdk.org (Brett Okken) Date: Thu, 7 Aug 2025 19:32:20 GMT Subject: Integrated: 8364213: (bf) Improve java/nio/Buffer/CharBufferAsCharSequenceTest test comments In-Reply-To: References: Message-ID: On Mon, 28 Jul 2025 16:43:05 GMT, Brett Okken wrote: > Address code review comments which came in post integration/merge of https://github.com/openjdk/jdk/pull/26282. > > Update/clarify test summary tag > Document the values generated for arguments > Move the endian-ness qualifier in the test descriptor string to not be first > Change test method names to more closely match arg names of method under test This pull request has now been integrated. Changeset: 5116d9e5 Author: Brett Okken Committer: Brian Burkhalter URL: https://git.openjdk.org/jdk/commit/5116d9e5fe6b63f12e9ae0eb5283433256872dc1 Stats: 161 lines in 1 file changed: 69 ins; 75 del; 17 mod 8364213: (bf) Improve java/nio/Buffer/CharBufferAsCharSequenceTest test comments 8364345: Test java/nio/Buffer/CharBufferAsCharSequenceTest.java failed Reviewed-by: bpb, rriggs ------------- PR: https://git.openjdk.org/jdk/pull/26512 From rriggs at openjdk.org Thu Aug 7 19:46:25 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Thu, 7 Aug 2025 19:46:25 GMT Subject: RFR: 8364954: (bf) CleaningThread should be InnocuousThread [v2] In-Reply-To: References: Message-ID: On Thu, 7 Aug 2025 15:42:56 GMT, Liam Miller-Cushon wrote: >> This migrates a `Thread` introduced in [JDK-8344332](https://bugs.openjdk.org/browse/JDK-8344332) to use `InnocuousThread`, similar to the changes in [JDK-8345432](https://bugs.openjdk.org/browse/JDK-8345432) to migrate other uses of `Thread` in `java.nio` to `InnocuousThread`. > > Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision: > > Remove '= null' Marked as reviewed by rriggs (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26665#pullrequestreview-3098523013 From cushon at openjdk.org Thu Aug 7 19:46:26 2025 From: cushon at openjdk.org (Liam Miller-Cushon) Date: Thu, 7 Aug 2025 19:46:26 GMT Subject: Integrated: 8364954: (bf) CleaningThread should be InnocuousThread In-Reply-To: References: Message-ID: On Wed, 6 Aug 2025 23:17:27 GMT, Liam Miller-Cushon wrote: > This migrates a `Thread` introduced in [JDK-8344332](https://bugs.openjdk.org/browse/JDK-8344332) to use `InnocuousThread`, similar to the changes in [JDK-8345432](https://bugs.openjdk.org/browse/JDK-8345432) to migrate other uses of `Thread` in `java.nio` to `InnocuousThread`. This pull request has now been integrated. Changeset: c0e6ffab Author: Liam Miller-Cushon URL: https://git.openjdk.org/jdk/commit/c0e6ffabc216279068ab887939028ca27f5143f2 Stats: 6 lines in 1 file changed: 2 ins; 0 del; 4 mod 8364954: (bf) CleaningThread should be InnocuousThread Reviewed-by: rriggs, alanb ------------- PR: https://git.openjdk.org/jdk/pull/26665 From vyazici at openjdk.org Fri Aug 8 11:45:04 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Fri, 8 Aug 2025 11:45:04 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character [v3] In-Reply-To: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> Message-ID: > Fix `HKSCS` encoder to correctly set the replacement character, and add tests to verify the `CodingErrorAction.REPLACE` behavior of all available encoders. Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision: Improve pretty-printers ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26635/files - new: https://git.openjdk.org/jdk/pull/26635/files/f567f2c8..f056028a Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26635&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26635&range=01-02 Stats: 14 lines in 1 file changed: 2 ins; 6 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/26635.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26635/head:pull/26635 PR: https://git.openjdk.org/jdk/pull/26635 From vyazici at openjdk.org Fri Aug 8 11:45:05 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Fri, 8 Aug 2025 11:45:05 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character [v3] In-Reply-To: References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> Message-ID: On Thu, 7 Aug 2025 19:17:03 GMT, Xueming Shen wrote: >> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision: >> >> Improve pretty-printers > > test/jdk/sun/nio/cs/TestEncoderReplaceLatin1.java line 251: > >> 249: sb.append("%sU+%04X".formatted(i > 0 ? ", " : "", (int) c)); >> 250: } >> 251: return sb.append(']').toString(); > > just for fun :-) > > return IntStream.range(0, cs.length) > .mapToObj(i -> String.format("U+%04X", (int) cs[i])) > .collect(Collectors.joining(", ", "[", "]")); Applied suggestion to both `prettyPrint{Bytes,Chars}` in f056028a. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2262713842 From vyazici at openjdk.org Fri Aug 8 13:38:31 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Fri, 8 Aug 2025 13:38:31 GMT Subject: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v2] In-Reply-To: References: Message-ID: <6LY-pGXEYGVLE2sAYTG8175PvnICXFoHw4velrtLk8E=.dc8a5a32-5c4f-44fa-a281-c5516a22b4bb@github.com> > `NoRepl`-suffixed `String` methods denote methods that do not replace invalid characters, but throw `CharacterCodingException` on encounter. This behavior cannot easily be derived from the method footprints, has been a source of confusion for maintainers, and is not uniformly adopted, e.g., `newStringUTF8NoRepl()` and `getBytesUTF8NoRepl()` does *not* throw `CCE`. This PR removes `NoRepl` suffix from method names and consistently uses `throws CCE` in method footprints. (b4845109e18 passes `tier1,2`.) 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 contains seven additional commits since the last revision: - Group `String` methods by `doReplace` argument - Merge remote-tracking branch 'upstream/master' into jlaNoRepl - Replace `requireNonNull` with implicit null checks - Merge remote-tracking branch 'upstream/master' into jlaNoRepl - Improve docs of touched methods and add NPE checks - Convert IAE-throwing methods into CCE-throwing ones - Rename `JavaLangAccess::*NoRepl` methods ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26413/files - new: https://git.openjdk.org/jdk/pull/26413/files/5f555a68..1fb8582e Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26413&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26413&range=00-01 Stats: 18798 lines in 552 files changed: 11544 ins; 5896 del; 1358 mod Patch: https://git.openjdk.org/jdk/pull/26413.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26413/head:pull/26413 PR: https://git.openjdk.org/jdk/pull/26413 From vyazici at openjdk.org Fri Aug 8 13:51:10 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Fri, 8 Aug 2025 13:51:10 GMT Subject: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods In-Reply-To: References: Message-ID: <4vNV2kY5DmMEoWtuq40MzP2BnudJysIwgcjxJpldxBY=.735cf122-f7bb-4d4c-a2ff-7d49cf86d0bf@github.com> On Tue, 29 Jul 2025 13:25:14 GMT, Roger Riggs wrote: >> `NoRepl`-suffixed `String` methods denote methods that do not replace invalid characters, but throw `CharacterCodingException` on encounter. This behavior cannot easily be derived from the method footprints, has been a source of confusion for maintainers, and is not uniformly adopted, e.g., `newStringUTF8NoRepl()` and `getBytesUTF8NoRepl()` does *not* throw `CCE`. This PR removes `NoRepl` suffix from method names and consistently uses `throws CCE` in method footprints. (b4845109e18 passes `tier1,2`.) > > If CCE should have a constructor with a message, it can be added if you have a clear idea how it would be used. Motivated by @RogerRiggs inquiries, and @AlanBateman's below remark, > Another high level comment from a first read is that it feels like there are two forms needed. One form is REPLACE action and doesn't throw. The other is REPORT action and throws CharacterCodingException. grouped `String` methods by `doReplace` argument in 1fb8582e3f9. There are several `String` methods of the following form: private static byte[] encode8859_1(..., boolean doReplace) { // ... if (!doReplace) { throwUnmappable(sp); } // ... } We want to make `doReplace = false` case visible in the function footprint, and this resulted in: private static byte[] encode8859_1(..., boolean doReplace) throws CCE { ... } Though this propagates the checked `CCE` even for `doReplace = true`. To avoid this, I've grouped methods by `doReplace` argument into two: private static byte[] encode8859_1(...) { ... } private static byte[] encode8859_1NoReplacement(...) throws CCE { ... } As a result, 1. `doReplace = true` call-sites invoke `encode8859_1()`, replacement *will* occur, and there is no checked `CCE` thrown 2. `doReplace = false` call-sites invoke `encode8859_1NoReplacement()`, replacement will *not* occur, and `CCE` needs to be handled ------------- PR Comment: https://git.openjdk.org/jdk/pull/26413#issuecomment-3167985180 From liach at openjdk.org Fri Aug 8 17:32:17 2025 From: liach at openjdk.org (Chen Liang) Date: Fri, 8 Aug 2025 17:32:17 GMT Subject: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v2] In-Reply-To: <6LY-pGXEYGVLE2sAYTG8175PvnICXFoHw4velrtLk8E=.dc8a5a32-5c4f-44fa-a281-c5516a22b4bb@github.com> References: <6LY-pGXEYGVLE2sAYTG8175PvnICXFoHw4velrtLk8E=.dc8a5a32-5c4f-44fa-a281-c5516a22b4bb@github.com> Message-ID: On Fri, 8 Aug 2025 13:38:31 GMT, Volkan Yazici wrote: >> `NoRepl`-suffixed `String` methods denote methods that do not replace invalid characters, but throw `CharacterCodingException` on encounter. This behavior cannot easily be derived from the method footprints, has been a source of confusion for maintainers, and is not uniformly adopted, e.g., `newStringUTF8NoRepl()` and `getBytesUTF8NoRepl()` does *not* throw `CCE`. This PR removes `NoRepl` suffix from method names and consistently uses `throws CCE` in method footprints. (b4845109e18 passes `tier1,2`.) > > 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 contains seven additional commits since the last revision: > > - Group `String` methods by `doReplace` argument > - Merge remote-tracking branch 'upstream/master' into jlaNoRepl > - Replace `requireNonNull` with implicit null checks > - Merge remote-tracking branch 'upstream/master' into jlaNoRepl > - Improve docs of touched methods and add NPE checks > - Convert IAE-throwing methods into CCE-throwing ones > - Rename `JavaLangAccess::*NoRepl` methods src/java.base/share/classes/java/lang/String.java line 855: > 853: int len = val.length >> coder; // assume LATIN1=0/UTF16=1; > 854: int en = scale(len, ce.maxBytesPerChar()); > 855: // Fast-path with `ArrayEncoder` implies replacement. I recommend documenting this on ArrayEncoder instead. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2263641162 From sherman at openjdk.org Fri Aug 8 18:59:12 2025 From: sherman at openjdk.org (Xueming Shen) Date: Fri, 8 Aug 2025 18:59:12 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character [v3] In-Reply-To: References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> Message-ID: <5G5uoIjwsDxy9oxYpH66W53yh2TFmJDYyqSR57ugD78=.cac5b223-f07e-4c73-afc5-7277ee6a6810@github.com> On Fri, 8 Aug 2025 11:45:04 GMT, Volkan Yazici wrote: >> Fix `HKSCS` encoder to correctly set the replacement character, and add tests to verify the `CodingErrorAction.REPLACE` behavior of all available encoders. > > Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision: > > Improve pretty-printers LGTM test/jdk/sun/nio/cs/TestEncoderReplaceLatin1.java line 132: > 130: replacement1[0] = (byte) i; > 131: // Skip the default value, since we're verifying if a custom one works > 132: if (replacement1[0] == replacementD[0]) { nit-pick? if (replacementD.length == 1 && replacement1[0] == replacementD[0]) { ...} ------------- PR Review: https://git.openjdk.org/jdk/pull/26635#pullrequestreview-3101869911 PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2263778167 From sherman at openjdk.org Fri Aug 8 22:15:13 2025 From: sherman at openjdk.org (Xueming Shen) Date: Fri, 8 Aug 2025 22:15:13 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character [v3] In-Reply-To: References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> Message-ID: On Fri, 8 Aug 2025 11:45:04 GMT, Volkan Yazici wrote: >> Fix `HKSCS` encoder to correctly set the replacement character, and add tests to verify the `CodingErrorAction.REPLACE` behavior of all available encoders. > > Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision: > > Improve pretty-printers lgtm ------------- Marked as reviewed by sherman (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26635#pullrequestreview-3102242861 From bpb at openjdk.org Sat Aug 9 00:16:26 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Sat, 9 Aug 2025 00:16:26 GMT Subject: RFR: 8364761: (aio) AsynchronousChannelGroup.execute doesn't check null command Message-ID: <4y55oF0k8jfKkTPnFY182SK5aMdAmfqsDjgbcL8k4t8=.7dd9817d-bf54-465e-9f57-836fdda4c687@github.com> Add `null` check to `AsynchronousChannelGroupImpl.execute`; update existing test. ------------- Commit messages: - 8364761: (aio) AsynchronousChannelGroup.execute doesn't check null command Changes: https://git.openjdk.org/jdk/pull/26709/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26709&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8364761 Stats: 18 lines in 2 files changed: 15 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/26709.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26709/head:pull/26709 PR: https://git.openjdk.org/jdk/pull/26709 From vyazici at openjdk.org Sat Aug 9 07:58:10 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Sat, 9 Aug 2025 07:58:10 GMT Subject: RFR: 8364761: (aio) AsynchronousChannelGroup.execute doesn't check null command In-Reply-To: <4y55oF0k8jfKkTPnFY182SK5aMdAmfqsDjgbcL8k4t8=.7dd9817d-bf54-465e-9f57-836fdda4c687@github.com> References: <4y55oF0k8jfKkTPnFY182SK5aMdAmfqsDjgbcL8k4t8=.7dd9817d-bf54-465e-9f57-836fdda4c687@github.com> Message-ID: On Sat, 9 Aug 2025 00:10:16 GMT, Brian Burkhalter wrote: > Add `null` check to `AsynchronousChannelGroupImpl.execute`; update existing test. LGTM src/java.base/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java line 303: > 301: @Override > 302: public final void execute(Runnable task) { > 303: Objects.requireNonNull(task, "task"); Do we need to add a `@throws NullPointerException if command is null` to the Javadoc? This is already stated in the Javadoc of the overriden method, but since we explicitly provide Javadoc for the override here... test/jdk/java/nio/channels/AsynchronousChannelGroup/AsExecutor.java line 1: > 1: /* Just a thought: This test can be migrated to JUnit, and `@ParameterizedTest` can be used to provide `AsynchronousChannelGroup`s. This will make it easier to add new `AsynchronousChannelGroup`s and test cases. ------------- Marked as reviewed by vyazici (Committer). PR Review: https://git.openjdk.org/jdk/pull/26709#pullrequestreview-3102834912 PR Review Comment: https://git.openjdk.org/jdk/pull/26709#discussion_r2264587638 PR Review Comment: https://git.openjdk.org/jdk/pull/26709#discussion_r2264586927 From alanb at openjdk.org Sat Aug 9 08:19:10 2025 From: alanb at openjdk.org (Alan Bateman) Date: Sat, 9 Aug 2025 08:19:10 GMT Subject: RFR: 8364761: (aio) AsynchronousChannelGroup.execute doesn't check null command In-Reply-To: References: <4y55oF0k8jfKkTPnFY182SK5aMdAmfqsDjgbcL8k4t8=.7dd9817d-bf54-465e-9f57-836fdda4c687@github.com> Message-ID: On Sat, 9 Aug 2025 07:54:47 GMT, Volkan Yazici wrote: >> Add `null` check to `AsynchronousChannelGroupImpl.execute`; update existing test. > > src/java.base/share/classes/sun/nio/ch/AsynchronousChannelGroupImpl.java line 303: > >> 301: @Override >> 302: public final void execute(Runnable task) { >> 303: Objects.requireNonNull(task, "task"); > > Do we need to add a `@throws NullPointerException if command is null` to the Javadoc? This is already stated in the Javadoc of the overriden method, but since we explicitly provide Javadoc for the override here... AsynchronousChannelGroup does not implement Executor. The implementation in the JDK does and the bug report is where someone casts it to an Executor. So an off-piste usage that could break of the JDK implementation changes. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26709#discussion_r2264596678 From vyazici at openjdk.org Sat Aug 9 08:53:20 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Sat, 9 Aug 2025 08:53:20 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character [v3] In-Reply-To: <5G5uoIjwsDxy9oxYpH66W53yh2TFmJDYyqSR57ugD78=.cac5b223-f07e-4c73-afc5-7277ee6a6810@github.com> References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> <5G5uoIjwsDxy9oxYpH66W53yh2TFmJDYyqSR57ugD78=.cac5b223-f07e-4c73-afc5-7277ee6a6810@github.com> Message-ID: On Fri, 8 Aug 2025 18:48:43 GMT, Xueming Shen wrote: >> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision: >> >> Improve pretty-printers > > test/jdk/sun/nio/cs/TestEncoderReplaceLatin1.java line 132: > >> 130: replacement1[0] = (byte) i; >> 131: // Skip the default value, since we're verifying if a custom one works >> 132: if (replacement1[0] == replacementD[0]) { > > nit-pick? > if (replacementD.length == 1 && replacement1[0] == replacementD[0]) { ...} `replacementD` is obtained from `CharsetEncoder#replacement()` and its Javadoc states the following: * @return This encoder's current replacement, * which is never {@code null} and is never empty I had decided to fail when spec. doesn't hold, instead of being lenient against its violation, in particular, since this is a test. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26635#discussion_r2264610149 From liach at openjdk.org Sun Aug 10 14:48:13 2025 From: liach at openjdk.org (Chen Liang) Date: Sun, 10 Aug 2025 14:48:13 GMT Subject: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v2] In-Reply-To: <6LY-pGXEYGVLE2sAYTG8175PvnICXFoHw4velrtLk8E=.dc8a5a32-5c4f-44fa-a281-c5516a22b4bb@github.com> References: <6LY-pGXEYGVLE2sAYTG8175PvnICXFoHw4velrtLk8E=.dc8a5a32-5c4f-44fa-a281-c5516a22b4bb@github.com> Message-ID: On Fri, 8 Aug 2025 13:38:31 GMT, Volkan Yazici wrote: >> `NoRepl`-suffixed `String` methods denote methods that do not replace invalid characters, but throw `CharacterCodingException` on encounter. This behavior cannot easily be derived from the method footprints, has been a source of confusion for maintainers, and is not uniformly adopted, e.g., `newStringUTF8NoRepl()` and `getBytesUTF8NoRepl()` does *not* throw `CCE`. This PR removes `NoRepl` suffix from method names and consistently uses `throws CCE` in method footprints. (b4845109e18 passes `tier1,2`.) > > 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 contains seven additional commits since the last revision: > > - Group `String` methods by `doReplace` argument > - Merge remote-tracking branch 'upstream/master' into jlaNoRepl > - Replace `requireNonNull` with implicit null checks > - Merge remote-tracking branch 'upstream/master' into jlaNoRepl > - Improve docs of touched methods and add NPE checks > - Convert IAE-throwing methods into CCE-throwing ones > - Rename `JavaLangAccess::*NoRepl` methods Review still in progress, feel free to ping me more more... src/java.base/share/classes/java/lang/String.java line 949: > 947: static byte[] getBytesNoReplacement(String s, Charset cs) throws CharacterCodingException { > 948: Objects.requireNonNull(s, "s"); > 949: Objects.requireNonNull(cs, "cs"); #26600 and subsequent PRs will add variable name reporting, so you can omit the string message to reduce bytecode size. ------------- PR Review: https://git.openjdk.org/jdk/pull/26413#pullrequestreview-3101693404 PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2263645886 From vyazici at openjdk.org Mon Aug 11 07:13:22 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Mon, 11 Aug 2025 07:13:22 GMT Subject: Integrated: 8364365: HKSCS encoder does not properly set the replacement character In-Reply-To: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> Message-ID: On Tue, 5 Aug 2025 08:17:40 GMT, Volkan Yazici wrote: > Fix `HKSCS` encoder to correctly set the replacement character, and add tests to verify the `CodingErrorAction.REPLACE` behavior of all available encoders. This pull request has now been integrated. Changeset: c31f4861 Author: Volkan Yazici URL: https://git.openjdk.org/jdk/commit/c31f4861fb6c85c31348ac3e99ccf754d9ee1a60 Stats: 445 lines in 3 files changed: 434 ins; 9 del; 2 mod 8364365: HKSCS encoder does not properly set the replacement character Reviewed-by: sherman ------------- PR: https://git.openjdk.org/jdk/pull/26635 From vyazici at openjdk.org Mon Aug 11 07:13:21 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Mon, 11 Aug 2025 07:13:21 GMT Subject: RFR: 8364365: HKSCS encoder does not properly set the replacement character [v3] In-Reply-To: References: <3PIGaLpFxVwtChhNZPyo0Xi-ndm0_yWMz6aRvTtY0vs=.8eb2a779-3f94-482d-a6df-8754da1cb9dd@github.com> Message-ID: On Fri, 8 Aug 2025 11:45:04 GMT, Volkan Yazici wrote: >> Fix `HKSCS` encoder to correctly set the replacement character, and add tests to verify the `CodingErrorAction.REPLACE` behavior of all available encoders. > > Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision: > > Improve pretty-printers Internally verified `tier1,2,3` runs successfully complete. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26635#issuecomment-3173510451 From bpb at openjdk.org Mon Aug 11 15:36:16 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Mon, 11 Aug 2025 15:36:16 GMT Subject: RFR: 8364761: (aio) AsynchronousChannelGroup.execute doesn't check null command In-Reply-To: References: <4y55oF0k8jfKkTPnFY182SK5aMdAmfqsDjgbcL8k4t8=.7dd9817d-bf54-465e-9f57-836fdda4c687@github.com> Message-ID: On Sat, 9 Aug 2025 08:16:28 GMT, Alan Bateman wrote: > So an off-piste usage that would break if the JDK implementation changes. Hyrum's law redux. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26709#discussion_r2267145746 From bpb at openjdk.org Mon Aug 11 16:19:57 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Mon, 11 Aug 2025 16:19:57 GMT Subject: RFR: 8364761: (aio) AsynchronousChannelGroup.execute doesn't check null command [v2] In-Reply-To: <4y55oF0k8jfKkTPnFY182SK5aMdAmfqsDjgbcL8k4t8=.7dd9817d-bf54-465e-9f57-836fdda4c687@github.com> References: <4y55oF0k8jfKkTPnFY182SK5aMdAmfqsDjgbcL8k4t8=.7dd9817d-bf54-465e-9f57-836fdda4c687@github.com> Message-ID: > Add `null` check to `AsynchronousChannelGroupImpl.execute`; update existing test. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8364761: Convert test to JUnit 5 ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26709/files - new: https://git.openjdk.org/jdk/pull/26709/files/5f1ddc6b..d5d9665f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26709&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26709&range=00-01 Stats: 59 lines in 1 file changed: 21 ins; 8 del; 30 mod Patch: https://git.openjdk.org/jdk/pull/26709.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26709/head:pull/26709 PR: https://git.openjdk.org/jdk/pull/26709 From bpb at openjdk.org Mon Aug 11 16:19:58 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Mon, 11 Aug 2025 16:19:58 GMT Subject: RFR: 8364761: (aio) AsynchronousChannelGroup.execute doesn't check null command [v2] In-Reply-To: References: <4y55oF0k8jfKkTPnFY182SK5aMdAmfqsDjgbcL8k4t8=.7dd9817d-bf54-465e-9f57-836fdda4c687@github.com> Message-ID: On Sat, 9 Aug 2025 07:51:44 GMT, Volkan Yazici wrote: > This test can be migrated to JUnit [...]. So changed in d5d9665. While the test is cleaner now, I have to note that while testing this before creating the PR, it was actually easier to use the test outside of jtreg completely as it is quite simple and required no framework. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26709#discussion_r2267305355 From alanb at openjdk.org Mon Aug 11 17:31:16 2025 From: alanb at openjdk.org (Alan Bateman) Date: Mon, 11 Aug 2025 17:31:16 GMT Subject: RFR: 8364761: (aio) AsynchronousChannelGroup.execute doesn't check null command [v2] In-Reply-To: References: <4y55oF0k8jfKkTPnFY182SK5aMdAmfqsDjgbcL8k4t8=.7dd9817d-bf54-465e-9f57-836fdda4c687@github.com> Message-ID: On Mon, 11 Aug 2025 16:19:57 GMT, Brian Burkhalter wrote: >> Add `null` check to `AsynchronousChannelGroupImpl.execute`; update existing test. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8364761: Convert test to JUnit 5 Marked as reviewed by alanb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26709#pullrequestreview-3106956516 From bpb at openjdk.org Mon Aug 11 18:53:19 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Mon, 11 Aug 2025 18:53:19 GMT Subject: Integrated: 8364761: (aio) AsynchronousChannelGroup.execute doesn't check null command In-Reply-To: <4y55oF0k8jfKkTPnFY182SK5aMdAmfqsDjgbcL8k4t8=.7dd9817d-bf54-465e-9f57-836fdda4c687@github.com> References: <4y55oF0k8jfKkTPnFY182SK5aMdAmfqsDjgbcL8k4t8=.7dd9817d-bf54-465e-9f57-836fdda4c687@github.com> Message-ID: On Sat, 9 Aug 2025 00:10:16 GMT, Brian Burkhalter wrote: > Add `null` check to `AsynchronousChannelGroupImpl.execute`; update existing test. This pull request has now been integrated. Changeset: 8cd79752 Author: Brian Burkhalter URL: https://git.openjdk.org/jdk/commit/8cd79752c6426780c6772eafe296aa5b713b2b64 Stats: 59 lines in 2 files changed: 31 ins; 3 del; 25 mod 8364761: (aio) AsynchronousChannelGroup.execute doesn't check null command Reviewed-by: alanb, vyazici ------------- PR: https://git.openjdk.org/jdk/pull/26709 From bpb at openjdk.org Mon Aug 11 19:06:29 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Mon, 11 Aug 2025 19:06:29 GMT Subject: RFR: 8361495: (fc) Async close of streams connected to uninterruptible FileChannel doesn't throw AsynchronousCloseException in all cases [v4] In-Reply-To: <4LSh6MSWFPMMg_ay5AQ1wKcWen1gQEqmZ8JQpsLpReU=.b6252979-43bb-4c8d-ab9c-105cd3000996@github.com> References: <4LSh6MSWFPMMg_ay5AQ1wKcWen1gQEqmZ8JQpsLpReU=.b6252979-43bb-4c8d-ab9c-105cd3000996@github.com> Message-ID: > Throw `AsynchronousCloseException` from `FileChannelImpl` methods if the channel is uninterruptible and was closed before the method (operation) could complete. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8361495: Remove commented out code and low value print statement ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26435/files - new: https://git.openjdk.org/jdk/pull/26435/files/899f28cd..a39b2f1b Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26435&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26435&range=02-03 Stats: 30 lines in 1 file changed: 0 ins; 30 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/26435.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26435/head:pull/26435 PR: https://git.openjdk.org/jdk/pull/26435 From bpb at openjdk.org Tue Aug 12 01:22:11 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 12 Aug 2025 01:22:11 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links Message-ID: This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. ------------- Commit messages: - 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links Changes: https://git.openjdk.org/jdk/pull/26736/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8154364 Stats: 593 lines in 4 files changed: 533 ins; 24 del; 36 mod Patch: https://git.openjdk.org/jdk/pull/26736.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26736/head:pull/26736 PR: https://git.openjdk.org/jdk/pull/26736 From bpb at openjdk.org Tue Aug 12 01:22:11 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 12 Aug 2025 01:22:11 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links In-Reply-To: References: Message-ID: <7LAN8mBSwnl5YJ6Y6r871h2pbz01pdbnj77FGGb0iqg=.2f955105-6065-4e44-8428-6c52212536ea@github.com> On Tue, 12 Aug 2025 01:15:35 GMT, Brian Burkhalter wrote: > This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. In the current implementation, files are considered to be the same only if their (possibly unnormalized) path strings are equal or, when following links, they represent two existing files that have the same file key. In the proposed implementation, the comparison is extended to deem two files equal if their paths when not following links both exist and have a link in common, or if neither file exists but their normalized path strings are equal. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26736#issuecomment-3177380315 From duke at openjdk.org Tue Aug 12 03:09:22 2025 From: duke at openjdk.org (jwilliams990) Date: Tue, 12 Aug 2025 03:09:22 GMT Subject: RFR: 8330940: Impossible to create a socket backlog greater than 200 on Windows 8+ [v2] In-Reply-To: References: Message-ID: On Mon, 16 Jun 2025 09:44:13 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to enhance the implementation of `ServerSocket` and `ServerSocketChannel` to allow for `backlog` values to be greater than 200 on Windows? This addresses https://bugs.openjdk.org/browse/JDK-8330940. >> >> As noted in that enhancement request, right now on Windows, if the backlog is specified to be more than 200, then Windows caps it to a platform internal `SOMAXCONN`. As noted in the documentation here https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-listen applications can increase that limit by using the `SOMAXCONN_HINT` macro. That macro then adjusts the value to be between 200 and 65535, thus allowing for a higher backlog of connections. >> >> The commit in this PR uses this macro when the specified backlog is 200 or more. A new jtreg test has been introduced to verify this change. This test and other existing tests in tier1, tier2 and tier3 continue to pass. >> >> A similar restriction on the backlog value applies in Linux too https://github.com/torvalds/linux/blob/master/Documentation/networking/ip-sysctl.rst#tcp-variables. But from what I can see, unlike Windows, it cannot be adjusted when calling `listen()`. > > Jaikiran Pai has updated the pull request incrementally with four additional commits since the last revision: > > - include a test for AsynchronousServerSocketChannel > - System.err instead of System.out > - trim down code comment > - > 200 instead of >= 200 Hi, Which version of OpenJDK is this change available in? I am running into a situation where Java on Windows drops TCP/HTTP connections, but i don't have this issue on Linux (I have tested with JDK 21.0.8+9). ------------- PR Comment: https://git.openjdk.org/jdk/pull/25819#issuecomment-3177373009 From jpai at openjdk.org Tue Aug 12 03:52:18 2025 From: jpai at openjdk.org (Jaikiran Pai) Date: Tue, 12 Aug 2025 03:52:18 GMT Subject: RFR: 8330940: Impossible to create a socket backlog greater than 200 on Windows 8+ [v2] In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 01:13:57 GMT, jwilliams990 wrote: >> Jaikiran Pai has updated the pull request incrementally with four additional commits since the last revision: >> >> - include a test for AsynchronousServerSocketChannel >> - System.err instead of System.out >> - trim down code comment >> - > 200 instead of >= 200 > > Hi, Which version of OpenJDK is this change available in? I am running into a situation where Java on Windows drops TCP/HTTP connections, but i don't have this issue on Linux (I have tested with JDK 21.0.8+9). Hello @jwilliams990 > Hi, Which version of OpenJDK is this change available in? This change is currently in the unreleased Java 26 version. It's only available in 26 early access builds https://jdk.java.net/26/ or one has to manually build this JDK repo to use this feature. > I am running into a situation where Java on Windows drops TCP/HTTP connections, but i don't have this issue on Linux (I have tested with JDK 21.0.8+9). Linux too has a limit on the number of backlog connections. I don't know the details of the issue you are running into but it could be unrelated to trying to use a backlog value greater than 200 on Windows, when creating a `ServerSocket`. ------------- PR Comment: https://git.openjdk.org/jdk/pull/25819#issuecomment-3177598778 From duke at openjdk.org Tue Aug 12 03:59:24 2025 From: duke at openjdk.org (jwilliams990) Date: Tue, 12 Aug 2025 03:59:24 GMT Subject: RFR: 8330940: Impossible to create a socket backlog greater than 200 on Windows 8+ [v2] In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 03:49:10 GMT, Jaikiran Pai wrote: >> Hi, Which version of OpenJDK is this change available in? I am running into a situation where Java on Windows drops TCP/HTTP connections, but i don't have this issue on Linux (I have tested with JDK 21.0.8+9). > > Hello @jwilliams990 > >> Hi, Which version of OpenJDK is this change available in? > > This change is currently in the unreleased Java 26 version. It's only available in 26 early access builds https://jdk.java.net/26/ or one has to manually build this JDK repo to use this feature. > >> I am running into a situation where Java on Windows drops TCP/HTTP connections, but i don't have this issue on Linux (I have tested with JDK 21.0.8+9). > > Linux too has a limit on the number of backlog connections. I don't know the details of the issue you are running into but it could be unrelated to trying to use a backlog value greater than 200 on Windows, when creating a `ServerSocket`. Hi @jaikiran, Thanks for your response. Any chance this could be included in Java 21 LTS in the future? The default TCP backlog in Windows is 200. Linux has a default of 4096. The issue i am seeing is when running Apache Tomcat on Windows vs. Linux, Windows shows a very high percentage of connection refused errors vs. Linux. ------------- PR Comment: https://git.openjdk.org/jdk/pull/25819#issuecomment-3177608798 From jpai at openjdk.org Tue Aug 12 04:27:16 2025 From: jpai at openjdk.org (Jaikiran Pai) Date: Tue, 12 Aug 2025 04:27:16 GMT Subject: RFR: 8330940: Impossible to create a socket backlog greater than 200 on Windows 8+ [v2] In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 03:49:10 GMT, Jaikiran Pai wrote: >> Hi, Which version of OpenJDK is this change available in? I am running into a situation where Java on Windows drops TCP/HTTP connections, but i don't have this issue on Linux (I have tested with JDK 21.0.8+9). > > Hello @jwilliams990 > >> Hi, Which version of OpenJDK is this change available in? > > This change is currently in the unreleased Java 26 version. It's only available in 26 early access builds https://jdk.java.net/26/ or one has to manually build this JDK repo to use this feature. > >> I am running into a situation where Java on Windows drops TCP/HTTP connections, but i don't have this issue on Linux (I have tested with JDK 21.0.8+9). > > Linux too has a limit on the number of backlog connections. I don't know the details of the issue you are running into but it could be unrelated to trying to use a backlog value greater than 200 on Windows, when creating a `ServerSocket`. > Hi @jaikiran, Thanks for your response. Any chance this could be included in Java 21 LTS in the future? Backports to OpenJDK are managed by a separate "jdk-updates" project https://openjdk.org/projects/jdk-updates/. Members of that project decide which changes should be backported (and when). For this specific change, Java 26 release isn't scheduled for this year. Once it is released and after that version sees usage in real world applications, only then enhancements like these are usually considered for backports. So it's too early to say if/when this change will be backported. In the meantime, what would be good is if you suspect that the backlog limit is indeed causing this issue on your setup, you could try to use the 26 early access build which is available here https://jdk.java.net/26/ and see if that helps you get past this issue. Are you creating a ServerSocket (or some other construct?) with some explicit value for backlog that is greater than 200? ------------- PR Comment: https://git.openjdk.org/jdk/pull/25819#issuecomment-3177649481 From duke at openjdk.org Tue Aug 12 04:33:16 2025 From: duke at openjdk.org (jwilliams990) Date: Tue, 12 Aug 2025 04:33:16 GMT Subject: RFR: 8330940: Impossible to create a socket backlog greater than 200 on Windows 8+ [v2] In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 04:24:41 GMT, Jaikiran Pai wrote: >> Hello @jwilliams990 >> >>> Hi, Which version of OpenJDK is this change available in? >> >> This change is currently in the unreleased Java 26 version. It's only available in 26 early access builds https://jdk.java.net/26/ or one has to manually build this JDK repo to use this feature. >> >>> I am running into a situation where Java on Windows drops TCP/HTTP connections, but i don't have this issue on Linux (I have tested with JDK 21.0.8+9). >> >> Linux too has a limit on the number of backlog connections. I don't know the details of the issue you are running into but it could be unrelated to trying to use a backlog value greater than 200 on Windows, when creating a `ServerSocket`. > >> Hi @jaikiran, Thanks for your response. Any chance this could be included in Java 21 LTS in the future? > > Backports to OpenJDK are managed by a separate "jdk-updates" project https://openjdk.org/projects/jdk-updates/. Members of that project decide which changes should be backported (and when). > > For this specific change, Java 26 release isn't scheduled for this year. Once it is released and after that version sees usage in real world applications, only then enhancements like these are usually considered for backports. So it's too early to say if/when this change will be backported. > > In the meantime, what would be good is if you suspect that the backlog limit is indeed causing this issue on your setup, you could try to use the 26 early access build which is available here https://jdk.java.net/26/ and see if that helps you get past this issue. Are you creating a ServerSocket (or some other construct?) with some explicit value for backlog that is greater than 200? Hi @jaikiran, I am running Apache Tomcat on Java. Tomcat has an acceptCount set to a large number (greater than 200). I believe Tomcat creates a ServerSocket with the configured acceptCount, and I suspect that it is not effective on Windows for the reasons mentioned above in this trail. ------------- PR Comment: https://git.openjdk.org/jdk/pull/25819#issuecomment-3177657942 From jpai at openjdk.org Tue Aug 12 04:45:16 2025 From: jpai at openjdk.org (Jaikiran Pai) Date: Tue, 12 Aug 2025 04:45:16 GMT Subject: RFR: 8330940: Impossible to create a socket backlog greater than 200 on Windows 8+ [v2] In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 04:24:41 GMT, Jaikiran Pai wrote: >> Hello @jwilliams990 >> >>> Hi, Which version of OpenJDK is this change available in? >> >> This change is currently in the unreleased Java 26 version. It's only available in 26 early access builds https://jdk.java.net/26/ or one has to manually build this JDK repo to use this feature. >> >>> I am running into a situation where Java on Windows drops TCP/HTTP connections, but i don't have this issue on Linux (I have tested with JDK 21.0.8+9). >> >> Linux too has a limit on the number of backlog connections. I don't know the details of the issue you are running into but it could be unrelated to trying to use a backlog value greater than 200 on Windows, when creating a `ServerSocket`. > >> Hi @jaikiran, Thanks for your response. Any chance this could be included in Java 21 LTS in the future? > > Backports to OpenJDK are managed by a separate "jdk-updates" project https://openjdk.org/projects/jdk-updates/. Members of that project decide which changes should be backported (and when). > > For this specific change, Java 26 release isn't scheduled for this year. Once it is released and after that version sees usage in real world applications, only then enhancements like these are usually considered for backports. So it's too early to say if/when this change will be backported. > > In the meantime, what would be good is if you suspect that the backlog limit is indeed causing this issue on your setup, you could try to use the 26 early access build which is available here https://jdk.java.net/26/ and see if that helps you get past this issue. Are you creating a ServerSocket (or some other construct?) with some explicit value for backlog that is greater than 200? > Hi @jaikiran, I am running Apache Tomcat on Java. Tomcat has an acceptCount set to a large number (greater than 200). I believe Tomcat creates a ServerSocket with the configured acceptCount, and I suspect that it is not effective on Windows for the reasons mentioned above in this trail. Thank you for that detail, that's useful to know. Based on what you note and what's documented of that Connector attribute in Tomcat docs - https://tomcat.apache.org/tomcat-9.0-doc/config/http.html#Attributes_Standard%20Implementation_acceptCount, I think what you are suggesting is correct - the backlog might be playing a role here. If you get a chance to try this with Java 26 early access build, that would be a good experiment to verify that this change does indeed help this use case (I'll be curious to hear how that test goes). ------------- PR Comment: https://git.openjdk.org/jdk/pull/25819#issuecomment-3177673220 From alanb at openjdk.org Tue Aug 12 06:45:12 2025 From: alanb at openjdk.org (Alan Bateman) Date: Tue, 12 Aug 2025 06:45:12 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 01:15:35 GMT, Brian Burkhalter wrote: > This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. src/java.base/unix/classes/sun/nio/fs/UnixFileSystemProvider.java line 429: > 427: > 428: // neither exists, compare normalized paths without filesystem access > 429: return obj1.normalize().equals(obj2.normalize()); normalize is to deal with user input, I don't think we should be using it here. (I will try to add review the changes soon but I'm concerned that this will require spec changes). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2268759925 From dclarke at openjdk.org Tue Aug 12 11:16:13 2025 From: dclarke at openjdk.org (Darragh Clarke) Date: Tue, 12 Aug 2025 11:16:13 GMT Subject: RFR: 8360025: (se) Convert kqueue Selector Implementation to use FFM APIs In-Reply-To: References: Message-ID: <_KCC0Md1R2Xpvl05BZ0dDYA39hwnoIrW3mzYf8qBvq4=.daef31b0-2157-4b6f-b827-fe333f1f0fc9@github.com> On Sat, 26 Jul 2025 07:46:25 GMT, ExE Boss wrote: >> This PR aims to Panamize the Java Kqueue implementation, This is based on the work that was previously shared in https://github.com/openjdk/jdk/pull/22307 , The main change since then is that this branch takes advantage of the changes made in https://github.com/openjdk/jdk/pull/25043 to allow for better performance during errno handling. >> >> These changes feature a lot of Jextract generated files, though alterations have been made in relation to Errno handling and performance improvements. >> >> I will update this description soon to include performance metrics on a few microbenchmarks, though currently it's roughly 2% to 3% slower with the changes, which is somewhat expected, though there are still a few ideas of possible performance improvements that could be tried. Any suggestions or comments in that area are more than welcome however. > > src/java.base/macosx/classes/sun/nio/ch/KQueuePoller.java line 44: > >> 42: >> 43: KQueuePoller(boolean subPoller, boolean read) throws IOException { >> 44: this.kqfd = kqueue_h.kqueue(); > > Note?that the?old?implementation of?`KQueue.create()` had?a?check for?negative `kqfd`: Sorry for the delay in getting back to this, thanks for the comment though! I'll update the PR to include that again ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25546#discussion_r2269512920 From dclarke at openjdk.org Tue Aug 12 11:20:12 2025 From: dclarke at openjdk.org (Darragh Clarke) Date: Tue, 12 Aug 2025 11:20:12 GMT Subject: RFR: 8360025: (se) Convert kqueue Selector Implementation to use FFM APIs In-Reply-To: References: Message-ID: On Thu, 31 Jul 2025 12:15:32 GMT, Maurizio Cimadamore wrote: >> IMHO the more honest approach is to move these constants closer to the _h generated files that use them, as that's the way jextract intends them to be used. > > (Also, the latest version of jextract uses `Linker.canonicalLayouts` to derive these constants, which might be more robust longer term) I can update FFMUtils so that all the different pointers user `Liner.canonicalLayouts`, As for the other point, I think you're right that the shared FFMUtils won't work though I think it's a bit of a shame because of the number of similar duplicate lines. I can move it back to using different ones for each platform in the next commit ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25546#discussion_r2269522249 From vyazici at openjdk.org Tue Aug 12 12:11:07 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Tue, 12 Aug 2025 12:11:07 GMT Subject: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v3] In-Reply-To: References: Message-ID: > `NoRepl`-suffixed `String` methods denote methods that do not replace invalid characters, but throw `CharacterCodingException` on encounter. This behavior cannot easily be derived from the method footprints, has been a source of confusion for maintainers, and is not uniformly adopted, e.g., `newStringUTF8NoRepl()` and `getBytesUTF8NoRepl()` does *not* throw `CCE`. This PR removes `NoRepl` suffix from method names and consistently uses `throws CCE` in method footprints. (b4845109e18 passes `tier1,2`.) Volkan Yazici has updated the pull request incrementally with two additional commits since the last revision: - Simplify added null checks - Avoid code duplication by sprinkling some generics magic ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26413/files - new: https://git.openjdk.org/jdk/pull/26413/files/1fb8582e..f536a341 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26413&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26413&range=01-02 Stats: 325 lines in 1 file changed: 77 ins; 213 del; 35 mod Patch: https://git.openjdk.org/jdk/pull/26413.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26413/head:pull/26413 PR: https://git.openjdk.org/jdk/pull/26413 From vyazici at openjdk.org Tue Aug 12 12:11:11 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Tue, 12 Aug 2025 12:11:11 GMT Subject: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v3] In-Reply-To: <13urR68f8U8oqjrcaX1BtKI-EtD41ySuYt-oz333PdA=.c97d8293-2fbe-415d-983d-92b7e1c9d175@github.com> References: <13urR68f8U8oqjrcaX1BtKI-EtD41ySuYt-oz333PdA=.c97d8293-2fbe-415d-983d-92b7e1c9d175@github.com> Message-ID: On Mon, 28 Jul 2025 22:34:08 GMT, Roger Riggs wrote: >> Volkan Yazici has updated the pull request incrementally with two additional commits since the last revision: >> >> - Simplify added null checks >> - Avoid code duplication by sprinkling some generics magic > > src/java.base/share/classes/java/lang/String.java line 571: > >> 569: } >> 570: >> 571: private static String utf8ThrowingIae(byte[] bytes, int offset, int length) { > > Iae should be all-caps. `IAE` This change has disappeared ? the remark is not applicable anymore. > src/java.base/share/classes/java/lang/String.java line 579: > >> 577: } >> 578: >> 579: private static IllegalArgumentException cce2iae(CharacterCodingException cce) { > > More readable would be "cceToIAE" > But this whole construct is suspect because of the contortions needed. This change has disappeared ? the remark is not applicable anymore. > src/java.base/share/classes/java/lang/String.java line 1289: > >> 1287: } >> 1288: >> 1289: private static void throwMalformed(byte[] val) throws MalformedInputException { > > It is unnecessary to add add @throws of RuntimeExceptions, conventionally they are omitted as clutter and any RuntimeException can be thrown at any time. `MalformedInputException` is a checked exception, I think there has been some sort of confusion here. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2269623466 PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2269623313 PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2269621563 From vyazici at openjdk.org Tue Aug 12 12:11:15 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Tue, 12 Aug 2025 12:11:15 GMT Subject: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v2] In-Reply-To: References: <6LY-pGXEYGVLE2sAYTG8175PvnICXFoHw4velrtLk8E=.dc8a5a32-5c4f-44fa-a281-c5516a22b4bb@github.com> Message-ID: On Fri, 8 Aug 2025 17:29:34 GMT, Chen Liang 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 contains seven additional commits since the last revision: >> >> - Group `String` methods by `doReplace` argument >> - Merge remote-tracking branch 'upstream/master' into jlaNoRepl >> - Replace `requireNonNull` with implicit null checks >> - Merge remote-tracking branch 'upstream/master' into jlaNoRepl >> - Improve docs of touched methods and add NPE checks >> - Convert IAE-throwing methods into CCE-throwing ones >> - Rename `JavaLangAccess::*NoRepl` methods > > src/java.base/share/classes/java/lang/String.java line 855: > >> 853: int len = val.length >> coder; // assume LATIN1=0/UTF16=1; >> 854: int en = scale(len, ce.maxBytesPerChar()); >> 855: // Fast-path with `ArrayEncoder` implies replacement. > > I recommend documenting this on ArrayEncoder instead. This already happens to be the case: /* * FastPath char[]/byte[] -> byte[] encoder, REPLACE on malformed input or * unmappable input. */ public interface ArrayEncoder { ... } > src/java.base/share/classes/java/lang/String.java line 949: > >> 947: static byte[] getBytesNoReplacement(String s, Charset cs) throws CharacterCodingException { >> 948: Objects.requireNonNull(s, "s"); >> 949: Objects.requireNonNull(cs, "cs"); > > #26600 and subsequent PRs will add variable name reporting, so you can omit the string message to reduce bytecode size. Great news! :star_struck: Simplified as requested in f536a341901. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2269618475 PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2269613108 From vyazici at openjdk.org Tue Aug 12 12:11:17 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Tue, 12 Aug 2025 12:11:17 GMT Subject: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v3] In-Reply-To: References: Message-ID: On Tue, 29 Jul 2025 14:22:56 GMT, Roger Riggs wrote: >> src/java.base/share/classes/java/lang/String.java line 1262: >> >>> 1260: MalformedInputException mie = new MalformedInputException(nb); >>> 1261: String msg = "malformed input off : " + off + ", length : " + nb; >>> 1262: mie.initCause(new IllegalArgumentException(msg)); >> >> Earlier `throw(Malformed|Unmappable)` methods were throwing `IAE` containing _extra diagnostics information_ and wrapping a `CCE` as a cause. After switching methods to throw `CCE`, which doesn't have a ctor accepting a `String` message, to retain this extra diagnostics information, I've added swapped their causal chain placement, and wrapped `IAE` with a `CCE` this time. >> >> This played well with `CCE`-throwing methods, yet there are other `public` methods which did not have `throws CCE` in their footprint. For backward compatibility, in those spots, I've used `cce2iae` to obtain, again, a `IAE` wrapping the `CCE`, which matched the old behavior. > > Introducing CCE (an IOException) into more places in string handling is going in the wrong direction. > As declared exceptions, they have to be caught and handled or re-thrown. That makes the source more complex and harder to maintain, as seen in the cce2iae mechanism. > The prior use of IAE encapsulating a CCE as needed is simpler and more consistent with other Runtime exception handling in most of the String class. Since the need for `cce2iae` is disapperaed, I'm resolving this conversation. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2269607697 From vyazici at openjdk.org Tue Aug 12 12:11:20 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Tue, 12 Aug 2025 12:11:20 GMT Subject: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v3] In-Reply-To: References: Message-ID: On Mon, 21 Jul 2025 13:00:03 GMT, Chen Liang wrote: > The docs should mention these two details: > > 1. This method does not replace upon malformed data but fails > 2. This method does not copy the byte array for validation (can add to the warning) @liach, I presume you want more than the following two (existing) comment blocks addressing these concerns: * WARNING: The caller of this method shall relinquish and transfer the * ownership of the byte array to the callee, since the latter will not * make a copy. ... * @throws CharacterCodingException for malformed or unmappable bytes If so, mind elaborating on your suggested enhancements, please? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2269632642 From alanb at openjdk.org Tue Aug 12 15:09:21 2025 From: alanb at openjdk.org (Alan Bateman) Date: Tue, 12 Aug 2025 15:09:21 GMT Subject: RFR: 8361209: (bf) Use CharSequence::getChars for StringCharBuffer bulk get methods [v5] In-Reply-To: References: Message-ID: On Wed, 16 Jul 2025 23:23:30 GMT, Brian Burkhalter wrote: >> For `CharBuffer`s created from a `CharSequence`, use `CharSequence.getChars` to perform bulk gets instead of successively copying single characters. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8361209: Fix assertion added in previous commit Marked as reviewed by alanb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26251#pullrequestreview-3111294961 From duke at openjdk.org Tue Aug 12 15:29:22 2025 From: duke at openjdk.org (jwilliams990) Date: Tue, 12 Aug 2025 15:29:22 GMT Subject: RFR: 8330940: Impossible to create a socket backlog greater than 200 on Windows 8+ [v2] In-Reply-To: References: Message-ID: <_AytxIFrh0G0z7OHW1VfdBLoSvh6N-38vamSjR-GJRM=.7bbebcae-28a0-4caf-9e22-e0d7ba2b443b@github.com> On Tue, 12 Aug 2025 04:41:51 GMT, Jaikiran Pai wrote: >>> Hi @jaikiran, Thanks for your response. Any chance this could be included in Java 21 LTS in the future? >> >> Backports to OpenJDK are managed by a separate "jdk-updates" project https://openjdk.org/projects/jdk-updates/. Members of that project decide which changes should be backported (and when). >> >> For this specific change, Java 26 release isn't scheduled for this year. Once it is released and after that version sees usage in real world applications, only then enhancements like these are usually considered for backports. So it's too early to say if/when this change will be backported. >> >> In the meantime, what would be good is if you suspect that the backlog limit is indeed causing this issue on your setup, you could try to use the 26 early access build which is available here https://jdk.java.net/26/ and see if that helps you get past this issue. Are you creating a ServerSocket (or some other construct?) with some explicit value for backlog that is greater than 200? > >> Hi @jaikiran, I am running Apache Tomcat on Java. Tomcat has an acceptCount set to a large number (greater than 200). I believe Tomcat creates a ServerSocket with the configured acceptCount, and I suspect that it is not effective on Windows for the reasons mentioned above in this trail. > > Thank you for that detail, that's useful to know. Based on what you note and what's documented of that Connector attribute in Tomcat docs - https://tomcat.apache.org/tomcat-9.0-doc/config/http.html#Attributes_Standard%20Implementation_acceptCount, I think what you are suggesting is correct - the backlog might be playing a role here. > > If you get a chance to try this with Java 26 early access build, that would be a good experiment to verify that this change does indeed help this use case (I'll be curious to hear how that test goes). Hi @jaikiran - I have tested with the Java 26 early access build and can report that the issue i faced on Windows OS with TCP/HTTP connection refused errors even at relatively low concurrency has been resolved in this build. Thanks. ------------- PR Comment: https://git.openjdk.org/jdk/pull/25819#issuecomment-3179832921 From jpai at openjdk.org Tue Aug 12 15:38:24 2025 From: jpai at openjdk.org (Jaikiran Pai) Date: Tue, 12 Aug 2025 15:38:24 GMT Subject: RFR: 8330940: Impossible to create a socket backlog greater than 200 on Windows 8+ [v2] In-Reply-To: References: Message-ID: On Mon, 16 Jun 2025 09:44:13 GMT, Jaikiran Pai wrote: >> Can I please get a review of this change which proposes to enhance the implementation of `ServerSocket` and `ServerSocketChannel` to allow for `backlog` values to be greater than 200 on Windows? This addresses https://bugs.openjdk.org/browse/JDK-8330940. >> >> As noted in that enhancement request, right now on Windows, if the backlog is specified to be more than 200, then Windows caps it to a platform internal `SOMAXCONN`. As noted in the documentation here https://learn.microsoft.com/en-us/windows/win32/api/winsock2/nf-winsock2-listen applications can increase that limit by using the `SOMAXCONN_HINT` macro. That macro then adjusts the value to be between 200 and 65535, thus allowing for a higher backlog of connections. >> >> The commit in this PR uses this macro when the specified backlog is 200 or more. A new jtreg test has been introduced to verify this change. This test and other existing tests in tier1, tier2 and tier3 continue to pass. >> >> A similar restriction on the backlog value applies in Linux too https://github.com/torvalds/linux/blob/master/Documentation/networking/ip-sysctl.rst#tcp-variables. But from what I can see, unlike Windows, it cannot be adjusted when calling `listen()`. > > Jaikiran Pai has updated the pull request incrementally with four additional commits since the last revision: > > - include a test for AsynchronousServerSocketChannel > - System.err instead of System.out > - trim down code comment > - > 200 instead of >= 200 Thank you very much for running the test and reporting back. It's pleasing to hear that this enhancement addresses a genuine issue. ------------- PR Comment: https://git.openjdk.org/jdk/pull/25819#issuecomment-3179884608 From liach at openjdk.org Tue Aug 12 16:03:17 2025 From: liach at openjdk.org (Chen Liang) Date: Tue, 12 Aug 2025 16:03:17 GMT Subject: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v3] In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 12:11:07 GMT, Volkan Yazici wrote: >> `NoRepl`-suffixed `String` methods denote methods that do not replace invalid characters, but throw `CharacterCodingException` on encounter. This behavior cannot easily be derived from the method footprints, has been a source of confusion for maintainers, and is not uniformly adopted, e.g., `newStringUTF8NoRepl()` and `getBytesUTF8NoRepl()` does *not* throw `CCE`. This PR removes `NoRepl` suffix from method names and consistently uses `throws CCE` in method footprints. (b4845109e18 passes `tier1,2`.) > > Volkan Yazici has updated the pull request incrementally with two additional commits since the last revision: > > - Simplify added null checks > - Avoid code duplication by sprinkling some generics magic src/java.base/share/classes/java/lang/String.java line 851: > 849: } > 850: > 851: private static byte[] encodeWithEncoder(Charset cs, byte coder, byte[] val) { Is the type parameter here redundant? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2270409766 From bpb at openjdk.org Tue Aug 12 16:31:14 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 12 Aug 2025 16:31:14 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 06:42:52 GMT, Alan Bateman wrote: > normalize is to deal with user input, I don't think we should be using it here. This was intended to handle comparing paths with `..` and `.` like "a/b/c/../d/e" with "a/b/d/e" as there is no closer `Path` equivalent that I could see to `File.getCanonicalPath` that does not access the file system, i.e., to avoid `Path.toRealPath` and a consequent `NoSuchFileException`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2270504514 From lkorinth at openjdk.org Tue Aug 12 17:09:32 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Tue, 12 Aug 2025 17:09:32 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 Message-ID: This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. These fixes have been created when I have ploughed through test cases: JDK-8352719: Add an equals sign to the modules statement JDK-8352709: Remove bad timing annotations from WhileOpTest.java JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE CODETOOLS-7903961: Make default timeout configurable After the review, I will update the copyrights. I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. I got 4 timing related faults: 1) runtime/Thread/TestThreadDumpMonitorContention.java This is probably: https://bugs.openjdk.org/browse/JDK-8361370 2) sun/tools/jhsdb/BasicLauncherTest.java I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. 3) gc/stress/TestReclaimStringsLeaksMemory.java I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. 4) sun/security/ssl/X509KeyManager/CertChecking.java This is a new test that I got on last rebase. I have added a timeout of 480 to it. In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. >From the review of the cancelled "8356171: Increase timeout for test cases as preparation for change of default timeout factor", I have taken a few actions: 1) in testing(md|html): interpreted mode -> forced compilation mode 2) in MTTest.java: changed 1200 -> 400 (was 300 to begin with) I am now re-running tier 1-8. ------------- Commit messages: - 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 Changes: https://git.openjdk.org/jdk/pull/26749/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26749&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8260555 Stats: 598 lines in 297 files changed: 49 ins; 91 del; 458 mod Patch: https://git.openjdk.org/jdk/pull/26749.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26749/head:pull/26749 PR: https://git.openjdk.org/jdk/pull/26749 From bpb at openjdk.org Tue Aug 12 17:42:24 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 12 Aug 2025 17:42:24 GMT Subject: Integrated: 8361209: (bf) Use CharSequence::getChars for StringCharBuffer bulk get methods In-Reply-To: References: Message-ID: <4k-Zr8rf56argah_YubWr489oUEkHoIC9VIbosfXIXw=.e6d99f9d-554b-4868-a748-85bc72e2db0a@github.com> On Thu, 10 Jul 2025 20:27:52 GMT, Brian Burkhalter wrote: > For `CharBuffer`s created from a `CharSequence`, use `CharSequence.getChars` to perform bulk gets instead of successively copying single characters. This pull request has now been integrated. Changeset: d0239826 Author: Brian Burkhalter URL: https://git.openjdk.org/jdk/commit/d023982600f8bb19053f579710953aa29e0f30c5 Stats: 102 lines in 3 files changed: 93 ins; 0 del; 9 mod 8361209: (bf) Use CharSequence::getChars for StringCharBuffer bulk get methods Reviewed-by: rriggs, alanb ------------- PR: https://git.openjdk.org/jdk/pull/26251 From cjplummer at openjdk.org Tue Aug 12 17:54:13 2025 From: cjplummer at openjdk.org (Chris Plummer) Date: Tue, 12 Aug 2025 17:54:13 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 17:01:41 GMT, Leo Korinth wrote: > sun/tools/jhsdb/BasicLauncherTest.java > I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. @lkorinth Can you send me a link to the failure? ------------- PR Comment: https://git.openjdk.org/jdk/pull/26749#issuecomment-3180396310 From vyazici at openjdk.org Tue Aug 12 19:29:28 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Tue, 12 Aug 2025 19:29:28 GMT Subject: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v4] In-Reply-To: References: Message-ID: > `NoRepl`-suffixed `String` methods denote methods that do not replace invalid characters, but throw `CharacterCodingException` on encounter. This behavior cannot easily be derived from the method footprints, has been a source of confusion for maintainers, and is not uniformly adopted, e.g., `newStringUTF8NoRepl()` and `getBytesUTF8NoRepl()` does *not* throw `CCE`. This PR removes `NoRepl` suffix from method names and consistently uses `throws CCE` in method footprints. (b4845109e18 passes `tier1,2`.) Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision: Remove redundant type parameters ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26413/files - new: https://git.openjdk.org/jdk/pull/26413/files/f536a341..c5ddfe62 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26413&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26413&range=02-03 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/26413.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26413/head:pull/26413 PR: https://git.openjdk.org/jdk/pull/26413 From vyazici at openjdk.org Tue Aug 12 19:29:29 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Tue, 12 Aug 2025 19:29:29 GMT Subject: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v3] In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 15:58:13 GMT, Chen Liang wrote: >> Volkan Yazici has updated the pull request incrementally with two additional commits since the last revision: >> >> - Simplify added null checks >> - Avoid code duplication by sprinkling some generics magic > > src/java.base/share/classes/java/lang/String.java line 851: > >> 849: } >> 850: >> 851: private static byte[] encodeWithEncoder(Charset cs, byte coder, byte[] val) { > > Is the type parameter here redundant? Yes, it is! Removed this one and other 3 in c5ddfe62eb8. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2270957899 From syan at openjdk.org Wed Aug 13 01:50:14 2025 From: syan at openjdk.org (SendaoYan) Date: Wed, 13 Aug 2025 01:50:14 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 17:01:41 GMT, Leo Korinth wrote: > This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) > > In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). > > My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. > > These fixes have been created when I have ploughed through test cases: > JDK-8352719: Add an equals sign to the modules statement > JDK-8352709: Remove bad timing annotations from WhileOpTest.java > JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test > CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE > CODETOOLS-7903961: Make default timeout configurable > > After the review, I will update the copyrights. > > I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. > > I got 4 timing related faults: > 1) runtime/Thread/TestThreadDumpMonitorContention.java > This is probably: https://bugs.openjdk.org/browse/JDK-8361370 > 2) sun/tools/jhsdb/BasicLauncherTest.java > I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. > 3) gc/stress/TestReclaimStringsLeaksMemory.java > I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. > 4) sun/security/ssl/X509KeyManager/CertChecking.java > This is a new test that I got on last rebase. I have added a timeout of 480 to it. > > In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. > > From the review of the cancelled "8356171: Increase timeout for test cases as preparation for change of... test/hotspot/jtreg/compiler/c1/TestPinnedIntrinsics.java line 25: > 23: > 24: /* > 25: * @test Should we need to update the copyright year for the touch files ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2271883564 From syan at openjdk.org Wed Aug 13 01:54:16 2025 From: syan at openjdk.org (SendaoYan) Date: Wed, 13 Aug 2025 01:54:16 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 17:01:41 GMT, Leo Korinth wrote: > This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) > > In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). > > My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. > > These fixes have been created when I have ploughed through test cases: > JDK-8352719: Add an equals sign to the modules statement > JDK-8352709: Remove bad timing annotations from WhileOpTest.java > JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test > CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE > CODETOOLS-7903961: Make default timeout configurable > > After the review, I will update the copyrights. > > I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. > > I got 4 timing related faults: > 1) runtime/Thread/TestThreadDumpMonitorContention.java > This is probably: https://bugs.openjdk.org/browse/JDK-8361370 > 2) sun/tools/jhsdb/BasicLauncherTest.java > I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. > 3) gc/stress/TestReclaimStringsLeaksMemory.java > I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. > 4) sun/security/ssl/X509KeyManager/CertChecking.java > This is a new test that I got on last rebase. I have added a timeout of 480 to it. > > In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. > > From the review of the cancelled "8356171: Increase timeout for test cases as preparation for change of... test/hotspot/jtreg/compiler/c2/TestStressRecompilation.java line 29: > 27: * @requires vm.debug > 28: * @summary Test running with StressRecompilation enabled. > 29: * @run main/othervm/timeout=480 -Xcomp -XX:+IgnoreUnrecognizedVMOptions -XX:+StressRecompilation I think the default value(120s) will be enough? On my machine this test use 11.546 senonds to finish. > grep "elapsed time" tmp/compiler/classUnloading/methodUnloading/TestOverloadCompileQueues.jtr -rn 55:elapsed time (seconds): 0.581 66:elapsed time (seconds): 0.575 116:elapsed time (seconds): 3.088 162:elapsed time (seconds): 0.001 173:elapsed time (seconds): 11.546 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2271888024 From sspitsyn at openjdk.org Wed Aug 13 07:29:11 2025 From: sspitsyn at openjdk.org (Serguei Spitsyn) Date: Wed, 13 Aug 2025 07:29:11 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 17:01:41 GMT, Leo Korinth wrote: > This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) > > In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). > > My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. > > These fixes have been created when I have ploughed through test cases: > JDK-8352719: Add an equals sign to the modules statement > JDK-8352709: Remove bad timing annotations from WhileOpTest.java > JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test > CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE > CODETOOLS-7903961: Make default timeout configurable > > After the review, I will update the copyrights. > > I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. > > I got 4 timing related faults: > 1) runtime/Thread/TestThreadDumpMonitorContention.java > This is probably: https://bugs.openjdk.org/browse/JDK-8361370 > 2) sun/tools/jhsdb/BasicLauncherTest.java > I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. > 3) gc/stress/TestReclaimStringsLeaksMemory.java > I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. > 4) sun/security/ssl/X509KeyManager/CertChecking.java > This is a new test that I got on last rebase. I have added a timeout of 480 to it. > > In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. > > From the review of the cancelled "8356171: Increase timeout for test cases as preparation for change of... I've reviewed the Serviceability related tweaks and I'm okay with them in general. But I'm curious if you do not see any timeouts with this anymore. ------------- Marked as reviewed by sspitsyn (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26749#pullrequestreview-3114280042 From aturbanov at openjdk.org Wed Aug 13 09:47:17 2025 From: aturbanov at openjdk.org (Andrey Turbanov) Date: Wed, 13 Aug 2025 09:47:17 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 17:01:41 GMT, Leo Korinth wrote: > This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) > > In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). > > My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. > > These fixes have been created when I have ploughed through test cases: > JDK-8352719: Add an equals sign to the modules statement > JDK-8352709: Remove bad timing annotations from WhileOpTest.java > JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test > CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE > CODETOOLS-7903961: Make default timeout configurable > > After the review, I will update the copyrights. > > I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. > > I got 4 timing related faults: > 1) runtime/Thread/TestThreadDumpMonitorContention.java > This is probably: https://bugs.openjdk.org/browse/JDK-8361370 > 2) sun/tools/jhsdb/BasicLauncherTest.java > I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. > 3) gc/stress/TestReclaimStringsLeaksMemory.java > I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. > 4) sun/security/ssl/X509KeyManager/CertChecking.java > This is a new test that I got on last rebase. I have added a timeout of 480 to it. > > In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. > > From the review of the cancelled "8356171: Increase timeout for test cases as preparation for change of... test/langtools/tools/lib/toolbox/ToolBox.java line 480: > 478: > 479: private static final int RETRY_DELETE_MILLIS = isWindows() ? 500 : 0; > 480: private static final int MAX_RETRY_DELETE_MILLIS = isWindows() ? 60 * 1000 : 0; Suggestion: private static final int MAX_RETRY_DELETE_MILLIS = isWindows() ? 60 * 1000 : 0; ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2272745651 From pminborg at openjdk.org Wed Aug 13 11:17:15 2025 From: pminborg at openjdk.org (Per Minborg) Date: Wed, 13 Aug 2025 11:17:15 GMT Subject: RFR: 8359119: Change Charset to use StableValue [v3] In-Reply-To: <_slUSdx6gVElcqEg71xpeHsa99DhZ3YteV84gZvR5Hc=.73afbad1-6ba8-487b-ac44-b6cc09fdafc7@github.com> References: <_slUSdx6gVElcqEg71xpeHsa99DhZ3YteV84gZvR5Hc=.73afbad1-6ba8-487b-ac44-b6cc09fdafc7@github.com> Message-ID: On Tue, 5 Aug 2025 09:08:47 GMT, Per Minborg wrote: >> Fields and methods can better leverage the Stable Value API compared to using DCL and holder classes. There are also some fields that can be marked `@Stable`. >> >> This PR passes tier1, tier2, and tier3 tests on multiple platforms. > > 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 six additional commits since the last revision: > > - Address comments in PR > - Merge branch 'master' into stablify-charset > - Revert for loop > - Revert more > - Revert changes > - Add stable value functionality All comments above have been addressed. ------------- PR Comment: https://git.openjdk.org/jdk/pull/25727#issuecomment-3183372756 From lkorinth at openjdk.org Wed Aug 13 13:09:13 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 13 Aug 2025 13:09:13 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 In-Reply-To: References: Message-ID: On Wed, 13 Aug 2025 01:47:43 GMT, SendaoYan wrote: >> This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) >> >> In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). >> >> My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. >> >> These fixes have been created when I have ploughed through test cases: >> JDK-8352719: Add an equals sign to the modules statement >> JDK-8352709: Remove bad timing annotations from WhileOpTest.java >> JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test >> CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE >> CODETOOLS-7903961: Make default timeout configurable >> >> After the review, I will update the copyrights. >> >> I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. >> >> I got 4 timing related faults: >> 1) runtime/Thread/TestThreadDumpMonitorContention.java >> This is probably: https://bugs.openjdk.org/browse/JDK-8361370 >> 2) sun/tools/jhsdb/BasicLauncherTest.java >> I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. >> 3) gc/stress/TestReclaimStringsLeaksMemory.java >> I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. >> 4) sun/security/ssl/X509KeyManager/CertChecking.java >> This is a new test that I got on last rebase. I have added a timeout of 480 to it. >> >> In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. >> >> From the review of the cancelled "8356171: ... > > test/hotspot/jtreg/compiler/c1/TestPinnedIntrinsics.java line 25: > >> 23: >> 24: /* >> 25: * @test > > Should we need to update the copyright year for the touched files `After the review, I will update the copyrights.` It is IMO easier to review big changes without the noise. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2273410872 From lkorinth at openjdk.org Wed Aug 13 13:21:11 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 13 Aug 2025 13:21:11 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 In-Reply-To: References: Message-ID: <4q0047gChugbkkv-W0lis2E8nXVWh8YGVJiBehoojLY=.0b9055a2-f038-4247-82a9-7c60ee9f6637@github.com> On Tue, 12 Aug 2025 17:52:02 GMT, Chris Plummer wrote: > > sun/tools/jhsdb/BasicLauncherTest.java > > I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. > > @lkorinth Can you send me a link to the failure? I sent it to you on email. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26749#issuecomment-3183896453 From erikj at openjdk.org Wed Aug 13 13:28:18 2025 From: erikj at openjdk.org (Erik Joelsson) Date: Wed, 13 Aug 2025 13:28:18 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 17:01:41 GMT, Leo Korinth wrote: > This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) > > In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). > > My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. > > These fixes have been created when I have ploughed through test cases: > JDK-8352719: Add an equals sign to the modules statement > JDK-8352709: Remove bad timing annotations from WhileOpTest.java > JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test > CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE > CODETOOLS-7903961: Make default timeout configurable > > After the review, I will update the copyrights. > > I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. > > I got 4 timing related faults: > 1) runtime/Thread/TestThreadDumpMonitorContention.java > This is probably: https://bugs.openjdk.org/browse/JDK-8361370 > 2) sun/tools/jhsdb/BasicLauncherTest.java > I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. > 3) gc/stress/TestReclaimStringsLeaksMemory.java > I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. > 4) sun/security/ssl/X509KeyManager/CertChecking.java > This is a new test that I got on last rebase. I have added a timeout of 480 to it. > > In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. > > From the review of the cancelled "8356171: Increase timeout for test cases as preparation for change of... make/RunTests.gmk line 939: > 937: > 938: JTREG_AUTO_PROBLEM_LISTS := > 939: JTREG_AUTO_TIMEOUT_FACTOR := 1 # IT MAKES NO SENCE TO CHANGE IT. Fix individual test cases that time out instead. I'm not sure about this comment, but if we keep it, please move it to the line above and break lines as appropriate. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2273468852 From lkorinth at openjdk.org Wed Aug 13 13:36:13 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 13 Aug 2025 13:36:13 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 In-Reply-To: References: Message-ID: On Wed, 13 Aug 2025 01:51:44 GMT, SendaoYan wrote: >> This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) >> >> In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). >> >> My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. >> >> These fixes have been created when I have ploughed through test cases: >> JDK-8352719: Add an equals sign to the modules statement >> JDK-8352709: Remove bad timing annotations from WhileOpTest.java >> JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test >> CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE >> CODETOOLS-7903961: Make default timeout configurable >> >> After the review, I will update the copyrights. >> >> I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. >> >> I got 4 timing related faults: >> 1) runtime/Thread/TestThreadDumpMonitorContention.java >> This is probably: https://bugs.openjdk.org/browse/JDK-8361370 >> 2) sun/tools/jhsdb/BasicLauncherTest.java >> I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. >> 3) gc/stress/TestReclaimStringsLeaksMemory.java >> I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. >> 4) sun/security/ssl/X509KeyManager/CertChecking.java >> This is a new test that I got on last rebase. I have added a timeout of 480 to it. >> >> In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. >> >> From the review of the cancelled "8356171: ... > > test/hotspot/jtreg/compiler/c2/TestStressRecompilation.java line 29: > >> 27: * @requires vm.debug >> 28: * @summary Test running with StressRecompilation enabled. >> 29: * @run main/othervm/timeout=480 -Xcomp -XX:+IgnoreUnrecognizedVMOptions -XX:+StressRecompilation > > I think the default value(120s) will be enough? On my machine this test use 11.546 senonds to finish. > > >> grep "elapsed time" tmp/compiler/classUnloading/methodUnloading/TestOverloadCompileQueues.jtr -rn > 55:elapsed time (seconds): 0.581 > 66:elapsed time (seconds): 0.575 > 116:elapsed time (seconds): 3.088 > 162:elapsed time (seconds): 0.001 > 173:elapsed time (seconds): 11.546 I have only (to my knowledge) updated test cases that has timed out for me. We have some not very modern test machines that is slower. That in combination with a debug build, in combination with a timeout factor of 0.7 might have made the test time out. Unfortunately I no longer have the logs for this failure so I can not check if the machine was failing because it was low on memory etc. I still think it is reasonable to keep the old timeout of 480. I have no intuitive feeling for how expensive `-XX:+StressRecompilation` is. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2273488236 From lkorinth at openjdk.org Wed Aug 13 13:53:12 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 13 Aug 2025 13:53:12 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 In-Reply-To: References: Message-ID: <5nc1SBXnwAOJJvnrbMyPIsre61u--GxMHSffdDf8qUU=.77100025-4b9e-4e0a-b71d-df590df5f9ba@github.com> On Wed, 13 Aug 2025 07:26:59 GMT, Serguei Spitsyn wrote: > I've reviewed the Serviceability related tweaks and I'm okay with them in general. But I'm curious if you do not see any timeouts with this anymore. I only got the four timeouts described in the description, I got a few other failures as well that was not timeout related. I sent you a link to the test results in an email. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26749#issuecomment-3184026177 From lkorinth at openjdk.org Wed Aug 13 14:22:08 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 13 Aug 2025 14:22:08 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v2] In-Reply-To: References: Message-ID: > This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) > > In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). > > My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. > > These fixes have been created when I have ploughed through test cases: > JDK-8352719: Add an equals sign to the modules statement > JDK-8352709: Remove bad timing annotations from WhileOpTest.java > JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test > CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE > CODETOOLS-7903961: Make default timeout configurable > > After the review, I will update the copyrights. > > I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. > > I got 4 timing related faults: > 1) runtime/Thread/TestThreadDumpMonitorContention.java > This is probably: https://bugs.openjdk.org/browse/JDK-8361370 > 2) sun/tools/jhsdb/BasicLauncherTest.java > I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. > 3) gc/stress/TestReclaimStringsLeaksMemory.java > I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. > 4) sun/security/ssl/X509KeyManager/CertChecking.java > This is a new test that I got on last rebase. I have added a timeout of 480 to it. > > In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. > > From the review of the cancelled "8356171: Increase timeout for test cases as preparation for change of... Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: After suggestions from Erik and Andrey ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26749/files - new: https://git.openjdk.org/jdk/pull/26749/files/ac47dbdc..dbe42964 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26749&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26749&range=00-01 Stats: 3 lines in 2 files changed: 1 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/26749.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26749/head:pull/26749 PR: https://git.openjdk.org/jdk/pull/26749 From lkorinth at openjdk.org Wed Aug 13 14:22:10 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 13 Aug 2025 14:22:10 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v2] In-Reply-To: References: Message-ID: On Wed, 13 Aug 2025 13:25:48 GMT, Erik Joelsson wrote: >> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: >> >> After suggestions from Erik and Andrey > > make/RunTests.gmk line 939: > >> 937: >> 938: JTREG_AUTO_PROBLEM_LISTS := >> 939: JTREG_AUTO_TIMEOUT_FACTOR := 1 # IT MAKES NO SENCE TO CHANGE IT. Fix individual test cases that time out instead. > > I'm not sure about this comment, but if we keep it, please move it to the line above and break lines as appropriate. I updated it to "Please reach consensus before changing this. It was not easy changing it to a `1`. " I also did not break the comment as it was shorter than line 933 above it. Is it acceptable now? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2273621868 From lkorinth at openjdk.org Wed Aug 13 14:22:11 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 13 Aug 2025 14:22:11 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v2] In-Reply-To: References: Message-ID: On Wed, 13 Aug 2025 09:44:33 GMT, Andrey Turbanov wrote: >> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: >> >> After suggestions from Erik and Andrey > > test/langtools/tools/lib/toolbox/ToolBox.java line 480: > >> 478: >> 479: private static final int RETRY_DELETE_MILLIS = isWindows() ? 500 : 0; >> 480: private static final int MAX_RETRY_DELETE_MILLIS = isWindows() ? 60 * 1000 : 0; > > Suggestion: > > private static final int MAX_RETRY_DELETE_MILLIS = isWindows() ? 60 * 1000 : 0; Fixed! ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2273614076 From alanb at openjdk.org Wed Aug 13 16:00:13 2025 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 13 Aug 2025 16:00:13 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 16:28:47 GMT, Brian Burkhalter wrote: >> src/java.base/unix/classes/sun/nio/fs/UnixFileSystemProvider.java line 429: >> >>> 427: >>> 428: // neither exists, compare normalized paths without filesystem access >>> 429: return obj1.normalize().equals(obj2.normalize()); >> >> normalize is to deal with user input, I don't think we should be using it here. >> >> (I will try to add review the changes soon but I'm concerned that this will require spec changes). > >> normalize is to deal with user input, I don't think we should be using it here. > > This was intended to handle comparing paths with `..` and `.` like "a/b/c/../d/e" with "a/b/d/e" as there is no closer `Path` equivalent that I could see to `File.getCanonicalPath` that does not access the file system, i.e., to avoid `Path.toRealPath` and a consequent `NoSuchFileException`. normalize collapses the path so I'm concerned about foo/.. in one and bar/.. in the other. They may collapse down to the equal paths, which may not be the right answer. I think the approach of collecting the file keys along the chain is good, a match means the method can return true. Also the case where one exists and the other doesn't is good. Beyond that then I think the method will have to throw as it can't give an answer. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2273903738 From alanb at openjdk.org Wed Aug 13 16:04:19 2025 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 13 Aug 2025 16:04:19 GMT Subject: RFR: 8359119: Change Charset to use StableValue [v3] In-Reply-To: <_slUSdx6gVElcqEg71xpeHsa99DhZ3YteV84gZvR5Hc=.73afbad1-6ba8-487b-ac44-b6cc09fdafc7@github.com> References: <_slUSdx6gVElcqEg71xpeHsa99DhZ3YteV84gZvR5Hc=.73afbad1-6ba8-487b-ac44-b6cc09fdafc7@github.com> Message-ID: <0PiCFIKC9MxdStAXGgyhouwAfPuUKh_jCY9MTJyB-MY=.e91c7801-f279-4c10-a732-ea9497620317@github.com> On Tue, 5 Aug 2025 09:08:47 GMT, Per Minborg wrote: >> Fields and methods can better leverage the Stable Value API compared to using DCL and holder classes. There are also some fields that can be marked `@Stable`. >> >> This PR passes tier1, tier2, and tier3 tests on multiple platforms. > > 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 six additional commits since the last revision: > > - Address comments in PR > - Merge branch 'master' into stablify-charset > - Revert for loop > - Revert more > - Revert changes > - Add stable value functionality Marked as reviewed by alanb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/25727#pullrequestreview-3116665856 From bpb at openjdk.org Wed Aug 13 16:15:11 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Wed, 13 Aug 2025 16:15:11 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links In-Reply-To: References: Message-ID: On Wed, 13 Aug 2025 15:57:39 GMT, Alan Bateman wrote: > normalize collapses the path so I'm concerned about foo/.. in one and bar/.. in the other. They may collapse down to the equal paths, which may not be the right answer. Good point. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2273940046 From bpb at openjdk.org Wed Aug 13 16:56:52 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Wed, 13 Aug 2025 16:56:52 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: References: Message-ID: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> > This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8154364: Remove assertion that two non-existent files with equal normalized paths are equal ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26736/files - new: https://git.openjdk.org/jdk/pull/26736/files/a7a8b416..1aac01aa Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=00-01 Stats: 4 lines in 2 files changed: 1 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/26736.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26736/head:pull/26736 PR: https://git.openjdk.org/jdk/pull/26736 From bpb at openjdk.org Wed Aug 13 16:56:52 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Wed, 13 Aug 2025 16:56:52 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: References: Message-ID: On Wed, 13 Aug 2025 16:12:07 GMT, Brian Burkhalter wrote: >> normalize collapses the path so I'm concerned about foo/.. in one and bar/.. in the other. They may collapse down to the equal paths, which may not be the right answer. >> >> I think the approach of collecting the file keys along the chain is good, a match means the method can return true. Also the case where one exists and the other doesn't is good. Beyond that then I think the method will have to throw as it can't give an answer. > >> normalize collapses the path so I'm concerned about foo/.. in one and bar/.. in the other. They may collapse down to the equal paths, which may not be the right answer. > > Good point. Use of normalized paths removed in 1aac01a. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2274057104 From alanb at openjdk.org Thu Aug 14 06:45:11 2025 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 14 Aug 2025 06:45:11 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> References: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> Message-ID: On Wed, 13 Aug 2025 16:56:52 GMT, Brian Burkhalter wrote: >> This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8154364: Remove assertion that two non-existent files with equal normalized paths are equal src/java.base/unix/classes/sun/nio/fs/UnixFileSystemProvider.java line 394: > 392: // check existence while following linkx > 393: boolean exists1 = exists(file1); > 394: boolean exists2 = exists(file2); Did you try to using UnixFileAttribtues.getIfExists? That would remove the need for access(2) from the common case. We can add getIfExists(UnixPath path, boolean followLinks) if needed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2275630370 From duke at openjdk.org Thu Aug 14 07:12:15 2025 From: duke at openjdk.org (ExE Boss) Date: Thu, 14 Aug 2025 07:12:15 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: References: Message-ID: On Wed, 13 Aug 2025 16:53:12 GMT, Brian Burkhalter wrote: >>> normalize collapses the path so I'm concerned about foo/.. in one and bar/.. in the other. They may collapse down to the equal paths, which may not be the right answer. >> >> Good point. > > Use of normalized paths removed in 1aac01a. Note?that `Path::equals` on?**Windows** is?also?wrong when the?path?contains case?sensitive directories and?the?path element isn?t case?sensitively?equal in?those?directories. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2275680441 From duke at openjdk.org Thu Aug 14 07:12:17 2025 From: duke at openjdk.org (ExE Boss) Date: Thu, 14 Aug 2025 07:12:17 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> References: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> Message-ID: On Wed, 13 Aug 2025 16:56:52 GMT, Brian Burkhalter wrote: >> This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8154364: Remove assertion that two non-existent files with equal normalized paths are equal src/java.base/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java line 478: > 476: > 477: // neither exists, compare normalized paths without filesystem access > 478: return obj1.normalize().equals(obj2.normalize()); This `Path::normalize` call?was?missed. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2275684211 From bpb at openjdk.org Thu Aug 14 15:06:19 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 14 Aug 2025 15:06:19 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: References: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> Message-ID: On Thu, 14 Aug 2025 06:41:52 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: >> >> 8154364: Remove assertion that two non-existent files with equal normalized paths are equal > > src/java.base/unix/classes/sun/nio/fs/UnixFileSystemProvider.java line 394: > >> 392: // check existence while following linkx >> 393: boolean exists1 = exists(file1); >> 394: boolean exists2 = exists(file2); > > Did you try to using UnixFileAttribtues.getIfExists? That would remove the need for access(2) from the common case. We can add getIfExists(UnixPath path, boolean followLinks) if needed. No, but I'll investigate. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2276898431 From bpb at openjdk.org Thu Aug 14 15:06:23 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 14 Aug 2025 15:06:23 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: References: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> Message-ID: <71EySYtMHYkccDJQN7ElNmwVOkgF1O8RuDx2b-eM6K8=.c1d7f790-c79a-47da-b40f-954d38a34b5b@github.com> On Thu, 14 Aug 2025 07:09:24 GMT, ExE Boss wrote: > This `Path::normalize` call was missed. Yes, I realized this myself a while ago. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2276894871 From bpb at openjdk.org Thu Aug 14 15:14:58 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 14 Aug 2025 15:14:58 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v3] In-Reply-To: References: Message-ID: > This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8154364: Propagate change of previous commit to Windows ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26736/files - new: https://git.openjdk.org/jdk/pull/26736/files/1aac01aa..f25a3725 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=01-02 Stats: 3 lines in 1 file changed: 1 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/26736.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26736/head:pull/26736 PR: https://git.openjdk.org/jdk/pull/26736 From bpb at openjdk.org Thu Aug 14 15:14:58 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 14 Aug 2025 15:14:58 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: <71EySYtMHYkccDJQN7ElNmwVOkgF1O8RuDx2b-eM6K8=.c1d7f790-c79a-47da-b40f-954d38a34b5b@github.com> References: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> <71EySYtMHYkccDJQN7ElNmwVOkgF1O8RuDx2b-eM6K8=.c1d7f790-c79a-47da-b40f-954d38a34b5b@github.com> Message-ID: On Thu, 14 Aug 2025 15:02:26 GMT, Brian Burkhalter wrote: >> src/java.base/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java line 478: >> >>> 476: >>> 477: // neither exists, compare normalized paths without filesystem access >>> 478: return obj1.normalize().equals(obj2.normalize()); >> >> This `Path::normalize` call?was?missed. > >> This `Path::normalize` call was missed. > > Yes, I realized this myself a while ago. Fixed in f25a372. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2276917283 From bpb at openjdk.org Thu Aug 14 15:21:13 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 14 Aug 2025 15:21:13 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: References: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> Message-ID: On Thu, 14 Aug 2025 15:03:48 GMT, Brian Burkhalter wrote: >> src/java.base/unix/classes/sun/nio/fs/UnixFileSystemProvider.java line 394: >> >>> 392: // check existence while following linkx >>> 393: boolean exists1 = exists(file1); >>> 394: boolean exists2 = exists(file2); >> >> Did you try to using UnixFileAttribtues.getIfExists? That would remove the need for access(2) from the common case. We can add getIfExists(UnixPath path, boolean followLinks) if needed. > > No, but I'll investigate. > Did you try to using UnixFileAttribtues.getIfExists? I think you're correct that this would speed up the common case a bit, but as implied, it would require adding `getIfExists` which does not follow links. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2276941825 From bpb at openjdk.org Thu Aug 14 16:20:11 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 14 Aug 2025 16:20:11 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: References: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> Message-ID: On Thu, 14 Aug 2025 15:18:46 GMT, Brian Burkhalter wrote: >> No, but I'll investigate. > >> Did you try to using UnixFileAttribtues.getIfExists? > > I think you're correct that this would speed up the common case a bit, but as implied, it would require adding `getIfExists` which does not follow links. For some reason TBD, `UnixFileAttributes.get` succeeds with a symlink loop but `UnixFileAttributes.getIfExists` fails with `ELOOP`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2277090826 From alanb at openjdk.org Thu Aug 14 16:20:14 2025 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 14 Aug 2025 16:20:14 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v3] In-Reply-To: References: Message-ID: On Thu, 14 Aug 2025 15:14:58 GMT, Brian Burkhalter wrote: >> This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8154364: Propagate change of previous commit to Windows src/java.base/unix/classes/sun/nio/fs/UnixFileSystemProvider.java line 430: > 428: // neither exist and comparison of normalized paths is problematic, > 429: // so return false > 430: return false; I think you can drop "comparison of normalized paths is problematic" as it begs too many questions for anyone looking at this code. src/java.base/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java line 423: > 421: @Override > 422: public boolean isSameFile(Path obj1, Path obj2) throws IOException { > 423: // toWindowsPath verifies its argument is a non-null UnixPath UnixPath - WindowsPath src/java.base/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java line 435: > 433: // check existence > 434: boolean exists1 = exists(obj1); > 435: boolean exists2 = exists(obj2); exists does the openForReadAttributeAccess+readAttributes+CloseHandle so it looks like the change means it will do it twice for each file. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2277086814 PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2277084675 PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2277084346 From bpb at openjdk.org Thu Aug 14 16:44:10 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 14 Aug 2025 16:44:10 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: References: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> Message-ID: On Thu, 14 Aug 2025 16:17:59 GMT, Brian Burkhalter wrote: >>> Did you try to using UnixFileAttribtues.getIfExists? >> >> I think you're correct that this would speed up the common case a bit, but as implied, it would require adding `getIfExists` which does not follow links. > > For some reason TBD, `UnixFileAttributes.get` succeeds with a symlink loop but `UnixFileAttributes.getIfExists` fails with `ELOOP`. The `ELOOP` apparently is from the `stat` syscall and does not occur in the current version because `access` is called before `stat` and does not fail in that way. So I am not sure that `getIfExists` is the way to go here unless we want to punt the link loop cases. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2277142337 From alanb at openjdk.org Thu Aug 14 16:44:11 2025 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 14 Aug 2025 16:44:11 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: References: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> Message-ID: On Thu, 14 Aug 2025 16:37:51 GMT, Brian Burkhalter wrote: >> For some reason TBD, `UnixFileAttributes.get` succeeds with a symlink loop but `UnixFileAttributes.getIfExists` fails with `ELOOP`. > > The `ELOOP` apparently is from the `stat` syscall and does not occur in the current version because `access` is called before `stat` and does not fail in that way. So I am not sure that `getIfExists` is the way to go here unless we want to punt the link loop cases. Are you testing a loop in the file system? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2277146480 From bpb at openjdk.org Thu Aug 14 16:44:11 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 14 Aug 2025 16:44:11 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: References: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> Message-ID: On Thu, 14 Aug 2025 16:39:46 GMT, Alan Bateman wrote: > Are you testing a loop in the file system? Yes, in the `linkLoop` sub-test of `IsSameFile`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2277150448 From alanb at openjdk.org Thu Aug 14 16:48:10 2025 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 14 Aug 2025 16:48:10 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: References: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> Message-ID: On Thu, 14 Aug 2025 16:41:15 GMT, Brian Burkhalter wrote: >> Are you testing a loop in the file system? > >> Are you testing a loop in the file system? > > Yes, in the `linkLoop` sub-test of `IsSameFile`. So ELOOP is correct and IsSameFile should thrown, right? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2277164939 From bpb at openjdk.org Thu Aug 14 16:56:13 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 14 Aug 2025 16:56:13 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: References: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> Message-ID: On Thu, 14 Aug 2025 16:45:41 GMT, Alan Bateman wrote: >>> Are you testing a loop in the file system? >> >> Yes, in the `linkLoop` sub-test of `IsSameFile`. > > So ELOOP is correct and IsSameFile should thrown, right? It depends whether we want to support a case such as ```L1 -> L2 -> L3 -> L1 ...```. Depending on what is specified, then for example `isSameFile(L1,L3)` should either throw or return `true`. In the current version, it is the latter. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2277176512 From alanb at openjdk.org Thu Aug 14 16:56:15 2025 From: alanb at openjdk.org (Alan Bateman) Date: Thu, 14 Aug 2025 16:56:15 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: References: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> Message-ID: On Thu, 14 Aug 2025 16:49:14 GMT, Brian Burkhalter wrote: >> So ELOOP is correct and IsSameFile should thrown, right? > > It depends whether we want to support a case such as > ```L1 -> L2 -> L3 -> L1 ...```. > Depending on what is specified, then for example `isSameFile(L1,L3)` should either throw or return `true`. In the current version, it is the latter. It's a loop in the file system and not unreasonable for isSameFile to throw. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2277183692 From bpb at openjdk.org Thu Aug 14 16:56:16 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 14 Aug 2025 16:56:16 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v2] In-Reply-To: References: <26VIvSZrRd0oIwg05KXupAwvpZF3Dll2e0-iLxiIlZU=.f43e98b0-1146-4317-843e-f819469310f4@github.com> Message-ID: On Thu, 14 Aug 2025 16:51:56 GMT, Alan Bateman wrote: >> It depends whether we want to support a case such as >> ```L1 -> L2 -> L3 -> L1 ...```. >> Depending on what is specified, then for example `isSameFile(L1,L3)` should either throw or return `true`. In the current version, it is the latter. > > It's a loop in the file system and not unreasonable for isSameFile to throw. Okay, then I'll switch it to use `getIfExists` and update the test. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2277186957 From bpb at openjdk.org Thu Aug 14 19:00:12 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Thu, 14 Aug 2025 19:00:12 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v3] In-Reply-To: References: Message-ID: On Thu, 14 Aug 2025 16:15:00 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: >> >> 8154364: Propagate change of previous commit to Windows > > src/java.base/windows/classes/sun/nio/fs/WindowsFileSystemProvider.java line 435: > >> 433: // check existence >> 434: boolean exists1 = exists(obj1); >> 435: boolean exists2 = exists(obj2); > > exists does the openForReadAttributeAccess+readAttributes+CloseHandle so it looks like the change means it will do it twice for each file. Right, the Windows implementation is not good and needs to be rethought. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2277483808 From dnsimon at openjdk.org Thu Aug 14 19:33:15 2025 From: dnsimon at openjdk.org (Doug Simon) Date: Thu, 14 Aug 2025 19:33:15 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v2] In-Reply-To: References: Message-ID: On Wed, 13 Aug 2025 14:22:08 GMT, Leo Korinth wrote: >> This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) >> >> In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). >> >> My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. >> >> These fixes have been created when I have ploughed through test cases: >> JDK-8352719: Add an equals sign to the modules statement >> JDK-8352709: Remove bad timing annotations from WhileOpTest.java >> JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test >> CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE >> CODETOOLS-7903961: Make default timeout configurable >> >> After the review, I will update the copyrights. >> >> I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. >> >> I got 4 timing related faults: >> 1) runtime/Thread/TestThreadDumpMonitorContention.java >> This is probably: https://bugs.openjdk.org/browse/JDK-8361370 >> 2) sun/tools/jhsdb/BasicLauncherTest.java >> I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. >> 3) gc/stress/TestReclaimStringsLeaksMemory.java >> I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. >> 4) sun/security/ssl/X509KeyManager/CertChecking.java >> This is a new test that I got on last rebase. I have added a timeout of 480 to it. >> >> In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. >> >> From the review of the cancelled "8356171: ... > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > After suggestions from Erik and Andrey > I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. Would you mind also running tier9 to avoid surprises there. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26749#issuecomment-3189640422 From bpb at openjdk.org Fri Aug 15 00:19:37 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Fri, 15 Aug 2025 00:19:37 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v4] In-Reply-To: References: Message-ID: > This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8154364: Unix cleanup ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26736/files - new: https://git.openjdk.org/jdk/pull/26736/files/f25a3725..29491bf9 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=02-03 Stats: 71 lines in 3 files changed: 41 ins; 20 del; 10 mod Patch: https://git.openjdk.org/jdk/pull/26736.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26736/head:pull/26736 PR: https://git.openjdk.org/jdk/pull/26736 From mbaesken at openjdk.org Fri Aug 15 07:08:53 2025 From: mbaesken at openjdk.org (Matthias Baesken) Date: Fri, 15 Aug 2025 07:08:53 GMT Subject: RFR: 8365543: [aix] Java_sun_nio_fs_UnixNativeDispatcher_init needs adjustment for AIX for some system call functions Message-ID: Java_sun_nio_fs_UnixNativeDispatcher_init currently misses to set the correct OS functions for my_openat_func and my_fstatat_func on AIX ; this should be adjusted. ------------- Commit messages: - JDK-8365543 Changes: https://git.openjdk.org/jdk/pull/26793/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26793&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8365543 Stats: 16 lines in 2 files changed: 7 ins; 8 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/26793.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26793/head:pull/26793 PR: https://git.openjdk.org/jdk/pull/26793 From jkern at openjdk.org Fri Aug 15 07:52:09 2025 From: jkern at openjdk.org (Joachim Kern) Date: Fri, 15 Aug 2025 07:52:09 GMT Subject: RFR: 8365543: UnixNativeDispatcher.init should lookup open64at and stat64at on AIX In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 06:58:35 GMT, Matthias Baesken wrote: > Java_sun_nio_fs_UnixNativeDispatcher_init currently misses to set the correct OS functions for my_openat_func and my_fstatat_func on AIX ; this should be adjusted. LGTM ------------- Marked as reviewed by jkern (Committer). PR Review: https://git.openjdk.org/jdk/pull/26793#pullrequestreview-3123182721 From stuefe at openjdk.org Fri Aug 15 08:08:09 2025 From: stuefe at openjdk.org (Thomas Stuefe) Date: Fri, 15 Aug 2025 08:08:09 GMT Subject: RFR: 8365543: UnixNativeDispatcher.init should lookup open64at and stat64at on AIX In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 06:58:35 GMT, Matthias Baesken wrote: > Java_sun_nio_fs_UnixNativeDispatcher_init currently misses to set the correct OS functions for my_openat_func and my_fstatat_func on AIX ; this should be adjusted. +1 ------------- Marked as reviewed by stuefe (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26793#pullrequestreview-3123203684 From goetz at openjdk.org Fri Aug 15 08:08:10 2025 From: goetz at openjdk.org (Goetz Lindenmaier) Date: Fri, 15 Aug 2025 08:08:10 GMT Subject: RFR: 8365543: UnixNativeDispatcher.init should lookup open64at and stat64at on AIX In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 06:58:35 GMT, Matthias Baesken wrote: > Java_sun_nio_fs_UnixNativeDispatcher_init currently misses to set the correct OS functions for my_openat_func and my_fstatat_func on AIX ; this should be adjusted. Impressive subtle difference in function names. Looks good. Thanks for cleaning up the #ifdefs along with this. ------------- Marked as reviewed by goetz (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26793#pullrequestreview-3123207200 From lkorinth at openjdk.org Fri Aug 15 11:43:33 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Fri, 15 Aug 2025 11:43:33 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: Message-ID: > This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) > > In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). > > My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. > > These fixes have been created when I have ploughed through test cases: > JDK-8352719: Add an equals sign to the modules statement > JDK-8352709: Remove bad timing annotations from WhileOpTest.java > JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test > CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE > CODETOOLS-7903961: Make default timeout configurable > > After the review, I will update the copyrights. > > I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. > > I got 4 timing related faults: > 1) runtime/Thread/TestThreadDumpMonitorContention.java > This is probably: https://bugs.openjdk.org/browse/JDK-8361370 > 2) sun/tools/jhsdb/BasicLauncherTest.java > I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. > 3) gc/stress/TestReclaimStringsLeaksMemory.java > I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. > 4) sun/security/ssl/X509KeyManager/CertChecking.java > This is a new test that I got on last rebase. I have added a timeout of 480 to it. > > In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. > > From the review of the cancelled "8356171: Increase timeout for test cases as preparation for change of... Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: added extra timeout for: jdk/internal/vm/Continuation/BasicExt.java#COMP_WINDOW_LENGTH_{1-3}-GC_AFTER_YIELD ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26749/files - new: https://git.openjdk.org/jdk/pull/26749/files/dbe42964..8fa40e7d Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26749&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26749&range=01-02 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/26749.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26749/head:pull/26749 PR: https://git.openjdk.org/jdk/pull/26749 From lkorinth at openjdk.org Fri Aug 15 11:59:12 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Fri, 15 Aug 2025 11:59:12 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 11:43:33 GMT, Leo Korinth wrote: >> This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) >> >> In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). >> >> My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. >> >> These fixes have been created when I have ploughed through test cases: >> JDK-8352719: Add an equals sign to the modules statement >> JDK-8352709: Remove bad timing annotations from WhileOpTest.java >> JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test >> CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE >> CODETOOLS-7903961: Make default timeout configurable >> >> After the review, I will update the copyrights. >> >> I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. >> >> I got 4 timing related faults: >> 1) runtime/Thread/TestThreadDumpMonitorContention.java >> This is probably: https://bugs.openjdk.org/browse/JDK-8361370 >> 2) sun/tools/jhsdb/BasicLauncherTest.java >> I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. >> 3) gc/stress/TestReclaimStringsLeaksMemory.java >> I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. >> 4) sun/security/ssl/X509KeyManager/CertChecking.java >> This is a new test that I got on last rebase. I have added a timeout of 480 to it. >> >> In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. >> >> From the review of the cancelled "8356171: ... > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > added extra timeout for: jdk/internal/vm/Continuation/BasicExt.java#COMP_WINDOW_LENGTH_{1-3}-GC_AFTER_YIELD Added three new `/timeout=480` after the last run. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26749#issuecomment-3191343090 From syan at openjdk.org Fri Aug 15 14:08:12 2025 From: syan at openjdk.org (SendaoYan) Date: Fri, 15 Aug 2025 14:08:12 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 11:43:33 GMT, Leo Korinth wrote: >> This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) >> >> In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). >> >> My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. >> >> These fixes have been created when I have ploughed through test cases: >> JDK-8352719: Add an equals sign to the modules statement >> JDK-8352709: Remove bad timing annotations from WhileOpTest.java >> JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test >> CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE >> CODETOOLS-7903961: Make default timeout configurable >> >> After the review, I will update the copyrights. >> >> I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. >> >> I got 4 timing related faults: >> 1) runtime/Thread/TestThreadDumpMonitorContention.java >> This is probably: https://bugs.openjdk.org/browse/JDK-8361370 >> 2) sun/tools/jhsdb/BasicLauncherTest.java >> I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. >> 3) gc/stress/TestReclaimStringsLeaksMemory.java >> I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. >> 4) sun/security/ssl/X509KeyManager/CertChecking.java >> This is a new test that I got on last rebase. I have added a timeout of 480 to it. >> >> In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. >> >> From the review of the cancelled "8356171: ... > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > added extra timeout for: jdk/internal/vm/Continuation/BasicExt.java#COMP_WINDOW_LENGTH_{1-3}-GC_AFTER_YIELD make/RunTests.gmk line 940: > 938: JTREG_AUTO_PROBLEM_LISTS := > 939: # Please reach consensus before changing this. It was not easy changing it to a `1`. > 940: JTREG_AUTO_TIMEOUT_FACTOR := 1 Since the default value of JTREG_AUTO_TIMEOUT_FACTOR set to 1 by default, then the value of [JTREG_AUTO_TIMEOUT_FACTOR](https://github.com/lkorinth/jdk/blob/dbe42964371a38b2c6cd9e842c5b28ca4ac15506/make/RunTests.gmk#L944) when run with -Xcomp should be change from 10 to 2.5() ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2279056261 From rriggs at openjdk.org Fri Aug 15 15:54:22 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Fri, 15 Aug 2025 15:54:22 GMT Subject: RFR: 8359119: Change Charset to use StableValue [v3] In-Reply-To: <_slUSdx6gVElcqEg71xpeHsa99DhZ3YteV84gZvR5Hc=.73afbad1-6ba8-487b-ac44-b6cc09fdafc7@github.com> References: <_slUSdx6gVElcqEg71xpeHsa99DhZ3YteV84gZvR5Hc=.73afbad1-6ba8-487b-ac44-b6cc09fdafc7@github.com> Message-ID: On Tue, 5 Aug 2025 09:08:47 GMT, Per Minborg wrote: >> Fields and methods can better leverage the Stable Value API compared to using DCL and holder classes. There are also some fields that can be marked `@Stable`. >> >> This PR passes tier1, tier2, and tier3 tests on multiple platforms. > > 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 six additional commits since the last revision: > > - Address comments in PR > - Merge branch 'master' into stablify-charset > - Revert for loop > - Revert more > - Revert changes > - Add stable value functionality Looks good. ------------- Marked as reviewed by rriggs (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/25727#pullrequestreview-3124350887 From bpb at openjdk.org Fri Aug 15 17:05:10 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Fri, 15 Aug 2025 17:05:10 GMT Subject: RFR: 8365543: UnixNativeDispatcher.init should lookup open64at and stat64at on AIX In-Reply-To: References: Message-ID: <_H5mrv62vVHZFoTG1iLDYu4ViLys6Ulqq2_6dL0O3zg=.90cbb747-24f7-4fc7-ab26-d2fc41f6e204@github.com> On Fri, 15 Aug 2025 06:58:35 GMT, Matthias Baesken wrote: > Java_sun_nio_fs_UnixNativeDispatcher_init currently misses to set the correct OS functions for my_openat_func and my_fstatat_func on AIX ; this should be adjusted. Looks all right to me also, but I'll abstain from approving as it's AIX. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26793#issuecomment-3192190515 From alanb at openjdk.org Fri Aug 15 17:15:11 2025 From: alanb at openjdk.org (Alan Bateman) Date: Fri, 15 Aug 2025 17:15:11 GMT Subject: RFR: 8365543: UnixNativeDispatcher.init should lookup open64at and stat64at on AIX In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 06:58:35 GMT, Matthias Baesken wrote: > Java_sun_nio_fs_UnixNativeDispatcher_init currently misses to set the correct OS functions for my_openat_func and my_fstatat_func on AIX ; this should be adjusted. Marked as reviewed by alanb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/26793#pullrequestreview-3124606292 From bpb at openjdk.org Fri Aug 15 18:28:56 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Fri, 15 Aug 2025 18:28:56 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v5] In-Reply-To: References: Message-ID: > This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8154364: Revert Windows changes ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26736/files - new: https://git.openjdk.org/jdk/pull/26736/files/29491bf9..1f1b23dd Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=03-04 Stats: 40 lines in 1 file changed: 3 ins; 17 del; 20 mod Patch: https://git.openjdk.org/jdk/pull/26736.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26736/head:pull/26736 PR: https://git.openjdk.org/jdk/pull/26736 From bpb at openjdk.org Fri Aug 15 18:28:56 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Fri, 15 Aug 2025 18:28:56 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v4] In-Reply-To: References: Message-ID: <0SdTtBXBnDh8O00iabIKIBd8I5mBAFVZpjXAkmAjzgM=.dae80ba1-087e-488b-8730-9e6b8c88647a@github.com> On Fri, 15 Aug 2025 00:19:37 GMT, Brian Burkhalter wrote: >> This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8154364: Unix cleanup This request is now constrained to Unix as links are not used as widely on Windows. The Windows case might be addressed by a separate issue. Caveat: The test needs to be limited to not Windows so one more commit is needed. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26736#issuecomment-3192375529 PR Comment: https://git.openjdk.org/jdk/pull/26736#issuecomment-3192376648 From bpb at openjdk.org Fri Aug 15 18:31:42 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Fri, 15 Aug 2025 18:31:42 GMT Subject: RFR: 8154364: Files.isSameFile() throws NoSuchFileException with broken symbolic links [v6] In-Reply-To: References: Message-ID: > This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8154364: Constrain test to non-Windows ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26736/files - new: https://git.openjdk.org/jdk/pull/26736/files/1f1b23dd..db58e692 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=05 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=04-05 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/26736.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26736/head:pull/26736 PR: https://git.openjdk.org/jdk/pull/26736 From bpb at openjdk.org Fri Aug 15 19:12:29 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Fri, 15 Aug 2025 19:12:29 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v7] In-Reply-To: References: Message-ID: <0RfpOi3g_4liJOzmnuGVqfcPjHaOq2tbcrpbz4Htxnw=.31faf93f-5221-43d5-95ff-620e15e4916f@github.com> > This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8154364: Remove vestigial @DisabledOnOs ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26736/files - new: https://git.openjdk.org/jdk/pull/26736/files/db58e692..85f3cdb3 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=06 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=05-06 Stats: 4 lines in 1 file changed: 0 ins; 4 del; 0 mod Patch: https://git.openjdk.org/jdk/pull/26736.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26736/head:pull/26736 PR: https://git.openjdk.org/jdk/pull/26736 From bpb at openjdk.org Fri Aug 15 20:43:41 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Fri, 15 Aug 2025 20:43:41 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v8] In-Reply-To: References: Message-ID: <2vHKLbSpprQMq6c-P7rngt2xhd1H7vbB4oeHB7Nl5tM=.e834525d-0723-4234-9904-4f899d2efa79@github.com> > This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8154364: Put changes to Misc.java in platform-specific blocks ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26736/files - new: https://git.openjdk.org/jdk/pull/26736/files/85f3cdb3..8b85dfd7 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=07 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=06-07 Stats: 31 lines in 1 file changed: 26 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/26736.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26736/head:pull/26736 PR: https://git.openjdk.org/jdk/pull/26736 From alanb at openjdk.org Sat Aug 16 07:07:16 2025 From: alanb at openjdk.org (Alan Bateman) Date: Sat, 16 Aug 2025 07:07:16 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v8] In-Reply-To: <2vHKLbSpprQMq6c-P7rngt2xhd1H7vbB4oeHB7Nl5tM=.e834525d-0723-4234-9904-4f899d2efa79@github.com> References: <2vHKLbSpprQMq6c-P7rngt2xhd1H7vbB4oeHB7Nl5tM=.e834525d-0723-4234-9904-4f899d2efa79@github.com> Message-ID: On Fri, 15 Aug 2025 20:43:41 GMT, Brian Burkhalter wrote: >> This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8154364: Put changes to Misc.java in platform-specific blocks src/java.base/unix/classes/sun/nio/fs/UnixFileAttributes.java line 88: > 86: static UnixFileAttributes getIfExists(UnixPath path) > 87: throws UnixException > 88: { It would be nice if getIfExists(path) could be implemented as getIfExists(path, true) but it can't because the former doesn't need an exception when the file doesn't exists where the latter does. Something to look into sometime. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2280283317 From alanb at openjdk.org Sat Aug 16 07:32:15 2025 From: alanb at openjdk.org (Alan Bateman) Date: Sat, 16 Aug 2025 07:32:15 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v8] In-Reply-To: <2vHKLbSpprQMq6c-P7rngt2xhd1H7vbB4oeHB7Nl5tM=.e834525d-0723-4234-9904-4f899d2efa79@github.com> References: <2vHKLbSpprQMq6c-P7rngt2xhd1H7vbB4oeHB7Nl5tM=.e834525d-0723-4234-9904-4f899d2efa79@github.com> Message-ID: On Fri, 15 Aug 2025 20:43:41 GMT, Brian Burkhalter wrote: >> This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8154364: Put changes to Misc.java in platform-specific blocks src/java.base/unix/classes/sun/nio/fs/UnixFileSystemProvider.java line 379: > 377: } > 378: return keys; > 379: } I'm a bit puzzled as to why it looks at each element in the path. It should be possible to just enumerate the files of the sym links that exist, something like this var fileKeys = new HashSet(); while (path != null) { UnixFileAttributes attrs = UnixFileAttributes.getIfExists(path, false); if (attrs != null && attrs.isSymbolicLink()) { fileKeys.add(attrs.fileKey()); path = (UnixPath) readSymbolicLink(path); } else { path = null; } } ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2280292509 From stephen_flav at hotmail.com Sat Aug 16 20:25:24 2025 From: stephen_flav at hotmail.com (stephen_flav at hotmail.com) Date: Sat, 16 Aug 2025 21:25:24 +0100 Subject: Thoughts on generalizing transferTo/transferFrom beyond FileChannel? Message-ID: An HTML attachment was scrubbed... URL: From pminborg at openjdk.org Mon Aug 18 05:35:20 2025 From: pminborg at openjdk.org (Per Minborg) Date: Mon, 18 Aug 2025 05:35:20 GMT Subject: Integrated: 8359119: Change Charset to use StableValue In-Reply-To: References: Message-ID: On Tue, 10 Jun 2025 14:09:03 GMT, Per Minborg wrote: > Fields and methods can better leverage the Stable Value API compared to using DCL and holder classes. There are also some fields that can be marked `@Stable`. > > This PR passes tier1, tier2, and tier3 tests on multiple platforms. This pull request has now been integrated. Changeset: f364fcab Author: Per Minborg URL: https://git.openjdk.org/jdk/commit/f364fcab792ed5a14e5c2779fa85ecc9d6915ae3 Stats: 86 lines in 1 file changed: 26 ins; 30 del; 30 mod 8359119: Change Charset to use StableValue Reviewed-by: alanb, rriggs ------------- PR: https://git.openjdk.org/jdk/pull/25727 From mbaesken at openjdk.org Mon Aug 18 07:13:13 2025 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 18 Aug 2025 07:13:13 GMT Subject: RFR: 8365543: UnixNativeDispatcher.init should lookup open64at and stat64at on AIX In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 06:58:35 GMT, Matthias Baesken wrote: > Java_sun_nio_fs_UnixNativeDispatcher_init currently misses to set the correct OS functions for my_openat_func and my_fstatat_func on AIX ; this should be adjusted. Thanks for the reviews ! ------------- PR Comment: https://git.openjdk.org/jdk/pull/26793#issuecomment-3195403228 From mbaesken at openjdk.org Mon Aug 18 07:17:20 2025 From: mbaesken at openjdk.org (Matthias Baesken) Date: Mon, 18 Aug 2025 07:17:20 GMT Subject: Integrated: 8365543: UnixNativeDispatcher.init should lookup open64at and stat64at on AIX In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 06:58:35 GMT, Matthias Baesken wrote: > Java_sun_nio_fs_UnixNativeDispatcher_init currently misses to set the correct OS functions for my_openat_func and my_fstatat_func on AIX ; this should be adjusted. This pull request has now been integrated. Changeset: 166ea12d Author: Matthias Baesken URL: https://git.openjdk.org/jdk/commit/166ea12d73c7a40a1a26dc586e3db9d9430c068f Stats: 16 lines in 2 files changed: 7 ins; 8 del; 1 mod 8365543: UnixNativeDispatcher.init should lookup open64at and stat64at on AIX Co-authored-by: Joachim Kern Reviewed-by: jkern, stuefe, goetz, alanb ------------- PR: https://git.openjdk.org/jdk/pull/26793 From lkorinth at openjdk.org Mon Aug 18 09:10:13 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 18 Aug 2025 09:10:13 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 14:05:49 GMT, SendaoYan wrote: >> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: >> >> added extra timeout for: jdk/internal/vm/Continuation/BasicExt.java#COMP_WINDOW_LENGTH_{1-3}-GC_AFTER_YIELD > > make/RunTests.gmk line 940: > >> 938: JTREG_AUTO_PROBLEM_LISTS := >> 939: # Please reach consensus before changing this. It was not easy changing it to a `1`. >> 940: JTREG_AUTO_TIMEOUT_FACTOR := 1 > > Since the default value of JTREG_AUTO_TIMEOUT_FACTOR set to 1 by default, then the value of [JTREG_AUTO_TIMEOUT_FACTOR](https://github.com/lkorinth/jdk/blob/dbe42964371a38b2c6cd9e842c5b28ca4ac15506/make/RunTests.gmk#L944) when run with -Xcomp should be change from 10 to 2.5() It is unclear to me if the author meant this to be `2.5` more than normal or `10` more than JTREG default, or a `multiplier that seems to work`. It does not bother me _more_ if it is a `10` then a `2.5`, as it needs to have a value that is not the multiplicative identity value. I will not change this, the change I have made is already large enough and I want this to be integrated ASAP. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2281781536 From lkorinth at openjdk.org Mon Aug 18 09:18:12 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 18 Aug 2025 09:18:12 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: Message-ID: On Mon, 18 Aug 2025 09:07:54 GMT, Leo Korinth wrote: >> make/RunTests.gmk line 940: >> >>> 938: JTREG_AUTO_PROBLEM_LISTS := >>> 939: # Please reach consensus before changing this. It was not easy changing it to a `1`. >>> 940: JTREG_AUTO_TIMEOUT_FACTOR := 1 >> >> Since the default value of JTREG_AUTO_TIMEOUT_FACTOR set to 1 by default, then the value of [JTREG_AUTO_TIMEOUT_FACTOR](https://github.com/lkorinth/jdk/blob/dbe42964371a38b2c6cd9e842c5b28ca4ac15506/make/RunTests.gmk#L944) when run with -Xcomp should be change from 10 to 2.5() > > It is unclear to me if the author meant this to be `2.5` more than normal or `10` more than JTREG default, or a `multiplier that seems to work`. It does not bother me _more_ if it is a `10` then a `2.5`, as it needs to have a value that is not the multiplicative identity value. I will not change this, the change I have made is already large enough and I want this to be integrated ASAP. It is also something that can be changed later, in a follow up fix. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2281802454 From lkorinth at openjdk.org Mon Aug 18 09:36:13 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 18 Aug 2025 09:36:13 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v2] In-Reply-To: References: Message-ID: <3l5I9q7S4O_0gH6mvxy3P21f1JxqcQKNsnBTN7rWhmc=.ddcf4337-dc6e-493d-ae07-5bd4affb9321@github.com> On Thu, 14 Aug 2025 19:30:30 GMT, Doug Simon wrote: > > I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. > > Would you mind also running tier9 to avoid surprises there. I had problems doing this, and I just want to say that I have not run tier9 (I have talked to Douglas off-list). ------------- PR Comment: https://git.openjdk.org/jdk/pull/26749#issuecomment-3195900610 From lkorinth at openjdk.org Mon Aug 18 09:43:14 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 18 Aug 2025 09:43:14 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: Message-ID: <9GMJWT-CNwqDVALuPdRR9EDs5G1c2jUr3y887qw2_EU=.1a7347a2-d1e5-427d-aeda-6924e2db39ba@github.com> On Fri, 15 Aug 2025 11:43:33 GMT, Leo Korinth wrote: >> This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) >> >> In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). >> >> My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. >> >> These fixes have been created when I have ploughed through test cases: >> JDK-8352719: Add an equals sign to the modules statement >> JDK-8352709: Remove bad timing annotations from WhileOpTest.java >> JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test >> CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE >> CODETOOLS-7903961: Make default timeout configurable >> >> After the review, I will update the copyrights. >> >> I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. >> >> I got 4 timing related faults: >> 1) runtime/Thread/TestThreadDumpMonitorContention.java >> This is probably: https://bugs.openjdk.org/browse/JDK-8361370 >> 2) sun/tools/jhsdb/BasicLauncherTest.java >> I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. >> 3) gc/stress/TestReclaimStringsLeaksMemory.java >> I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. >> 4) sun/security/ssl/X509KeyManager/CertChecking.java >> This is a new test that I got on last rebase. I have added a timeout of 480 to it. >> >> In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. >> >> From the review of the cancelled "8356171: ... > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > added extra timeout for: jdk/internal/vm/Continuation/BasicExt.java#COMP_WINDOW_LENGTH_{1-3}-GC_AFTER_YIELD If there are no mayor objections, I will update the copyrights before I leave work today. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26749#issuecomment-3195923727 From dfuchs at openjdk.org Mon Aug 18 11:38:14 2025 From: dfuchs at openjdk.org (Daniel Fuchs) Date: Mon, 18 Aug 2025 11:38:14 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: Message-ID: <-1NjyGdZla4kxc5tKPvakW_aqwjNcNXt4ibAf3WndRU=.21ac795a-b7ee-44ac-a155-70e1186c8148@github.com> On Fri, 15 Aug 2025 11:43:33 GMT, Leo Korinth wrote: >> This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) >> >> In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). >> >> My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. >> >> These fixes have been created when I have ploughed through test cases: >> JDK-8352719: Add an equals sign to the modules statement >> JDK-8352709: Remove bad timing annotations from WhileOpTest.java >> JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test >> CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE >> CODETOOLS-7903961: Make default timeout configurable >> >> After the review, I will update the copyrights. >> >> I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. >> >> I got 4 timing related faults: >> 1) runtime/Thread/TestThreadDumpMonitorContention.java >> This is probably: https://bugs.openjdk.org/browse/JDK-8361370 >> 2) sun/tools/jhsdb/BasicLauncherTest.java >> I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. >> 3) gc/stress/TestReclaimStringsLeaksMemory.java >> I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. >> 4) sun/security/ssl/X509KeyManager/CertChecking.java >> This is a new test that I got on last rebase. I have added a timeout of 480 to it. >> >> In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. >> >> From the review of the cancelled "8356171: ... > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > added extra timeout for: jdk/internal/vm/Continuation/BasicExt.java#COMP_WINDOW_LENGTH_{1-3}-GC_AFTER_YIELD Hi Leo, I played a bit with your changes and I observed intermittent timeout failures for the following tests: java/net/httpclient/CancelledResponse.java java/net/httpclient/whitebox/FlowTestDriver.java The first test failing more frequently. Could you please add /timeout=480 to these two tests as well? ------------- PR Comment: https://git.openjdk.org/jdk/pull/26749#issuecomment-3196281299 From rriggs at openjdk.org Mon Aug 18 13:15:11 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Mon, 18 Aug 2025 13:15:11 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 11:43:33 GMT, Leo Korinth wrote: >> This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) >> >> In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). >> >> My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. >> >> These fixes have been created when I have ploughed through test cases: >> JDK-8352719: Add an equals sign to the modules statement >> JDK-8352709: Remove bad timing annotations from WhileOpTest.java >> JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test >> CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE >> CODETOOLS-7903961: Make default timeout configurable >> >> After the review, I will update the copyrights. >> >> I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. >> >> I got 4 timing related faults: >> 1) runtime/Thread/TestThreadDumpMonitorContention.java >> This is probably: https://bugs.openjdk.org/browse/JDK-8361370 >> 2) sun/tools/jhsdb/BasicLauncherTest.java >> I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. >> 3) gc/stress/TestReclaimStringsLeaksMemory.java >> I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. >> 4) sun/security/ssl/X509KeyManager/CertChecking.java >> This is a new test that I got on last rebase. I have added a timeout of 480 to it. >> >> In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. >> >> From the review of the cancelled "8356171: ... > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > added extra timeout for: jdk/internal/vm/Continuation/BasicExt.java#COMP_WINDOW_LENGTH_{1-3}-GC_AFTER_YIELD Generally, changes with this many changed files are broken down into smaller PRs to make the review easier and more conclusive. In this case, hotspot, jdk, and langtools might have been good groupings. The reviews could be done in parallel and committed with the final change to jtreg when they are all approved. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26749#issuecomment-3196793327 From lkorinth at openjdk.org Mon Aug 18 14:34:12 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 18 Aug 2025 14:34:12 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: Message-ID: On Mon, 18 Aug 2025 13:12:41 GMT, Roger Riggs wrote: > Generally, changes with this many changed files are broken down into smaller PRs to make the review easier and more conclusive. In this case, hotspot, jdk, and langtools might have been good groupings. The reviews could be done in parallel and committed with the final change to jtreg when they are all approved. Noted. I did it so reviewers could se the change "as a whole". Feel free to review a part of the change! ------------- PR Comment: https://git.openjdk.org/jdk/pull/26749#issuecomment-3197186029 From lmesnik at openjdk.org Mon Aug 18 15:01:12 2025 From: lmesnik at openjdk.org (Leonid Mesnik) Date: Mon, 18 Aug 2025 15:01:12 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: Message-ID: On Fri, 15 Aug 2025 11:43:33 GMT, Leo Korinth wrote: >> This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) >> >> In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). >> >> My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. >> >> These fixes have been created when I have ploughed through test cases: >> JDK-8352719: Add an equals sign to the modules statement >> JDK-8352709: Remove bad timing annotations from WhileOpTest.java >> JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test >> CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE >> CODETOOLS-7903961: Make default timeout configurable >> >> After the review, I will update the copyrights. >> >> I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. >> >> I got 4 timing related faults: >> 1) runtime/Thread/TestThreadDumpMonitorContention.java >> This is probably: https://bugs.openjdk.org/browse/JDK-8361370 >> 2) sun/tools/jhsdb/BasicLauncherTest.java >> I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. >> 3) gc/stress/TestReclaimStringsLeaksMemory.java >> I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. >> 4) sun/security/ssl/X509KeyManager/CertChecking.java >> This is a new test that I got on last rebase. I have added a timeout of 480 to it. >> >> In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. >> >> From the review of the cancelled "8356171: ... > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > added extra timeout for: jdk/internal/vm/Continuation/BasicExt.java#COMP_WINDOW_LENGTH_{1-3}-GC_AFTER_YIELD Thank you for fixing this! I think the changes are good. ------------- Marked as reviewed by lmesnik (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26749#pullrequestreview-3128749995 From bpb at openjdk.org Mon Aug 18 16:08:13 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Mon, 18 Aug 2025 16:08:13 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v8] In-Reply-To: References: <2vHKLbSpprQMq6c-P7rngt2xhd1H7vbB4oeHB7Nl5tM=.e834525d-0723-4234-9904-4f899d2efa79@github.com> Message-ID: <-NhcAIuO62gb0PvliVwQNMtHsgsHLcQplbBRf8SpxR0=.c722ee76-69c7-4fd9-8dbe-8231e5411e63@github.com> On Sat, 16 Aug 2025 07:29:20 GMT, Alan Bateman wrote: > or better, just return the file key of last accessible link in the chain, something like this, and then just check if they are equal Thanks for the suggestion, will investigate. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2282832314 From bpb at openjdk.org Mon Aug 18 16:12:13 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Mon, 18 Aug 2025 16:12:13 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v8] In-Reply-To: <2vHKLbSpprQMq6c-P7rngt2xhd1H7vbB4oeHB7Nl5tM=.e834525d-0723-4234-9904-4f899d2efa79@github.com> References: <2vHKLbSpprQMq6c-P7rngt2xhd1H7vbB4oeHB7Nl5tM=.e834525d-0723-4234-9904-4f899d2efa79@github.com> Message-ID: On Fri, 15 Aug 2025 20:43:41 GMT, Brian Burkhalter wrote: >> This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8154364: Put changes to Misc.java in platform-specific blocks test/jdk/java/nio/file/Files/Misc.java line 118: > 116: * Test: Neither file exists > 117: */ > 118: if (Platform.isWindows()) { On second thought, I don't think the sections beginning here, at line 118, and below, at line 139, should differ between Unix and Windows. I think it would be better to change the Windows implementation in the context of this request to return false instead of throwing `IOException`, and investigate any more complicated link checking when addressing https://bugs.openjdk.org/browse/JDK-8365626. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2282840096 From lkorinth at openjdk.org Mon Aug 18 16:34:21 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 18 Aug 2025 16:34:21 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v4] In-Reply-To: References: Message-ID: <0EoWHaPUvqZvxYNRoBbcFdHS9QVXCnfHQqPyd4srQlc=.cfd617e9-5be4-4c14-bf71-68a73d86836b@github.com> > This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) > > In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). > > My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. > > These fixes have been created when I have ploughed through test cases: > JDK-8352719: Add an equals sign to the modules statement > JDK-8352709: Remove bad timing annotations from WhileOpTest.java > JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test > CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE > CODETOOLS-7903961: Make default timeout configurable > > After the review, I will update the copyrights. > > I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. > > I got 4 timing related faults: > 1) runtime/Thread/TestThreadDumpMonitorContention.java > This is probably: https://bugs.openjdk.org/browse/JDK-8361370 > 2) sun/tools/jhsdb/BasicLauncherTest.java > I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. > 3) gc/stress/TestReclaimStringsLeaksMemory.java > I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. > 4) sun/security/ssl/X509KeyManager/CertChecking.java > This is a new test that I got on last rebase. I have added a timeout of 480 to it. > > In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. > > From the review of the cancelled "8356171: Increase timeout for test cases as preparation for change of... Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: after suggestion from Daniel ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26749/files - new: https://git.openjdk.org/jdk/pull/26749/files/8fa40e7d..286a2cc6 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26749&range=03 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26749&range=02-03 Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.org/jdk/pull/26749.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26749/head:pull/26749 PR: https://git.openjdk.org/jdk/pull/26749 From lkorinth at openjdk.org Mon Aug 18 16:34:22 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Mon, 18 Aug 2025 16:34:22 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: <-1NjyGdZla4kxc5tKPvakW_aqwjNcNXt4ibAf3WndRU=.21ac795a-b7ee-44ac-a155-70e1186c8148@github.com> References: <-1NjyGdZla4kxc5tKPvakW_aqwjNcNXt4ibAf3WndRU=.21ac795a-b7ee-44ac-a155-70e1186c8148@github.com> Message-ID: On Mon, 18 Aug 2025 11:34:39 GMT, Daniel Fuchs wrote: > Hi Leo, I played a bit with your changes and I observed intermittent timeout failures for the following tests: > > ``` > java/net/httpclient/CancelledResponse.java > java/net/httpclient/whitebox/FlowTestDriver.java > ``` > > The first test failing more frequently. Could you please add /timeout=480 to these two tests as well? Fixed! Thanks for helping! ------------- PR Comment: https://git.openjdk.org/jdk/pull/26749#issuecomment-3197614389 From dfuchs at openjdk.org Mon Aug 18 16:46:13 2025 From: dfuchs at openjdk.org (Daniel Fuchs) Date: Mon, 18 Aug 2025 16:46:13 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v4] In-Reply-To: <0EoWHaPUvqZvxYNRoBbcFdHS9QVXCnfHQqPyd4srQlc=.cfd617e9-5be4-4c14-bf71-68a73d86836b@github.com> References: <0EoWHaPUvqZvxYNRoBbcFdHS9QVXCnfHQqPyd4srQlc=.cfd617e9-5be4-4c14-bf71-68a73d86836b@github.com> Message-ID: On Mon, 18 Aug 2025 16:34:21 GMT, Leo Korinth wrote: >> This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) >> >> In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). >> >> My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. >> >> These fixes have been created when I have ploughed through test cases: >> JDK-8352719: Add an equals sign to the modules statement >> JDK-8352709: Remove bad timing annotations from WhileOpTest.java >> JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test >> CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE >> CODETOOLS-7903961: Make default timeout configurable >> >> After the review, I will update the copyrights. >> >> I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. >> >> I got 4 timing related faults: >> 1) runtime/Thread/TestThreadDumpMonitorContention.java >> This is probably: https://bugs.openjdk.org/browse/JDK-8361370 >> 2) sun/tools/jhsdb/BasicLauncherTest.java >> I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. >> 3) gc/stress/TestReclaimStringsLeaksMemory.java >> I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. >> 4) sun/security/ssl/X509KeyManager/CertChecking.java >> This is a new test that I got on last rebase. I have added a timeout of 480 to it. >> >> In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. >> >> From the review of the cancelled "8356171: ... > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > after suggestion from Daniel Thanks! Changes to JNDI / net / httpclient LGTM. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26749#issuecomment-3197675337 From bpb at openjdk.org Mon Aug 18 21:52:31 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Mon, 18 Aug 2025 21:52:31 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v9] In-Reply-To: References: Message-ID: > This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8154364: Improve Unix link handling; return false instead of throwing IOException on Windows ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26736/files - new: https://git.openjdk.org/jdk/pull/26736/files/8b85dfd7..b2bd8f2f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=08 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=07-08 Stats: 88 lines in 3 files changed: 16 ins; 43 del; 29 mod Patch: https://git.openjdk.org/jdk/pull/26736.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26736/head:pull/26736 PR: https://git.openjdk.org/jdk/pull/26736 From bpb at openjdk.org Mon Aug 18 21:52:32 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Mon, 18 Aug 2025 21:52:32 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v8] In-Reply-To: <-NhcAIuO62gb0PvliVwQNMtHsgsHLcQplbBRf8SpxR0=.c722ee76-69c7-4fd9-8dbe-8231e5411e63@github.com> References: <2vHKLbSpprQMq6c-P7rngt2xhd1H7vbB4oeHB7Nl5tM=.e834525d-0723-4234-9904-4f899d2efa79@github.com> <-NhcAIuO62gb0PvliVwQNMtHsgsHLcQplbBRf8SpxR0=.c722ee76-69c7-4fd9-8dbe-8231e5411e63@github.com> Message-ID: On Mon, 18 Aug 2025 16:05:18 GMT, Brian Burkhalter wrote: >> src/java.base/unix/classes/sun/nio/fs/UnixFileSystemProvider.java line 379: >> >>> 377: } >>> 378: return keys; >>> 379: } >> >> I'm a bit puzzled as to why it looks at each element in the path. It should be possible to just enumerate the files of the sym links that exist, something like this >> >> var fileKeys = new HashSet(); >> while (path != null) { >> UnixFileAttributes attrs = UnixFileAttributes.getIfExists(path, false); >> if (attrs != null && attrs.isSymbolicLink()) { >> fileKeys.add(attrs.fileKey()); >> path = (UnixPath) readSymbolicLink(path); >> } else { >> path = null; >> } >> } >> >> >> or better, just return the file key of last accessible link in the chain, something like this, and then just check if they are equal, e.g. >> >> >> private UnixFileKey lastFileKey(UnixPath path) throws UnixException { >> var fileKeys = new HashSet(); >> UnixFileKey lastFileKey = null; >> while (path != null) { >> UnixFileAttributes attrs = UnixFileAttributes.getIfExists(path, false); >> if (attrs == null) { >> break; >> } >> UnixFileKey fileKey = attrs.fileKey(); >> if (!attrs.isSymbolicLink()) { >> return fileKey; >> } >> if (!fileKeys.add(fileKey)) { >> throw new UnixException(ELOOP); >> } >> byte[] target = readlink(path); >> path = new UnixPath(theFileSystem, target); >> } >> return lastFileKey; >> } > >> or better, just return the file key of last accessible link in the chain, something like this, and then just check if they are equal > > Thanks for the suggestion, will investigate. So updated in b2bd8f2. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2283567109 From bpb at openjdk.org Mon Aug 18 21:52:34 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Mon, 18 Aug 2025 21:52:34 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v8] In-Reply-To: References: <2vHKLbSpprQMq6c-P7rngt2xhd1H7vbB4oeHB7Nl5tM=.e834525d-0723-4234-9904-4f899d2efa79@github.com> Message-ID: On Mon, 18 Aug 2025 16:09:09 GMT, Brian Burkhalter wrote: >> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: >> >> 8154364: Put changes to Misc.java in platform-specific blocks > > test/jdk/java/nio/file/Files/Misc.java line 118: > >> 116: * Test: Neither file exists >> 117: */ >> 118: if (Platform.isWindows()) { > > On second thought, I don't think the sections beginning here, at line 118, and below, at line 139, should differ between Unix and Windows. I think it would be better to change the Windows implementation in the context of this request to return false instead of throwing `IOException`, and investigate any more complicated link checking when addressing https://bugs.openjdk.org/browse/JDK-8365626. b2bd8f2 updates the Windows implementation to return `false` instead of throwing an `IOException` in the event either file does not exist. The `Misc` test is updated accordingly, thereby eliminating two platform-specific blocks. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2283570390 From bpb at openjdk.org Mon Aug 18 21:56:37 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Mon, 18 Aug 2025 21:56:37 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v8] In-Reply-To: References: <2vHKLbSpprQMq6c-P7rngt2xhd1H7vbB4oeHB7Nl5tM=.e834525d-0723-4234-9904-4f899d2efa79@github.com> Message-ID: On Sat, 16 Aug 2025 07:04:40 GMT, Alan Bateman wrote: > It would be nice if getIfExists(path) could be implemented as getIfExists(path, true) When I added `getIfExists(UnixPath,boolean)`, I noticed that there was already a degree of inconsistency in that some functions that have native counterparts returning an `int` either also return an `int` or are declared `void`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2283577186 From syan at openjdk.org Tue Aug 19 03:34:47 2025 From: syan at openjdk.org (SendaoYan) Date: Tue, 19 Aug 2025 03:34:47 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: Message-ID: On Mon, 18 Aug 2025 09:15:29 GMT, Leo Korinth wrote: >> It is unclear to me if the author meant this to be `2.5` more than normal or `10` more than JTREG default, or a `multiplier that seems to work`. It does not bother me _more_ if it is a `10` then a `2.5`, as it needs to have a value that is not the multiplicative identity value. I will not change this, the change I have made is already large enough and I want this to be integrated ASAP. > > It is also something that can be changed later, in a follow up fix. Take test test/hotspot/jtreg/compiler/arraycopy/stress/TestStressArrayCopy.java as example. If there is a bug in jvm with -Xcomp option which will cause this test run time outed. Before this PR, it will take `7200*10` seconds to run this test finish and report time outed failure. But after this PR, it will take `28800*10` seconds to run this test finish ang then report timed out failure. I think the `28800*10` senonds too long and it's unacceptable. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2283972732 From dholmes at openjdk.org Tue Aug 19 05:25:40 2025 From: dholmes at openjdk.org (David Holmes) Date: Tue, 19 Aug 2025 05:25:40 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: Message-ID: On Tue, 19 Aug 2025 03:31:55 GMT, SendaoYan wrote: >> It is also something that can be changed later, in a follow up fix. > > Take test test/hotspot/jtreg/compiler/arraycopy/stress/TestStressArrayCopy.java as example. > If there is a bug in jvm with -Xcomp option which will cause this test run time outed. Before this PR, it will take `7200*10` seconds to run this test finish and report time outed failure. But after this PR, it will take `28800*10` seconds to run this test finish ang then report timed out failure. I think the `28800*10` senonds is too long and it's unacceptable. > It is unclear to me if the author meant this to be 2.5 more than normal or 10 more than JTREG default, or a multiplier that seems to work. What matters is that the actual timeout, in seconds, remains unchanged, so please address this. Timeouts that are excessively long waste machine resources. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2284090715 From dholmes at openjdk.org Tue Aug 19 05:49:44 2025 From: dholmes at openjdk.org (David Holmes) Date: Tue, 19 Aug 2025 05:49:44 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v4] In-Reply-To: <0EoWHaPUvqZvxYNRoBbcFdHS9QVXCnfHQqPyd4srQlc=.cfd617e9-5be4-4c14-bf71-68a73d86836b@github.com> References: <0EoWHaPUvqZvxYNRoBbcFdHS9QVXCnfHQqPyd4srQlc=.cfd617e9-5be4-4c14-bf71-68a73d86836b@github.com> Message-ID: On Mon, 18 Aug 2025 16:34:21 GMT, Leo Korinth wrote: >> This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) >> >> In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). >> >> My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. >> >> These fixes have been created when I have ploughed through test cases: >> JDK-8352719: Add an equals sign to the modules statement >> JDK-8352709: Remove bad timing annotations from WhileOpTest.java >> JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test >> CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE >> CODETOOLS-7903961: Make default timeout configurable >> >> After the review, I will update the copyrights. >> >> I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. >> >> I got 4 timing related faults: >> 1) runtime/Thread/TestThreadDumpMonitorContention.java >> This is probably: https://bugs.openjdk.org/browse/JDK-8361370 >> 2) sun/tools/jhsdb/BasicLauncherTest.java >> I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. >> 3) gc/stress/TestReclaimStringsLeaksMemory.java >> I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. >> 4) sun/security/ssl/X509KeyManager/CertChecking.java >> This is a new test that I got on last rebase. I have added a timeout of 480 to it. >> >> In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. >> >> From the review of the cancelled "8356171: ... > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > after suggestion from Daniel By rough count there are 1300 tests that have an explicit timeout set. This change would reduce the actual applied timeout to a quarter of what was previously used, yet you have only had to bump the timeout value for a fraction of the tests - which I find somewhat (pleasantly) surprising. It may be that many of these timeouts stem from a time when we had much much slower machines, so a refresh might not be a bad thing. It will take some time to see the full effects of this change though. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26749#issuecomment-3199288818 From dholmes at openjdk.org Tue Aug 19 06:07:44 2025 From: dholmes at openjdk.org (David Holmes) Date: Tue, 19 Aug 2025 06:07:44 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: Message-ID: On Tue, 19 Aug 2025 05:23:15 GMT, David Holmes wrote: >> Take test test/hotspot/jtreg/compiler/arraycopy/stress/TestStressArrayCopy.java as example. >> If there is a bug in jvm with -Xcomp option which will cause this test run time outed. Before this PR, it will take `7200*10` seconds to run this test finish and report time outed failure. But after this PR, it will take `28800*10` seconds to run this test finish ang then report timed out failure. I think the `28800*10` senonds is too long and it's unacceptable. > > DELETED - I confused the timeout with the timeout-factor. New comment below. No change should be made to any explicit setting of the timeoutFactor in general as that could cause mass timeouts to occur (old default timeout = 120 * 10 = 1200 but new default = 120 * 2.5 = 300!). However I see the concern of @sendaoYan because individual tests may now get much larger timeout values when run with the non-default timeoutFactor because they have been adjusted for the new default. I don't see any solution to this dilemma. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2284161138 From syan at openjdk.org Tue Aug 19 06:40:45 2025 From: syan at openjdk.org (SendaoYan) Date: Tue, 19 Aug 2025 06:40:45 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: Message-ID: <5YehMZKBa60PIk9Ia2sC4kLuFx5ZvfmtoYT_H-LuQbM=.e40c421f-d2af-46e5-8dc7-5b30fe79c0b0@github.com> On Tue, 19 Aug 2025 06:04:49 GMT, David Holmes wrote: >> DELETED - I confused the timeout with the timeout-factor. New comment below. > > No change should be made to any explicit setting of the timeoutFactor in general as that could cause mass timeouts to occur (old default timeout = 120 * 10 = 1200 but new default = 120 * 2.5 = 300!). > > However I see the concern of @sendaoYan because individual tests may now get much larger timeout values when run with the non-default timeoutFactor because they have been adjusted for the new default. I don't see any solution to this dilemma. But what this PR do is change the timeoutFactor in general and find out all the tests which may timeout after the timeoutFactor has been changed. The old default timeout before this PR is 120 * 4, after this PR the new default is 120 * 1 ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2284273170 From lkorinth at openjdk.org Tue Aug 19 09:02:36 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Tue, 19 Aug 2025 09:02:36 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v4] In-Reply-To: References: <0EoWHaPUvqZvxYNRoBbcFdHS9QVXCnfHQqPyd4srQlc=.cfd617e9-5be4-4c14-bf71-68a73d86836b@github.com> Message-ID: On Tue, 19 Aug 2025 05:47:06 GMT, David Holmes wrote: > By rough count there are 1300 tests that have an explicit timeout set. This change would reduce the actual applied timeout to a quarter of what was previously used, yet you have only had to bump the timeout value for a fraction of the tests - which I find somewhat (pleasantly) surprising. It may be that many of these timeouts stem from a time when we had much much slower machines, so a refresh might not be a bad thing. It will take some time to see the full effects of this change though. Thanks David! And as you said, a few more adjustments will probably be needed when we have run this for a while. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26749#issuecomment-3199869795 From lkorinth at openjdk.org Tue Aug 19 09:19:45 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Tue, 19 Aug 2025 09:19:45 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: <5YehMZKBa60PIk9Ia2sC4kLuFx5ZvfmtoYT_H-LuQbM=.e40c421f-d2af-46e5-8dc7-5b30fe79c0b0@github.com> References: <5YehMZKBa60PIk9Ia2sC4kLuFx5ZvfmtoYT_H-LuQbM=.e40c421f-d2af-46e5-8dc7-5b30fe79c0b0@github.com> Message-ID: On Tue, 19 Aug 2025 06:38:01 GMT, SendaoYan wrote: >> No change should be made to any explicit setting of the timeoutFactor in general as that could cause mass timeouts to occur (old default timeout = 120 * 10 = 1200 but new default = 120 * 2.5 = 300!). >> >> However I see the concern of @sendaoYan because individual tests may now get much larger timeout values when run with the non-default timeoutFactor because they have been adjusted for the new default. I don't see any solution to this dilemma. > > But what this PR do is change the timeoutFactor in general and find out all the tests which may timeout after the timeoutFactor has been changed. > > The old default timeout before this PR is 120 * 4, after this PR the new default is 120 * 1 I do not think 4x longer timeouts for `-Xcomp` is unreasonable. I also do not want to make this huge change even bigger. If you would like to change it after the integration I think that would be valuable --- though my guess is that it could be quite a lot of work. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2284650722 From alanb at openjdk.org Tue Aug 19 10:31:39 2025 From: alanb at openjdk.org (Alan Bateman) Date: Tue, 19 Aug 2025 10:31:39 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v9] In-Reply-To: References: Message-ID: On Mon, 18 Aug 2025 21:52:31 GMT, Brian Burkhalter wrote: >> This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8154364: Improve Unix link handling; return false instead of throwing IOException on Windows src/java.base/unix/classes/sun/nio/fs/UnixFileAttributes.java line 117: > 115: } > 116: > 117: return attrs; We can create a follow-up issue to replace this with a version that doesn't use exceptions for control flow, like the 1-arg getIfExists. Then we can change the 1-arg method to use the 2-arg method. src/java.base/unix/classes/sun/nio/fs/UnixFileSystemProvider.java line 393: > 391: attrs2 = UnixFileAttributes.getIfExists(file2); > 392: } catch (UnixException x) { > 393: x.rethrowAsIOException(file1, file2); I think it would be better to handle them separately as that will give a better exception if either fails. With the 2-arg rethrowAsIOException is mostly for move/copy ops. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2284822976 PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2284826790 From alanb at openjdk.org Tue Aug 19 10:45:40 2025 From: alanb at openjdk.org (Alan Bateman) Date: Tue, 19 Aug 2025 10:45:40 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v3] In-Reply-To: References: Message-ID: On Thu, 14 Aug 2025 16:16:17 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: >> >> 8154364: Propagate change of previous commit to Windows > > src/java.base/unix/classes/sun/nio/fs/UnixFileSystemProvider.java line 430: > >> 428: // neither exist and comparison of normalized paths is problematic, >> 429: // so return false >> 430: return false; > > I think you can drop "comparison of normalized paths is problematic" as it begs too many questions for anyone looking at this code. If lastKey is changed to throw when a last file key cannot be obtained then it would simplify the file access in isSameFile to: UnixFileKey key1; try { UnixFileAttributes attrs = UnixFileAttributes.getIfExists(file1); key1 = (attrs != null) ? attrs.fileKey() : lastFileKey(file1); } catch (UnixException e) { e.rethrowAsIOException(file1); return false; } UnixFileKey key2; try { UnixFileAttributes attrs = UnixFileAttributes.getIfExists(file2); key2 = (attrs != null) ? attrs.fileKey() : lastFileKey(file2); } catch (UnixException e) { e.rethrowAsIOException(file2); return false; } return key1.equals(key2); ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2284856554 From dclarke at openjdk.org Tue Aug 19 13:18:49 2025 From: dclarke at openjdk.org (Darragh Clarke) Date: Tue, 19 Aug 2025 13:18:49 GMT Subject: RFR: 8360025: (se) Convert kqueue Selector Implementation to use FFM APIs [v2] In-Reply-To: References: Message-ID: > This PR aims to Panamize the Java Kqueue implementation, This is based on the work that was previously shared in https://github.com/openjdk/jdk/pull/22307 , The main change since then is that this branch takes advantage of the changes made in https://github.com/openjdk/jdk/pull/25043 to allow for better performance during errno handling. > > These changes feature a lot of Jextract generated files, though alterations have been made in relation to Errno handling and performance improvements. > > I will update this description soon to include performance metrics on a few microbenchmarks, though currently it's roughly 2% to 3% slower with the changes, which is somewhat expected, though there are still a few ideas of possible performance improvements that could be tried. Any suggestions or comments in that area are more than welcome however. Darragh Clarke has updated the pull request incrementally with one additional commit since the last revision: implementing feedback, adding missing errno checks, cleanup ------------- Changes: - all: https://git.openjdk.org/jdk/pull/25546/files - new: https://git.openjdk.org/jdk/pull/25546/files/4878d558..e2207883 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=25546&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25546&range=00-01 Stats: 322 lines in 8 files changed: 168 ins; 135 del; 19 mod Patch: https://git.openjdk.org/jdk/pull/25546.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/25546/head:pull/25546 PR: https://git.openjdk.org/jdk/pull/25546 From dclarke at openjdk.org Tue Aug 19 13:22:40 2025 From: dclarke at openjdk.org (Darragh Clarke) Date: Tue, 19 Aug 2025 13:22:40 GMT Subject: RFR: 8360025: (se) Convert kqueue Selector Implementation to use FFM APIs [v2] In-Reply-To: References: Message-ID: On Tue, 19 Aug 2025 13:18:49 GMT, Darragh Clarke wrote: >> This PR aims to Panamize the Java Kqueue implementation, This is based on the work that was previously shared in https://github.com/openjdk/jdk/pull/22307 , The main change since then is that this branch takes advantage of the changes made in https://github.com/openjdk/jdk/pull/25043 to allow for better performance during errno handling. >> >> These changes feature a lot of Jextract generated files, though alterations have been made in relation to Errno handling and performance improvements. >> >> I will update this description soon to include performance metrics on a few microbenchmarks, though currently it's roughly 2% to 3% slower with the changes, which is somewhat expected, though there are still a few ideas of possible performance improvements that could be tried. Any suggestions or comments in that area are more than welcome however. > > Darragh Clarke has updated the pull request incrementally with one additional commit since the last revision: > > implementing feedback, adding missing errno checks, cleanup I made a few changes mostly based on comments but I'll give a little patch notes: - I'd missed some errno checks for kqueue - Moved the FFMUtils class from shared to just be in `maxosx`, I also changed how this gets the valueLayouts for C values to match how newer versions of jextract generate this - I changed how the util method that converts errno codes to their respective error strings I ran this against the selector tests on all OSs and everything seems green after repeated tests ------------- PR Comment: https://git.openjdk.org/jdk/pull/25546#issuecomment-3200745633 From rriggs at openjdk.org Tue Aug 19 15:01:40 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 19 Aug 2025 15:01:40 GMT Subject: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v4] In-Reply-To: References: Message-ID: <46MfOJA8bICEbZ7EpwzTealkJKqvsxREIKZhsyA-LRE=.295d951f-1eb7-4ad7-9e6a-3f2810c581ce@github.com> On Tue, 12 Aug 2025 19:29:28 GMT, Volkan Yazici wrote: >> `NoRepl`-suffixed `String` methods denote methods that do not replace invalid characters, but throw `CharacterCodingException` on encounter. This behavior cannot easily be derived from the method footprints, has been a source of confusion for maintainers, and is not uniformly adopted, e.g., `newStringUTF8NoRepl()` and `getBytesUTF8NoRepl()` does *not* throw `CCE`. This PR removes `NoRepl` suffix from method names and consistently uses `throws CCE` in method footprints. (b4845109e18 passes `tier1,2`.) > > Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision: > > Remove redundant type parameters It seems that the API is overloaded trying to satisfy too many requirements, replace/noreplace, throw/nothrow and supporting arbitrary Charsets. There are multiple callers that only need to create a string from byte array holding latin1. They are burdened with catching and ignoring exceptions that do not occur. I'm suggesting breaking out that use case in PR#https://github.com/openjdk/jdk/pull/26831. That leaves `Files.readString` that needs the full CharSet/noReplace/throw behavior. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26413#issuecomment-3201113471 From bpb at openjdk.org Tue Aug 19 15:35:42 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 19 Aug 2025 15:35:42 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v3] In-Reply-To: References: Message-ID: On Tue, 19 Aug 2025 10:43:13 GMT, Alan Bateman wrote: > If lastKey is changed to throw when a last file key cannot be obtained This would cause an exception to be thrown instead of returning false. Do we want to do that? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2285637677 From bpb at openjdk.org Tue Aug 19 15:51:37 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 19 Aug 2025 15:51:37 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v9] In-Reply-To: References: Message-ID: <5zuEfV-uPzAwzHRScWeliD0plqbo6JG9pxA0_Ot6ixw=.19e9e1bd-f479-4e6a-bf53-71144e157cb9@github.com> On Tue, 19 Aug 2025 10:27:27 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: >> >> 8154364: Improve Unix link handling; return false instead of throwing IOException on Windows > > src/java.base/unix/classes/sun/nio/fs/UnixFileAttributes.java line 117: > >> 115: } >> 116: >> 117: return attrs; > > We can create a follow-up issue to replace this with a version that doesn't use exceptions for control flow, like the 1-arg getIfExists. Then we can change the 1-arg method to use the 2-arg method. Please see [JDK-8365807](https://bugs.openjdk.org/browse/JDK-8365807). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2285678270 From rriggs at openjdk.org Tue Aug 19 16:48:43 2025 From: rriggs at openjdk.org (Roger Riggs) Date: Tue, 19 Aug 2025 16:48:43 GMT Subject: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v4] In-Reply-To: References: Message-ID: On Tue, 12 Aug 2025 19:29:28 GMT, Volkan Yazici wrote: >> `NoRepl`-suffixed `String` methods denote methods that do not replace invalid characters, but throw `CharacterCodingException` on encounter. This behavior cannot easily be derived from the method footprints, has been a source of confusion for maintainers, and is not uniformly adopted, e.g., `newStringUTF8NoRepl()` and `getBytesUTF8NoRepl()` does *not* throw `CCE`. This PR removes `NoRepl` suffix from method names and consistently uses `throws CCE` in method footprints. (b4845109e18 passes `tier1,2`.) > > Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision: > > Remove redundant type parameters src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 361: > 359: * @throws CharacterCodingException For malformed input or unmappable characters > 360: */ > 361: String newStringUTF8NoReplacement(byte[] bytes, int offset, int length) throws CharacterCodingException; This method is only used by ZipCoder and could be refactored to use `uncheckedNewStringNoReplacement` as in PR#https://github.com/openjdk/jdk/pull/26822. It is a refactoring cleanup not directly related to renaming the NoRepl methods. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2285806922 From duke at openjdk.org Tue Aug 19 17:25:44 2025 From: duke at openjdk.org (ExE Boss) Date: Tue, 19 Aug 2025 17:25:44 GMT Subject: RFR: 8360025: (se) Convert kqueue Selector Implementation to use FFM APIs [v2] In-Reply-To: References: Message-ID: On Tue, 19 Aug 2025 13:18:49 GMT, Darragh Clarke wrote: >> This PR aims to Panamize the Java Kqueue implementation, This is based on the work that was previously shared in https://github.com/openjdk/jdk/pull/22307 , The main change since then is that this branch takes advantage of the changes made in https://github.com/openjdk/jdk/pull/25043 to allow for better performance during errno handling. >> >> These changes feature a lot of Jextract generated files, though alterations have been made in relation to Errno handling and performance improvements. >> >> I will update this description soon to include performance metrics on a few microbenchmarks, though currently it's roughly 2% to 3% slower with the changes, which is somewhat expected, though there are still a few ideas of possible performance improvements that could be tried. Any suggestions or comments in that area are more than welcome however. > > Darragh Clarke has updated the pull request incrementally with one additional commit since the last revision: > > implementing feedback, adding missing errno checks, cleanup src/java.base/macosx/classes/sun/nio/ch/KQueuePoller.java line 50: > 48: "kqueue failed"); > 49: } > 50: this.kqfd = res; Maybe?this duplicated?check should?probably be?moved?into a?common?method in?`KQueue`, like?the?old `KQueue.create()`?method, but?implemented in?**Java**: static int create() throws IOException { int res = kqueue_h.kqueue(); if (res < 0) { throw ErrnoUtils.IOExceptionWithErrnoString(-res, "kqueue failed"); } return res; } ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25546#discussion_r2285879853 From bpb at openjdk.org Tue Aug 19 18:15:02 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 19 Aug 2025 18:15:02 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v10] In-Reply-To: References: Message-ID: > This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: 8154364: Suggested change for key comparison ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26736/files - new: https://git.openjdk.org/jdk/pull/26736/files/b2bd8f2f..78f272bb Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=09 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26736&range=08-09 Stats: 21 lines in 1 file changed: 0 ins; 5 del; 16 mod Patch: https://git.openjdk.org/jdk/pull/26736.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26736/head:pull/26736 PR: https://git.openjdk.org/jdk/pull/26736 From bpb at openjdk.org Tue Aug 19 19:49:42 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Tue, 19 Aug 2025 19:49:42 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v9] In-Reply-To: References: Message-ID: <4jCjm-Si0lgRpx0tiHCtcU0Ny54kgmhBaasgrR1xw5M=.63675b87-fb8d-4431-b131-e4e78745d189@github.com> On Tue, 19 Aug 2025 10:29:08 GMT, Alan Bateman wrote: >> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: >> >> 8154364: Improve Unix link handling; return false instead of throwing IOException on Windows > > src/java.base/unix/classes/sun/nio/fs/UnixFileSystemProvider.java line 393: > >> 391: attrs2 = UnixFileAttributes.getIfExists(file2); >> 392: } catch (UnixException x) { >> 393: x.rethrowAsIOException(file1, file2); > > I think it would be better to handle them separately as that will give a better exception if either fails. With the 2-arg rethrowAsIOException is mostly for move/copy ops. Please see 78f272b. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26736#discussion_r2286179625 From dholmes at openjdk.org Wed Aug 20 12:55:43 2025 From: dholmes at openjdk.org (David Holmes) Date: Wed, 20 Aug 2025 12:55:43 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: <5YehMZKBa60PIk9Ia2sC4kLuFx5ZvfmtoYT_H-LuQbM=.e40c421f-d2af-46e5-8dc7-5b30fe79c0b0@github.com> References: <5YehMZKBa60PIk9Ia2sC4kLuFx5ZvfmtoYT_H-LuQbM=.e40c421f-d2af-46e5-8dc7-5b30fe79c0b0@github.com> Message-ID: On Tue, 19 Aug 2025 06:38:01 GMT, SendaoYan wrote: >> No change should be made to any explicit setting of the timeoutFactor in general as that could cause mass timeouts to occur (old default timeout = 120 * 10 = 1200 but new default = 120 * 2.5 = 300!). >> >> However I see the concern of @sendaoYan because individual tests may now get much larger timeout values when run with the non-default timeoutFactor because they have been adjusted for the new default. I don't see any solution to this dilemma. > > But what this PR do is change the timeoutFactor in general and find out all the tests which may timeout after the timeoutFactor has been changed. > > The old default timeout before this PR is 120 * 4, after this PR the new default is 120 * 1 @sendaoYan this PR changes the default timeoutFactor and so also has to change quite a number of implicit and explicit timeouts. But that doesn't mean that test configs that already set their own timeoutFactor should adjust by the same factor! That just doesn't work for any test with an implicit default timeout. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2288072431 From alanb at openjdk.org Wed Aug 20 13:11:42 2025 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 20 Aug 2025 13:11:42 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v10] In-Reply-To: References: Message-ID: On Tue, 19 Aug 2025 18:15:02 GMT, Brian Burkhalter wrote: >> This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8154364: Suggested change for key comparison Latest implementation changes looks okay. I see there is a follow-up issue created to improve the 2-arg getIfExists. I skimmed over IsSameFile and it looks like good coverage. I don't have cycles to walk through every line right now, hopefully others can help on that. ------------- Marked as reviewed by alanb (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26736#pullrequestreview-3136528211 From syan at openjdk.org Wed Aug 20 14:28:43 2025 From: syan at openjdk.org (SendaoYan) Date: Wed, 20 Aug 2025 14:28:43 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: <5YehMZKBa60PIk9Ia2sC4kLuFx5ZvfmtoYT_H-LuQbM=.e40c421f-d2af-46e5-8dc7-5b30fe79c0b0@github.com> Message-ID: On Wed, 20 Aug 2025 12:53:23 GMT, David Holmes wrote: >> But what this PR do is change the timeoutFactor in general and find out all the tests which may timeout after the timeoutFactor has been changed. >> >> The old default timeout before this PR is 120 * 4, after this PR the new default is 120 * 1 > > @sendaoYan this PR changes the default timeoutFactor and so also has to change quite a number of implicit and explicit timeouts. But that doesn't mean that test configs that already set their own timeoutFactor should adjust by the same factor! That just doesn't work for any test with an implicit default timeout. Yes, this PR change the default timeoutFactor when the tested JVM options do not contains '-Xcomp', and at the same time also multiplies 4 of the timeout value defined in some tests. So after this PR, the tests which the timeout value has been multiplied 4 will have more timeout value, when the tested [JVM options contains '-Xcomp'](https://github.com/lkorinth/jdk/blob/286a2cc6e989a1c7dcd641bce792c6411bc1d0ea/make/RunTests.gmk#L593). I do agree this change, what I mean is this change has some side effect. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2288361080 From bpb at openjdk.org Wed Aug 20 15:01:39 2025 From: bpb at openjdk.org (Brian Burkhalter) Date: Wed, 20 Aug 2025 15:01:39 GMT Subject: RFR: 8154364: (fs) Files.isSameFile() throws NoSuchFileException with broken symbolic links [v10] In-Reply-To: References: Message-ID: On Tue, 19 Aug 2025 18:15:02 GMT, Brian Burkhalter wrote: >> This request proposes to broaden the definition of which paths are considered to be the same by `java.nio.file.Files.isSameFile()`. A new test is added to cover many comparisons. > > Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision: > > 8154364: Suggested change for key comparison > I don't have cycles to walk through every line [of `IsSameFile`] right now, hopefully others can help on that. Thanks for the review. I'll leave this request open for a day or two, meanwhile running tier 1-3 jobs. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26736#issuecomment-3206779212 From ihse at openjdk.org Wed Aug 20 15:19:42 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 20 Aug 2025 15:19:42 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v4] In-Reply-To: <0EoWHaPUvqZvxYNRoBbcFdHS9QVXCnfHQqPyd4srQlc=.cfd617e9-5be4-4c14-bf71-68a73d86836b@github.com> References: <0EoWHaPUvqZvxYNRoBbcFdHS9QVXCnfHQqPyd4srQlc=.cfd617e9-5be4-4c14-bf71-68a73d86836b@github.com> Message-ID: On Mon, 18 Aug 2025 16:34:21 GMT, Leo Korinth wrote: >> This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) >> >> In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). >> >> My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. >> >> These fixes have been created when I have ploughed through test cases: >> JDK-8352719: Add an equals sign to the modules statement >> JDK-8352709: Remove bad timing annotations from WhileOpTest.java >> JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test >> CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE >> CODETOOLS-7903961: Make default timeout configurable >> >> After the review, I will update the copyrights. >> >> I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. >> >> I got 4 timing related faults: >> 1) runtime/Thread/TestThreadDumpMonitorContention.java >> This is probably: https://bugs.openjdk.org/browse/JDK-8361370 >> 2) sun/tools/jhsdb/BasicLauncherTest.java >> I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. >> 3) gc/stress/TestReclaimStringsLeaksMemory.java >> I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. >> 4) sun/security/ssl/X509KeyManager/CertChecking.java >> This is a new test that I got on last rebase. I have added a timeout of 480 to it. >> >> In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. >> >> From the review of the cancelled "8356171: ... > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > after suggestion from Daniel doc/testing.md line 385: > 383: (`-timeoutFactor`). Also, some test cases that programmatically wait a > 384: certain amount of time will apply this factor. If we run in > 385: forced compilation mode (`-Xcomp`), [RunTest.gmk](../make/RunTests.gmk) I don't think there is any point linking to the build source code. Suggestion: certain amount of time will apply this factor. If you run in forced compilation mode (`-Xcomp`) using `make test`, it will automatically adjust this factor to compensate for the interpreter not being as fast as JITed code. Defaults to 1. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2288510800 From ihse at openjdk.org Wed Aug 20 15:24:39 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 20 Aug 2025 15:24:39 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v4] In-Reply-To: <0EoWHaPUvqZvxYNRoBbcFdHS9QVXCnfHQqPyd4srQlc=.cfd617e9-5be4-4c14-bf71-68a73d86836b@github.com> References: <0EoWHaPUvqZvxYNRoBbcFdHS9QVXCnfHQqPyd4srQlc=.cfd617e9-5be4-4c14-bf71-68a73d86836b@github.com> Message-ID: <8U5zCHQCXe9z3nrLlCwRVgbXCFzWHxqsvI74M1yQ96Y=.4ee013da-22a4-43e3-8660-8bf3c2261450@github.com> On Mon, 18 Aug 2025 16:34:21 GMT, Leo Korinth wrote: >> This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) >> >> In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). >> >> My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. >> >> These fixes have been created when I have ploughed through test cases: >> JDK-8352719: Add an equals sign to the modules statement >> JDK-8352709: Remove bad timing annotations from WhileOpTest.java >> JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test >> CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE >> CODETOOLS-7903961: Make default timeout configurable >> >> After the review, I will update the copyrights. >> >> I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. >> >> I got 4 timing related faults: >> 1) runtime/Thread/TestThreadDumpMonitorContention.java >> This is probably: https://bugs.openjdk.org/browse/JDK-8361370 >> 2) sun/tools/jhsdb/BasicLauncherTest.java >> I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. >> 3) gc/stress/TestReclaimStringsLeaksMemory.java >> I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. >> 4) sun/security/ssl/X509KeyManager/CertChecking.java >> This is a new test that I got on last rebase. I have added a timeout of 480 to it. >> >> In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. >> >> From the review of the cancelled "8356171: ... > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > after suggestion from Daniel It seems to me like there is a need to automatically collect normal test run times automatically, so we can match the timeout given to any individual test with the normal execution time. After all, the purpose of any timeout on tests is to allow the test to execute normally, but not wait too long in case of a problem that causes the test to take too long (or forever) to run. I realize that this is highly hardware dependent, but test times tend to be Pareto distributed, so a very quick test maybe takes 1 second on fast machines and 10 on slow, and very slow tests maybe take 15 minutes on fast machines and 40 minutes on slow. In the first case, anything above 15 seconds is probably sus, and in the second case, anything above 60 is probably not good either (I'm just adding 50% to the max time). Right now it seems engineers is spending their valuable time giving guesstimates for each individual test. That seems like poorly used time and resources. ------------- PR Comment: https://git.openjdk.org/jdk/pull/26749#issuecomment-3206865824 From alanb at openjdk.org Wed Aug 20 15:53:16 2025 From: alanb at openjdk.org (Alan Bateman) Date: Wed, 20 Aug 2025 15:53:16 GMT Subject: RFR: 8364764: java/nio/channels/vthread/BlockingChannelOps.java subtests timed out Message-ID: 4 tests (testSocketChannelWriteAsyncClose, testSocketChannelWriteInterrupt, testPipeWriteAsyncClose testPipeWriteInterrupt) test async close/interrupt when a virtual thread is blocked in write. This is difficult to test as the target thread may wakeup with bytes written (so it returns the number of bytes written rather than throw). The test is changed to "nudge" the writer a few times so that the writer eventually wakes up with no bytes written. Additionally, two tests are added to test async shutdownInput and shutdownOutput. ------------- Commit messages: - More robustness - Merge branch 'master' into JDK-8364764 - Initial commit Changes: https://git.openjdk.org/jdk/pull/26847/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26847&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8364764 Stats: 111 lines in 1 file changed: 80 ins; 2 del; 29 mod Patch: https://git.openjdk.org/jdk/pull/26847.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26847/head:pull/26847 PR: https://git.openjdk.org/jdk/pull/26847 From lkorinth at openjdk.org Wed Aug 20 16:27:39 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 20 Aug 2025 16:27:39 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v4] In-Reply-To: References: <0EoWHaPUvqZvxYNRoBbcFdHS9QVXCnfHQqPyd4srQlc=.cfd617e9-5be4-4c14-bf71-68a73d86836b@github.com> Message-ID: On Wed, 20 Aug 2025 15:17:02 GMT, Magnus Ihse Bursie wrote: >> Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: >> >> after suggestion from Daniel > > doc/testing.md line 385: > >> 383: (`-timeoutFactor`). Also, some test cases that programmatically wait a >> 384: certain amount of time will apply this factor. If we run in >> 385: forced compilation mode (`-Xcomp`), [RunTest.gmk](../make/RunTests.gmk) > > I don't think there is any point linking to the build source code. > > Suggestion: > > certain amount of time will apply this factor. If you run in > forced compilation mode (`-Xcomp`) using `make test`, it > will automatically adjust this factor to compensate for the > interpreter not being as fast as JITed code. Defaults to 1. I will remove the link, and I will update my bad text still talking about the interpreter (sorry for that mistake). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2288683592 From lkorinth at openjdk.org Wed Aug 20 17:05:59 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 20 Aug 2025 17:05:59 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v5] In-Reply-To: References: Message-ID: > This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) > > In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). > > My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. > > These fixes have been created when I have ploughed through test cases: > JDK-8352719: Add an equals sign to the modules statement > JDK-8352709: Remove bad timing annotations from WhileOpTest.java > JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test > CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE > CODETOOLS-7903961: Make default timeout configurable > > After the review, I will update the copyrights. > > I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. > > I got 4 timing related faults: > 1) runtime/Thread/TestThreadDumpMonitorContention.java > This is probably: https://bugs.openjdk.org/browse/JDK-8361370 > 2) sun/tools/jhsdb/BasicLauncherTest.java > I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. > 3) gc/stress/TestReclaimStringsLeaksMemory.java > I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. > 4) sun/security/ssl/X509KeyManager/CertChecking.java > This is a new test that I got on last rebase. I have added a timeout of 480 to it. > > In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. > > From the review of the cancelled "8356171: Increase timeout for test cases as preparation for change of... Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: update testing.md, remove makefile link, fix bad text ------------- Changes: - all: https://git.openjdk.org/jdk/pull/26749/files - new: https://git.openjdk.org/jdk/pull/26749/files/286a2cc6..f24a1e72 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=26749&range=04 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=26749&range=03-04 Stats: 8 lines in 2 files changed: 0 ins; 2 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/26749.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26749/head:pull/26749 PR: https://git.openjdk.org/jdk/pull/26749 From lkorinth at openjdk.org Wed Aug 20 17:05:59 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Wed, 20 Aug 2025 17:05:59 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v4] In-Reply-To: References: <0EoWHaPUvqZvxYNRoBbcFdHS9QVXCnfHQqPyd4srQlc=.cfd617e9-5be4-4c14-bf71-68a73d86836b@github.com> Message-ID: <2Ba-EiFMVh1-nMHcihw93nZq-TkQNtvHc244Bwe8I40=.cfa54a17-0a3f-465d-a1c3-7560965376d7@github.com> On Wed, 20 Aug 2025 16:24:43 GMT, Leo Korinth wrote: >> doc/testing.md line 385: >> >>> 383: (`-timeoutFactor`). Also, some test cases that programmatically wait a >>> 384: certain amount of time will apply this factor. If we run in >>> 385: forced compilation mode (`-Xcomp`), [RunTest.gmk](../make/RunTests.gmk) >> >> I don't think there is any point linking to the build source code. >> >> Suggestion: >> >> certain amount of time will apply this factor. If you run in >> forced compilation mode (`-Xcomp`) using `make test`, it >> will automatically adjust this factor to compensate for the >> interpreter not being as fast as JITed code. Defaults to 1. > > I will remove the link, and I will update my bad text still talking about the interpreter (sorry for that mistake). fixed ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2288793081 From ihse at openjdk.org Wed Aug 20 19:36:44 2025 From: ihse at openjdk.org (Magnus Ihse Bursie) Date: Wed, 20 Aug 2025 19:36:44 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v5] In-Reply-To: References: Message-ID: On Wed, 20 Aug 2025 17:05:59 GMT, Leo Korinth wrote: >> This changes the timeout factor from 4 to 1. Most of the changes add timeouts to individual test cases so that I am able to run them with a timeout factor of 0.7 (some margin to the checked in factor of one) >> >> In addition to changing the timeout factor, I am also using a library call to parse the timeout factor from the Java properties (I cannot use the library function everywhere as jtreg does not allow me to add @library notations to non test case files). >> >> My approach has been to run all tests, and afterwards updating those that fail due to the timeout factor. The amount of updated test cases is huge, and my strategy has been to quadruple the timeout if I could not directly see that less was needed. In a few places, I have added a bit more timeout so that it will work with the 0.7 timeout factor. >> >> These fixes have been created when I have ploughed through test cases: >> JDK-8352719: Add an equals sign to the modules statement >> JDK-8352709: Remove bad timing annotations from WhileOpTest.java >> JDK-8352074: Test MemoryLeak.java seems not to test what it is supposed to test >> CODETOOLS-7903937: JTREG uses timeout factor on socket timeout but not on KEEPALIVE >> CODETOOLS-7903961: Make default timeout configurable >> >> After the review, I will update the copyrights. >> >> I have run testing tier1-8. The last time with a timeout factor of 1 instead of 0.7. >> >> I got 4 timing related faults: >> 1) runtime/Thread/TestThreadDumpMonitorContention.java >> This is probably: https://bugs.openjdk.org/browse/JDK-8361370 >> 2) sun/tools/jhsdb/BasicLauncherTest.java >> I am unsure about this one, it has not failed on my runs before, even with a timeout factor of 0.7, maybe I was unlucky. >> 3) gc/stress/TestReclaimStringsLeaksMemory.java >> I updated this to 480 seconds, I finish this fairly fast (~14s) on my not very fast computer, but the Macs that fail are old x86-based ones. >> 4) sun/security/ssl/X509KeyManager/CertChecking.java >> This is a new test that I got on last rebase. I have added a timeout of 480 to it. >> >> In addition to these four tests, I have another one "java/lang/ThreadLocal/MemoryLeak.java" that earlier failed with a timeout factor of 0.7 but did not fail in the last run. I will *not* update that test case, because the extra time spent is strange and should be looked at. I have created JDK-8352074 on that test case, and I will probably create another bug describing the timeout I got. >> >> From the review of the cancelled "8356171: ... > > Leo Korinth has updated the pull request incrementally with one additional commit since the last revision: > > update testing.md, remove makefile link, fix bad text Build changes look good now. Thanks! ------------- Marked as reviewed by ihse (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/26749#pullrequestreview-3137980952 From dholmes at openjdk.org Wed Aug 20 21:32:39 2025 From: dholmes at openjdk.org (David Holmes) Date: Wed, 20 Aug 2025 21:32:39 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v4] In-Reply-To: <8U5zCHQCXe9z3nrLlCwRVgbXCFzWHxqsvI74M1yQ96Y=.4ee013da-22a4-43e3-8660-8bf3c2261450@github.com> References: <0EoWHaPUvqZvxYNRoBbcFdHS9QVXCnfHQqPyd4srQlc=.cfd617e9-5be4-4c14-bf71-68a73d86836b@github.com> <8U5zCHQCXe9z3nrLlCwRVgbXCFzWHxqsvI74M1yQ96Y=.4ee013da-22a4-43e3-8660-8bf3c2261450@github.com> Message-ID: On Wed, 20 Aug 2025 15:21:39 GMT, Magnus Ihse Bursie wrote: > I realize that this is highly hardware dependent, but test times tend to be Pareto distributed, so a very quick test maybe takes 1 second on fast machines and 10 on slow, @magicus unfortunately that is often not the case in practice. We can see many tests that normally run very quickly but occasionally run very slow - minutes versus seconds. > Right now it seems engineers is spending their valuable time giving guesstimates for each individual test. That seems like poorly used time and resources. For this exercise existing explicit timeout values need to be multiplied by 4 to keep the same absolute timeout value. In addition a number of tests that use the implicit default timeout (120*4) now need an explicit timeout (480 generally). ------------- PR Comment: https://git.openjdk.org/jdk/pull/26749#issuecomment-3208143195 From lkorinth at openjdk.org Thu Aug 21 09:12:57 2025 From: lkorinth at openjdk.org (Leo Korinth) Date: Thu, 21 Aug 2025 09:12:57 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: <5YehMZKBa60PIk9Ia2sC4kLuFx5ZvfmtoYT_H-LuQbM=.e40c421f-d2af-46e5-8dc7-5b30fe79c0b0@github.com> Message-ID: On Wed, 20 Aug 2025 14:25:57 GMT, SendaoYan wrote: >> @sendaoYan this PR changes the default timeoutFactor and so also has to change quite a number of implicit and explicit timeouts. But that doesn't mean that test configs that already set their own timeoutFactor should adjust by the same factor! That just doesn't work for any test with an implicit default timeout. > > Yes, this PR change the default timeoutFactor when the tested JVM options do not contains '-Xcomp', and at the same time also multiplies 4 of the timeout value defined in some tests. > > So after this PR, the tests which the timeout value has been multiplied 4 will have more timeout value, when the tested [JVM options contains '-Xcomp'](https://github.com/lkorinth/jdk/blob/286a2cc6e989a1c7dcd641bce792c6411bc1d0ea/make/RunTests.gmk#L593). > > I do agree this change, what I mean is this change has some side effect. > >> If you would like to change it after the integration I think that would be valuable --- though my guess is that it could be quite a lot of work. > > I think I can try it in a new PR. I want to _warn_ you before you put too much energy into it. Changing the `-Xcomp` timeout factor might have even bigger impact than my change. Also, I have no idea how well that flag is tested in open testing. That is, your change might look good for you --- but might cause havoc for companies doing more extensive testing. I have still not received green light for integrating my change, because extensive testing is still being run (and other teams are evaluating). I advise against changing the flag. When I evaluate the benefit for the default timeout, it was mainly not the timeout _in itself_ that was the problem, but the fact that most people have no idea that the timeout factor is applied and thus can not create or debug tests in a good way. I hope this helps you, and does not come out as too negative. I just feel that I have put too much energy into this, and I do not hope that struggle for you. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2290422272 From vyazici at openjdk.org Thu Aug 21 09:39:44 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Thu, 21 Aug 2025 09:39:44 GMT Subject: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v5] In-Reply-To: References: Message-ID: > `NoRepl`-suffixed `String` methods denote methods that do not replace invalid characters, but throw `CharacterCodingException` on encounter. This behavior cannot easily be derived from the method footprints, has been a source of confusion for maintainers, and is not uniformly adopted, e.g., `newStringUTF8NoRepl()` and `getBytesUTF8NoRepl()` does *not* throw `CCE`. This PR replaces the `NoRepl` suffix with `NoReplacement` in method names and consistently uses `throws CCE` in method footprints. Volkan Yazici has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits: - Javadoc fix - Cosmetic improvements - Merge remote-tracking branch 'upstream/master' into jlaNoRepl - Remove redundant type parameters - Simplify added null checks - Avoid code duplication by sprinkling some generics magic - Group `String` methods by `doReplace` argument - Merge remote-tracking branch 'upstream/master' into jlaNoRepl - Replace `requireNonNull` with implicit null checks - Merge remote-tracking branch 'upstream/master' into jlaNoRepl - ... and 3 more: https://git.openjdk.org/jdk/compare/a7c0f4b8...7af0f351 ------------- Changes: https://git.openjdk.org/jdk/pull/26413/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26413&range=04 Stats: 217 lines in 7 files changed: 77 ins; 39 del; 101 mod Patch: https://git.openjdk.org/jdk/pull/26413.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/26413/head:pull/26413 PR: https://git.openjdk.org/jdk/pull/26413 From vyazici at openjdk.org Thu Aug 21 09:39:46 2025 From: vyazici at openjdk.org (Volkan Yazici) Date: Thu, 21 Aug 2025 09:39:46 GMT Subject: RFR: 8356439: Rename JavaLangAccess::*NoRepl methods [v4] In-Reply-To: References: Message-ID: On Tue, 19 Aug 2025 16:45:42 GMT, Roger Riggs wrote: >> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision: >> >> Remove redundant type parameters > > src/java.base/share/classes/jdk/internal/access/JavaLangAccess.java line 361: > >> 359: * @throws CharacterCodingException For malformed input or unmappable characters >> 360: */ >> 361: String newStringUTF8NoReplacement(byte[] bytes, int offset, int length) throws CharacterCodingException; > > This method is only used by ZipCoder and could be refactored to use `uncheckedNewStringNoReplacement` as in PR#https://github.com/openjdk/jdk/pull/26822. > It is a refactoring cleanup not directly related to renaming the NoRepl methods. Thanks so much for the donation! Picked up #26831 and #26822 changes in the f753389 merge commit. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26413#discussion_r2290474619 From syan at openjdk.org Thu Aug 21 09:52:54 2025 From: syan at openjdk.org (SendaoYan) Date: Thu, 21 Aug 2025 09:52:54 GMT Subject: RFR: 8260555: Change the default TIMEOUT_FACTOR from 4 to 1 [v3] In-Reply-To: References: <5YehMZKBa60PIk9Ia2sC4kLuFx5ZvfmtoYT_H-LuQbM=.e40c421f-d2af-46e5-8dc7-5b30fe79c0b0@github.com> Message-ID: On Thu, 21 Aug 2025 09:10:26 GMT, Leo Korinth wrote: >> Yes, this PR change the default timeoutFactor when the tested JVM options do not contains '-Xcomp', and at the same time also multiplies 4 of the timeout value defined in some tests. >> >> So after this PR, the tests which the timeout value has been multiplied 4 will have more timeout value, when the tested [JVM options contains '-Xcomp'](https://github.com/lkorinth/jdk/blob/286a2cc6e989a1c7dcd641bce792c6411bc1d0ea/make/RunTests.gmk#L593). >> >> I do agree this change, what I mean is this change has some side effect. >> >>> If you would like to change it after the integration I think that would be valuable --- though my guess is that it could be quite a lot of work. >> >> I think I can try it in a new PR. > > I want to _warn_ you before you put too much energy into it. Changing the `-Xcomp` timeout factor might have even bigger impact than my change. Also, I have no idea how well that flag is tested in open testing. That is, your change might look good for you --- but might cause havoc for companies doing more extensive testing. > > I have still not received green light for integrating my change, because extensive testing is still being run (and other teams are evaluating). I advise against changing the flag. When I evaluate the benefit for the default timeout, it was mainly not the timeout _in itself_ that was the problem, but the fact that most people have no idea that the timeout factor is applied and thus can not create or debug tests in a good way. I hope this helps you, and does not come out as too negative. I just feel that I have put too much energy into this, and I do not hope that struggle for you. @lkorinth Thanks for your advice sincerely. I think you are right, we need more evaluate cautiously before start to change the timeoutFactor for -Xcomp. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/26749#discussion_r2290523415