From honkar at openjdk.org Sat Mar 1 00:00:06 2025
From: honkar at openjdk.org (Harshitha Onkar)
Date: Sat, 1 Mar 2025 00:00:06 GMT
Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update
of Built-In ICC_Profiles [v5]
In-Reply-To:
References:
<3_4w7ORolKKOG1ylCMn6yuDKlAaVeFvku0zETs2lwLk=.d455fa8e-9a22-4ecd-aefb-c454a36c5e10@github.com>
Message-ID: <6PnbLDirNcSftNJ_AznDnKTS29aVw2E1vKYiRZw2_DA=.d50ac6fe-06cd-4847-9761-67c9c38b6143@github.com>
On Fri, 28 Feb 2025 23:44:40 GMT, Phil Race wrote:
>>> Yes, there are. Does any other way create a built-in profile? No, it doesn't as far as I can see.
>>
>> Yes, currently ProfileDeferralInfo is the only way to create built-in profile.
>>
>>> Is this flexibility needed? I'd say, it's not needed? unless there's a very high chance there'll soon be introduced a new build-in ICC profile which is created in another way but ICC_Profile(ProfileDeferralInfo) constructor.
>>
>> As of now we don't need the flexibility but not sure if that is something that we may require or need to consider in future. @prrace Your suggestion ?
>
> So in fact Harshitha had prototyped the constructor mechanism - but it was passing a parameter so wasn't as small a diff as the most recent alternate, because I think it rippled into changing the sub-class constructors as well, which made it less desirable.
> Another particular concern was that it was equating ProfileDeferralInfo to meaning isBuiltIn == true, which is the case today, but it is not a fundamental truth.
> And the proposal here is more direct and you don't have to go follow the bread crumbs to see exactly which profiles have this set to true. So that is why the PR is as it is.
> Neither is "wrong" - they are just different choices based on different perceptions.
>
> But if we can do this with changes to *just this class*, then may be .. and since I see the sub-class constructors (for RGB and Gray) call the same signature super-class constructors, then I think this should work, and it will be OK.
> I tried it on a local repo, and came up with the same changes as suggested and it least builds ..
> So we can do it that way too, but there should be a comment somewhere that ProfileDeferralInfo is only for built-in profiles - and that in fact all built-in profiles should use it.
Thanks for the update on this discussion Phil. I'll update the code to set built-in flag in the constructor and add a comment stating - ProfileDeferralInfo to be used only for built-in profiles.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r1976131267
From vdyakov at openjdk.org Sat Mar 1 00:50:53 2025
From: vdyakov at openjdk.org (Victor Dyakov)
Date: Sat, 1 Mar 2025 00:50:53 GMT
Subject: RFR: 8286204: [Accessibility, macOS,
VoiceOver] VoiceOver reads the
spinner value 10 as 1 when user iterates to 10 for the first time on macOS
[v2]
In-Reply-To:
References: <8z-zsXaX0i3ZFFD4Q-EvHeiYZTiOPRN_NtjoYYMSS9A=.b08d0f23-81a9-422d-9a64-51d7f85b03a3@github.com>
Message-ID:
On Fri, 28 Feb 2025 12:37:35 GMT, Abhishek Kumar wrote:
>> VoiceOver is unable to announce the correct value for spinner. For JSpinner with maximum value of more than 10, VO announce 10 as 1, 20 as 2 and so on. Probable reason is the "ACCESSIBLE_TEXT_PROPERTY" fired by accessible JTextComponent that leads to wrong range value invoked for accessibility API by VO.
>> Workaround fix is to ensure "ACCESSIBLE_TEXT_PROPOERTY" is not fired in case of JSpinner with numeric values.
>>
>> Since the fix is in Java Component, verified fix with JAWS on windows. I don't see any side effects in announcement.
>> Manual test case is added to verify the fix.
>>
>> CI pipeline testing is ok for the proposed fix.
>
> Abhishek Kumar has updated the pull request incrementally with three additional commits since the last revision:
>
> - space fix
> - whitespace fix
> - Copyright year update and manual test case added
@azuev-java please review
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23841#issuecomment-2691787090
From honkar at openjdk.org Sat Mar 1 00:52:28 2025
From: honkar at openjdk.org (Harshitha Onkar)
Date: Sat, 1 Mar 2025 00:52:28 GMT
Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update
of Built-In ICC_Profiles [v10]
In-Reply-To:
References:
Message-ID:
> Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance().
>
> It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated.
>
> With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_
>
> Fix consists of:
> * `private boolean isBuiltIn = false` in ICC_Profile which is set to true when BuiltIn profiles are created and false for non-builtIn profile.
> * Converted BuiltInProfile from private interface to private static class (with all the profile instances as static final)
> * `isBuiltIn` flag is set to true when BuiltInProfile are loaded.
> * JavaDoc update for setData() (CSR required)
>
> There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance.
>
> Applications which need a modified version of the ICC Profile should instead do the following:
>
>
> byte[] profileData = ICC_Profile.getData() // get the byte array represtation of BuiltIn- profile
> ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile
> newProfile.setData() // to modify and customize the profile
>
>
> Following existing tests are modified to update a copy of Built-In profile.
>
> - java/awt/color/ICC_Profile/SetHeaderInfo.java
> - java/awt/color/ICC_ProfileSetNullDataTest.java
> - sun/java2d/cmm/ProfileOp/SetDataTest.java
Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
builtIn flag moved to constructor
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23606/files
- new: https://git.openjdk.org/jdk/pull/23606/files/559fb749..483cda0f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23606&range=09
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23606&range=08-09
Stats: 34 lines in 1 file changed: 4 ins; 13 del; 17 mod
Patch: https://git.openjdk.org/jdk/pull/23606.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23606/head:pull/23606
PR: https://git.openjdk.org/jdk/pull/23606
From honkar at openjdk.org Sat Mar 1 00:52:28 2025
From: honkar at openjdk.org (Harshitha Onkar)
Date: Sat, 1 Mar 2025 00:52:28 GMT
Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update
of Built-In ICC_Profiles [v5]
In-Reply-To:
References:
<3_4w7ORolKKOG1ylCMn6yuDKlAaVeFvku0zETs2lwLk=.d455fa8e-9a22-4ecd-aefb-c454a36c5e10@github.com>
Message-ID:
On Mon, 24 Feb 2025 19:17:10 GMT, Alexey Ivanov wrote:
>> There are other way to create a profile - directly loading it from a file (serialization)
>> `ICC_Profile.getInstance(); `or using the byte array representation of the profile. So the main intention here was not to tie ProfileDeferralInfo with isBuiltIn.
>
>> There are other way to create a profile - directly loading it form a file (serialization) `ICC_Profile.getInstance(); `or using the byte array representation of the profile. So the main intention here was not to tie ProfileDeferralInfo with isBuiltIn.
>
> Yes, there are. Does any other way create a **built-in profile**? No, it doesn't as far as I can see.
>
> Is this flexibility needed? I'd say, it's not needed? unless there's a very high chance there'll soon be introduced a new build-in ICC profile which is created in another way but `ICC_Profile(ProfileDeferralInfo)` constructor.
@aivanov-jdk Updated the code and moved `builtIn` flag to be set in the constructor.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r1976182029
From honkar at openjdk.org Sat Mar 1 00:52:28 2025
From: honkar at openjdk.org (Harshitha Onkar)
Date: Sat, 1 Mar 2025 00:52:28 GMT
Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update
of Built-In ICC_Profiles [v6]
In-Reply-To: <1wfT2PtTYMvOaP0wr4oAPo_gDneqo4fGch1zapRcYdw=.39f099a1-7ade-4318-ac28-38bfe1ca4ea1@github.com>
References:
<2tZ5ZlWFeRoBPvUpyUsadwdzVUM_-Hp0Nk7iLogdzqY=.74644b95-1c05-4544-86aa-1ba3e6c0654c@github.com>
<1wfT2PtTYMvOaP0wr4oAPo_gDneqo4fGch1zapRcYdw=.39f099a1-7ade-4318-ac28-38bfe1ca4ea1@github.com>
Message-ID:
On Fri, 28 Feb 2025 23:45:31 GMT, Phil Race wrote:
>> src/java.desktop/share/classes/java/awt/color/ICC_Profile.java line 1170:
>>
>>> 1168: * @throws IllegalArgumentException if {@code tagSignature} is not a
>>> 1169: * signature as defined in the ICC specification.
>>> 1170: * @throws IllegalArgumentException if a content of the {@code tagData}
>>
>> This is an existing issue, if it's an issue: should the text say *?**the** content?* instead of *?**a** content?*? @prrace
>
> Yes.
Updated.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r1976182378
From honkar at openjdk.org Sat Mar 1 01:11:45 2025
From: honkar at openjdk.org (Harshitha Onkar)
Date: Sat, 1 Mar 2025 01:11:45 GMT
Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update
of Built-In ICC_Profiles [v11]
In-Reply-To:
References:
Message-ID:
> Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance().
>
> It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated.
>
> With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_
>
> Fix consists of:
> * `private boolean isBuiltIn = false` in ICC_Profile which is set to true when BuiltIn profiles are created and false for non-builtIn profile.
> * Converted BuiltInProfile from private interface to private static class (with all the profile instances as static final)
> * `isBuiltIn` flag is set to true when BuiltInProfile are loaded.
> * JavaDoc update for setData() (CSR required)
>
> There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance.
>
> Applications which need a modified version of the ICC Profile should instead do the following:
>
>
> byte[] profileData = ICC_Profile.getData() // get the byte array represtation of BuiltIn- profile
> ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile
> newProfile.setData() // to modify and customize the profile
>
>
> Following existing tests are modified to update a copy of Built-In profile.
>
> - java/awt/color/ICC_Profile/SetHeaderInfo.java
> - java/awt/color/ICC_ProfileSetNullDataTest.java
> - sun/java2d/cmm/ProfileOp/SetDataTest.java
Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
doc update
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23606/files
- new: https://git.openjdk.org/jdk/pull/23606/files/483cda0f..b6fffacf
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23606&range=10
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23606&range=09-10
Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/23606.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23606/head:pull/23606
PR: https://git.openjdk.org/jdk/pull/23606
From dnguyen at openjdk.org Sat Mar 1 01:13:01 2025
From: dnguyen at openjdk.org (Damon Nguyen)
Date: Sat, 1 Mar 2025 01:13:01 GMT
Subject: RFR: 8350924: javax/swing/JMenu/4213634/bug4213634.java fails
In-Reply-To:
References:
Message-ID:
On Fri, 28 Feb 2025 08:50:31 GMT, Prasanta Sadhukhan wrote:
> Test fails in ubuntu OCI system..Made it more robust my adding waitForIdle/delay before commencing test..
> OCI system is ok with the fix.
Changes requested by dnguyen (Committer).
test/jdk/javax/swing/JMenu/4213634/bug4213634.java line 57:
> 55: SwingUtilities.invokeAndWait(() -> {
> 56: createAndShowGUI();
> 57: });
Suggestion:
SwingUtilities.invokeAndWait(() -> createAndShowGUI());
test/jdk/javax/swing/JMenu/4213634/bug4213634.java line 74:
> 72: JButton button = new JButton("Test");
> 73: frame.getContentPane().add("South", button);
> 74: frame.setSize(400, 400);
Is this the best frame size? I see the text area has text to output, but the full sentence isn't even shown and there's no word wrap. Can change the text to anything else, especially since the TextArea text exceeds the line char limit. There's also a lot of empty space in this test frame. So, this can be changed in a variety of ways.
test/jdk/javax/swing/JMenu/4213634/bug4213634.java line 119:
> 117: }
> 118: });
> 119: if(bFlag)
Can also fix the for-loop above into:
for (int i = 0; i < 10; i++) {
And can make a lambda expression by using:
menuitem.addActionListener(e -> {
throw new RuntimeException(
"Failed: Mnemonic activated");
});
-------------
PR Review: https://git.openjdk.org/jdk/pull/23837#pullrequestreview-2652064257
PR Review Comment: https://git.openjdk.org/jdk/pull/23837#discussion_r1976192726
PR Review Comment: https://git.openjdk.org/jdk/pull/23837#discussion_r1976193985
PR Review Comment: https://git.openjdk.org/jdk/pull/23837#discussion_r1976190116
From duke at openjdk.org Sat Mar 1 17:48:54 2025
From: duke at openjdk.org (Harald Kuhr)
Date: Sat, 1 Mar 2025 17:48:54 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v7]
In-Reply-To:
References:
Message-ID:
On Wed, 26 Feb 2025 09:23:47 GMT, Jeremy wrote:
>> This adds support for parsing thumbnails in an APP1 Exif marker.
>>
>> This builds on an unfinished proposal by Brian Burkhalter (around 2016). In that previous work the only additional meta info he parsed was the image creation time; this PR similarly includes the same property. (I can't speak to why he included that property, but it looks like he has a lot of experience with ImageIO so I trust his judgment.)
>>
>> ~~The test addresses the original images attached to the ticket plus a few extra images I found on my computer that include unusual properties. (Possibly those images are malformed, but if they exist in the wild and other platforms support them then I'd prefer to support them too.)~~
>>
>> The images used in this test are contributed by Brian and me.
>
> Jeremy has updated the pull request incrementally with one additional commit since the last revision:
>
> 8160327: trying to placate PR script
>
> The github script still classifies two of the sample jpgs as executable files, which it classifies as errors.
src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/ExifMarkerSegment.java line 182:
> 180: // file shows it can also sometimes be 0x60000. I've also observed it to be
> 181: // undefined, 0x0007, or several variations of 0x????0006. Similarly the same
> 182: // tag should be 0x0001 for TIFFs, but I also observed a case where it as 0x10000.
Isn't this ( 0x0001/0x0006 vs 0x1000/0x6000) just a matter of endianness in the TIFF structure? Some odd writers may also use LONG/32 bit values, even though the TiFF and Exif specs only mention SHORT/16 bit values for the compression tag.
Compression 7 "New JPEG" is not as per the Exif spec, but it can probably safely be treated the same way as "Old JPEG" compression 6 for Exif thumbnails.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22898#discussion_r1976464426
From duke at openjdk.org Sat Mar 1 18:01:05 2025
From: duke at openjdk.org (Jeremy)
Date: Sat, 1 Mar 2025 18:01:05 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v7]
In-Reply-To:
References:
Message-ID:
On Sat, 1 Mar 2025 17:46:10 GMT, Harald Kuhr wrote:
>> Jeremy has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8160327: trying to placate PR script
>>
>> The github script still classifies two of the sample jpgs as executable files, which it classifies as errors.
>
> src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/ExifMarkerSegment.java line 182:
>
>> 180: // file shows it can also sometimes be 0x60000. I've also observed it to be
>> 181: // undefined, 0x0007, or several variations of 0x????0006. Similarly the same
>> 182: // tag should be 0x0001 for TIFFs, but I also observed a case where it as 0x10000.
>
> Isn't this ( 0x0001/0x0006 vs 0x1000/0x6000) just a matter of endianness in the TIFF structure? Some odd writers may also use LONG/32 bit values, even though the TiFF and Exif specs only mention SHORT/16 bit values for the compression tag.
>
> Compression 7 "New JPEG" is not as per the Exif spec, but it can probably safely be treated the same way as "Old JPEG" compression 6 for Exif thumbnails.
Yes, it probably is endianness, or endianness-related. My first design question is: should we care? Currently this PR infers whether we're looking for a JPEG or TIFF thumbnail based on other fields. If we strictly rely on the compression tag (250) instead: is that better/desirable? (That is: we could just throw an IOException in the rare case this field is missing/broken.)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22898#discussion_r1976466185
From duke at openjdk.org Sun Mar 2 00:54:12 2025
From: duke at openjdk.org (Karm Michal Babacek)
Date: Sun, 2 Mar 2025 00:54:12 GMT
Subject: RFR: 8349099: java/awt/Headless/HeadlessMalfunctionTest.java fails on
CI with Compilation error
Message-ID: <5CbDBTxpliQSqOle85ecMWccDowy2E9HbyW-uXJ-fMA=.a7f2fb31-8361-457d-a579-b2f785e9b149@github.com>
Removed objectweb.asm for bytecode manipulation and uses JEP 484 classfile API.
Test passes on Linux amd64 so far:
TIME=`date +%s`;
mkdir -p test.${TIME}/jdk/JTwork test.${TIME}/jdk/JTreport;
jtreg -a -ignore:quiet -w:test.${TIME}/jdk/JTwork -r:test.${TIME}/jdk/JTreport -jdk:/home/karm/workspaceRH/jdk/build/linux-x86_64-server-release/images/graal-builder-jdk/ /home/karm/workspaceRH/jdk/test/jdk/java/awt/Headless/
Test results: passed: 15
-------------
Commit messages:
- HeadlessMalfunctionTest from objectweb.asm to classfile api
Changes: https://git.openjdk.org/jdk/pull/23852/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23852&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8349099
Stats: 39 lines in 2 files changed: 3 ins; 12 del; 24 mod
Patch: https://git.openjdk.org/jdk/pull/23852.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23852/head:pull/23852
PR: https://git.openjdk.org/jdk/pull/23852
From duke at openjdk.org Sun Mar 2 00:54:12 2025
From: duke at openjdk.org (Karm Michal Babacek)
Date: Sun, 2 Mar 2025 00:54:12 GMT
Subject: RFR: 8349099: java/awt/Headless/HeadlessMalfunctionTest.java fails
on CI with Compilation error
In-Reply-To: <5CbDBTxpliQSqOle85ecMWccDowy2E9HbyW-uXJ-fMA=.a7f2fb31-8361-457d-a579-b2f785e9b149@github.com>
References: <5CbDBTxpliQSqOle85ecMWccDowy2E9HbyW-uXJ-fMA=.a7f2fb31-8361-457d-a579-b2f785e9b149@github.com>
Message-ID: <6Z0hUCpb1LcLz0LxMWKSVMYRxscG1IB3GvViUmOyIt0=.d1514d6c-57d3-4a96-9318-03a7874b0d6f@github.com>
On Sun, 2 Mar 2025 00:50:30 GMT, Karm Michal Babacek wrote:
> Removed objectweb.asm for bytecode manipulation and uses JEP 484 classfile API.
>
> Test passes on Linux amd64 so far:
>
> TIME=`date +%s`;
> mkdir -p test.${TIME}/jdk/JTwork test.${TIME}/jdk/JTreport;
> jtreg -a -ignore:quiet -w:test.${TIME}/jdk/JTwork -r:test.${TIME}/jdk/JTreport -jdk:/home/karm/workspaceRH/jdk/build/linux-x86_64-server-release/images/graal-builder-jdk/ /home/karm/workspaceRH/jdk/test/jdk/java/awt/Headless/
>
> Test results: passed: 15
@jerboaa FYI
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23852#issuecomment-2692494591
From duke at openjdk.org Sun Mar 2 14:21:45 2025
From: duke at openjdk.org (Karm Michal Babacek)
Date: Sun, 2 Mar 2025 14:21:45 GMT
Subject: RFR: 8349099: java/awt/Headless/HeadlessMalfunctionTest.java fails
on CI with Compilation error [v2]
In-Reply-To: <5CbDBTxpliQSqOle85ecMWccDowy2E9HbyW-uXJ-fMA=.a7f2fb31-8361-457d-a579-b2f785e9b149@github.com>
References: <5CbDBTxpliQSqOle85ecMWccDowy2E9HbyW-uXJ-fMA=.a7f2fb31-8361-457d-a579-b2f785e9b149@github.com>
Message-ID:
> Removed objectweb.asm for bytecode manipulation and uses JEP 484 classfile API.
>
> Test passes on Linux amd64 so far:
>
> TIME=`date +%s`;
> mkdir -p test.${TIME}/jdk/JTwork test.${TIME}/jdk/JTreport;
> jtreg -a -ignore:quiet -w:test.${TIME}/jdk/JTwork -r:test.${TIME}/jdk/JTreport -jdk:/home/karm/workspaceRH/jdk/build/linux-x86_64-server-release/images/graal-builder-jdk/ /home/karm/workspaceRH/jdk/test/jdk/java/awt/Headless/
>
> Test results: passed: 15
Karm Michal Babacek has updated the pull request incrementally with one additional commit since the last revision:
Removes HeadlessMalfunctionTest from ProblemList.txt
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23852/files
- new: https://git.openjdk.org/jdk/pull/23852/files/d67d632b..c6be9f4d
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23852&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23852&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/23852.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23852/head:pull/23852
PR: https://git.openjdk.org/jdk/pull/23852
From asemenov at openjdk.org Sun Mar 2 14:40:52 2025
From: asemenov at openjdk.org (Artem Semenov)
Date: Sun, 2 Mar 2025 14:40:52 GMT
Subject: RFR: 8286204: [Accessibility, macOS,
VoiceOver] VoiceOver reads the
spinner value 10 as 1 when user iterates to 10 for the first time on macOS
[v2]
In-Reply-To:
References: <8z-zsXaX0i3ZFFD4Q-EvHeiYZTiOPRN_NtjoYYMSS9A=.b08d0f23-81a9-422d-9a64-51d7f85b03a3@github.com>
Message-ID:
On Fri, 28 Feb 2025 12:37:35 GMT, Abhishek Kumar wrote:
>> VoiceOver is unable to announce the correct value for spinner. For JSpinner with maximum value of more than 10, VO announce 10 as 1, 20 as 2 and so on. Probable reason is the "ACCESSIBLE_TEXT_PROPERTY" fired by accessible JTextComponent that leads to wrong range value invoked for accessibility API by VO.
>> Workaround fix is to ensure "ACCESSIBLE_TEXT_PROPOERTY" is not fired in case of JSpinner with numeric values.
>>
>> Since the fix is in Java Component, verified fix with JAWS on windows. I don't see any side effects in announcement.
>> Manual test case is added to verify the fix.
>>
>> CI pipeline testing is ok for the proposed fix.
>
> Abhishek Kumar has updated the pull request incrementally with three additional commits since the last revision:
>
> - space fix
> - whitespace fix
> - Copyright year update and manual test case added
> Since the fix is in Java Component, verified fix with JAWS on windows. I don't see any side effects in announcement. Manual test case is added to verify the fix.
Hello.
Was this problem observed on Windows before your changes?
If this error affects only macOS, try looking for a solution somewhere in ```src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/SpinboxAccessibility.m```.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23841#issuecomment-2692761806
From sgehwolf at openjdk.org Sun Mar 2 19:26:59 2025
From: sgehwolf at openjdk.org (Severin Gehwolf)
Date: Sun, 2 Mar 2025 19:26:59 GMT
Subject: RFR: 8349099: java/awt/Headless/HeadlessMalfunctionTest.java fails
on CI with Compilation error [v2]
In-Reply-To:
References: <5CbDBTxpliQSqOle85ecMWccDowy2E9HbyW-uXJ-fMA=.a7f2fb31-8361-457d-a579-b2f785e9b149@github.com>
Message-ID:
On Sun, 2 Mar 2025 14:21:45 GMT, Karm Michal Babacek wrote:
>> Removed objectweb.asm for bytecode manipulation and uses JEP 484 classfile API.
>>
>> Test passes on Linux amd64 so far:
>>
>> TIME=`date +%s`;
>> mkdir -p test.${TIME}/jdk/JTwork test.${TIME}/jdk/JTreport;
>> jtreg -a -ignore:quiet -w:test.${TIME}/jdk/JTwork -r:test.${TIME}/jdk/JTreport -jdk:/home/karm/workspaceRH/jdk/build/linux-x86_64-server-release/images/graal-builder-jdk/ /home/karm/workspaceRH/jdk/test/jdk/java/awt/Headless/
>>
>> Test results: passed: 15
>
> Karm Michal Babacek has updated the pull request incrementally with one additional commit since the last revision:
>
> Removes HeadlessMalfunctionTest from ProblemList.txt
I can confirm the test compiles and runs fine. I've reverted [JDK-8336382](https://bugs.openjdk.org/browse/JDK-8336382) locally - product code only - and verified the test fails as expected. So +1 on the fix.
There is pre-existing code in the test harness, which can get removed now `--add-opens java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED`.
-------------
PR Review: https://git.openjdk.org/jdk/pull/23852#pullrequestreview-2652798011
From prr at openjdk.org Sun Mar 2 22:07:58 2025
From: prr at openjdk.org (Phil Race)
Date: Sun, 2 Mar 2025 22:07:58 GMT
Subject: RFR: 8349099: java/awt/Headless/HeadlessMalfunctionTest.java fails
on CI with Compilation error [v2]
In-Reply-To:
References: <5CbDBTxpliQSqOle85ecMWccDowy2E9HbyW-uXJ-fMA=.a7f2fb31-8361-457d-a579-b2f785e9b149@github.com>
Message-ID:
On Sun, 2 Mar 2025 14:21:45 GMT, Karm Michal Babacek wrote:
>> Removed objectweb.asm for bytecode manipulation and uses JEP 484 classfile API.
>>
>> Test passes on Linux amd64 so far:
>>
>> TIME=`date +%s`;
>> mkdir -p test.${TIME}/jdk/JTwork test.${TIME}/jdk/JTreport;
>> jtreg -a -ignore:quiet -w:test.${TIME}/jdk/JTwork -r:test.${TIME}/jdk/JTreport -jdk:/home/karm/workspaceRH/jdk/build/linux-x86_64-server-release/images/graal-builder-jdk/ /home/karm/workspaceRH/jdk/test/jdk/java/awt/Headless/
>>
>> Test results: passed: 15
>
> Karm Michal Babacek has updated the pull request incrementally with one additional commit since the last revision:
>
> Removes HeadlessMalfunctionTest from ProblemList.txt
Once bitten and all that .. I'd like to run this through our internal test system before it is pushed.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23852#issuecomment-2692931015
From duke at openjdk.org Sun Mar 2 22:50:59 2025
From: duke at openjdk.org (Karm Michal Babacek)
Date: Sun, 2 Mar 2025 22:50:59 GMT
Subject: RFR: 8349099: java/awt/Headless/HeadlessMalfunctionTest.java fails
on CI with Compilation error [v2]
In-Reply-To:
References: <5CbDBTxpliQSqOle85ecMWccDowy2E9HbyW-uXJ-fMA=.a7f2fb31-8361-457d-a579-b2f785e9b149@github.com>
Message-ID:
On Sun, 2 Mar 2025 14:21:45 GMT, Karm Michal Babacek wrote:
>> Removed objectweb.asm for bytecode manipulation and uses JEP 484 classfile API.
>>
>> Test passes on Linux amd64 so far:
>>
>> TIME=`date +%s`;
>> mkdir -p test.${TIME}/jdk/JTwork test.${TIME}/jdk/JTreport;
>> jtreg -a -ignore:quiet -w:test.${TIME}/jdk/JTwork -r:test.${TIME}/jdk/JTreport -jdk:/home/karm/workspaceRH/jdk/build/linux-x86_64-server-release/images/graal-builder-jdk/ /home/karm/workspaceRH/jdk/test/jdk/java/awt/Headless/
>>
>> Test results: passed: 15
>
> Karm Michal Babacek has updated the pull request incrementally with one additional commit since the last revision:
>
> Removes HeadlessMalfunctionTest from ProblemList.txt
Thanks.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23852#issuecomment-2692949207
From prr at openjdk.org Mon Mar 3 00:33:52 2025
From: prr at openjdk.org (Phil Race)
Date: Mon, 3 Mar 2025 00:33:52 GMT
Subject: RFR: 8349099: java/awt/Headless/HeadlessMalfunctionTest.java fails
on CI with Compilation error [v2]
In-Reply-To:
References: <5CbDBTxpliQSqOle85ecMWccDowy2E9HbyW-uXJ-fMA=.a7f2fb31-8361-457d-a579-b2f785e9b149@github.com>
Message-ID:
On Sun, 2 Mar 2025 14:21:45 GMT, Karm Michal Babacek wrote:
>> Removed objectweb.asm for bytecode manipulation and uses JEP 484 classfile API.
>>
>> Test passes on Linux amd64 so far:
>>
>> TIME=`date +%s`;
>> mkdir -p test.${TIME}/jdk/JTwork test.${TIME}/jdk/JTreport;
>> jtreg -a -ignore:quiet -w:test.${TIME}/jdk/JTwork -r:test.${TIME}/jdk/JTreport -jdk:/home/karm/workspaceRH/jdk/build/linux-x86_64-server-release/images/graal-builder-jdk/ /home/karm/workspaceRH/jdk/test/jdk/java/awt/Headless/
>>
>> Test results: passed: 15
>
> Karm Michal Babacek has updated the pull request incrementally with one additional commit since the last revision:
>
> Removes HeadlessMalfunctionTest from ProblemList.txt
The test fails on Windows and macOS. In other words it passes only on Linux.
stdout: [Transforming java.awt.GraphicsEnvironment.
isHeadless removed from java.awt.GraphicsEnvironment.
];
stderr: [WARNING: package jdk.internal.org.objectweb.asm not in java.base
Exception in thread "main" java.lang.NoSuchMethodError: 'boolean java.awt.GraphicsEnvironment.isHeadless()'
at java.desktop/sun.lwawt.macosx.LWCToolkit.(LWCToolkit.java:155)
at java.desktop/sun.awt.PlatformGraphicsInfo.createToolkit(PlatformGraphicsInfo.java:43)
at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:580)
at java.desktop/sun.awt.CGraphicsEnvironment.(CGraphicsEnvironment.java:72)
at java.desktop/sun.awt.PlatformGraphicsInfo.createGE(PlatformGraphicsInfo.java:39)
at java.desktop/java.awt.GraphicsEnvironment$LocalGE.createGE(GraphicsEnvironment.java:89)
at java.desktop/java.awt.GraphicsEnvironment$LocalGE.(GraphicsEnvironment.java:80)
at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:102)
at HeadlessMalfunctionTest$Runner.main(HeadlessMalfunctionTest.java:69)
]
exitValue = 1
java.lang.RuntimeException: 'FATAL ERROR in native method: GetStaticMethodID isHeadless failed' missing from stdout/stderr
at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:253)
at HeadlessMalfunctionTest.main(HeadlessMalfunctionTest.java:62)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at com.sun.javatest.regtest.agent.MainWrapper$MainTask.run(MainWrapper.java:138)
at java.base/java.lang.Thread.run(Thread.java:1447)
JavaTest Message: Test threw exception: java.lang.RuntimeException: 'FATAL ERROR in native method: GetStaticMethodID isHeadless failed' missing from stdout/stderr
JavaTest Message: shutting down test
STATUS:Failed.`main' threw exception: java.lang.RuntimeException: 'FATAL ERROR in native method: GetStaticMethodID isHeadless failed' missing from stdout/stderr
I see you did not remove the add-opens for "java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED"
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23852#issuecomment-2693002591
From prr at openjdk.org Mon Mar 3 06:02:45 2025
From: prr at openjdk.org (Phil Race)
Date: Mon, 3 Mar 2025 06:02:45 GMT
Subject: RFR: 8347321: [ubsan] CGGlyphImages.m:553:30: runtime error: nan is
outside the range of representable values of type 'unsigned long'
Message-ID:
The font tests that fail use non-finite or NaN float values.
In such cases, no visible rendering is expected and the NaNTransform test does pass with empty shapes, but we can filter out these invalid floats before they get to native.
The macOS class that handles the font strike can check for these and replace them.
Since you can't observe a difference unless you can get ubsan to work (not easy) and that is a build option, so not something we can use in testing, there' s no regression test update here.
-------------
Commit messages:
- 8347321
Changes: https://git.openjdk.org/jdk/pull/23855/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23855&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8347321
Stats: 12 lines in 1 file changed: 11 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/23855.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23855/head:pull/23855
PR: https://git.openjdk.org/jdk/pull/23855
From psadhukhan at openjdk.org Mon Mar 3 08:20:40 2025
From: psadhukhan at openjdk.org (Prasanta Sadhukhan)
Date: Mon, 3 Mar 2025 08:20:40 GMT
Subject: RFR: 8350924: javax/swing/JMenu/4213634/bug4213634.java fails [v2]
In-Reply-To:
References:
Message-ID:
> Test fails in ubuntu OCI system..Made it more robust my adding waitForIdle/delay before commencing test..
> OCI system is ok with the fix.
Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
Test fix
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23837/files
- new: https://git.openjdk.org/jdk/pull/23837/files/411d0461..840f59ff
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23837&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23837&range=00-01
Stats: 26 lines in 1 file changed: 7 ins; 7 del; 12 mod
Patch: https://git.openjdk.org/jdk/pull/23837.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23837/head:pull/23837
PR: https://git.openjdk.org/jdk/pull/23837
From psadhukhan at openjdk.org Mon Mar 3 08:20:40 2025
From: psadhukhan at openjdk.org (Prasanta Sadhukhan)
Date: Mon, 3 Mar 2025 08:20:40 GMT
Subject: RFR: 8350924: javax/swing/JMenu/4213634/bug4213634.java fails
In-Reply-To:
References:
Message-ID:
On Fri, 28 Feb 2025 08:50:31 GMT, Prasanta Sadhukhan wrote:
> Test fails in ubuntu OCI system..Made it more robust my adding waitForIdle/delay before commencing test..
> OCI system is ok with the fix.
Fix w.r.t review comments..
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23837#issuecomment-2693587257
From abhiscxk at openjdk.org Mon Mar 3 09:52:53 2025
From: abhiscxk at openjdk.org (Abhishek Kumar)
Date: Mon, 3 Mar 2025 09:52:53 GMT
Subject: RFR: 8286204: [Accessibility, macOS,
VoiceOver] VoiceOver reads the
spinner value 10 as 1 when user iterates to 10 for the first time on macOS
[v2]
In-Reply-To:
References: <8z-zsXaX0i3ZFFD4Q-EvHeiYZTiOPRN_NtjoYYMSS9A=.b08d0f23-81a9-422d-9a64-51d7f85b03a3@github.com>
Message-ID:
On Fri, 28 Feb 2025 18:35:33 GMT, Harshitha Onkar wrote:
> Tested the fix on macOS 15.3.1. The fix works intermittently for me. It announces percentage most of the time and then suddenly just a number.
Ohh.. that's strange. For me, the announcement is always in percentage.
I agree it should be consistent but should be ok as long as it announce the correct value.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23841#issuecomment-2693813039
From abhiscxk at openjdk.org Mon Mar 3 10:02:52 2025
From: abhiscxk at openjdk.org (Abhishek Kumar)
Date: Mon, 3 Mar 2025 10:02:52 GMT
Subject: RFR: 8286204: [Accessibility, macOS,
VoiceOver] VoiceOver reads the
spinner value 10 as 1 when user iterates to 10 for the first time on macOS
[v2]
In-Reply-To:
References: <8z-zsXaX0i3ZFFD4Q-EvHeiYZTiOPRN_NtjoYYMSS9A=.b08d0f23-81a9-422d-9a64-51d7f85b03a3@github.com>
Message-ID:
On Sun, 2 Mar 2025 14:37:48 GMT, Artem Semenov wrote:
> > Since the fix is in Java Component, verified fix with JAWS on windows. I don't see any side effects in announcement. Manual test case is added to verify the fix.
>
> Hello. Was this problem observed on Windows before your changes?
No, this issue observed only on macOS.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23841#issuecomment-2693840800
From abhiscxk at openjdk.org Mon Mar 3 10:05:51 2025
From: abhiscxk at openjdk.org (Abhishek Kumar)
Date: Mon, 3 Mar 2025 10:05:51 GMT
Subject: RFR: 8286204: [Accessibility, macOS,
VoiceOver] VoiceOver reads the
spinner value 10 as 1 when user iterates to 10 for the first time on macOS
[v2]
In-Reply-To:
References: <8z-zsXaX0i3ZFFD4Q-EvHeiYZTiOPRN_NtjoYYMSS9A=.b08d0f23-81a9-422d-9a64-51d7f85b03a3@github.com>
Message-ID:
On Fri, 28 Feb 2025 12:37:35 GMT, Abhishek Kumar wrote:
>> VoiceOver is unable to announce the correct value for spinner. For JSpinner with maximum value of more than 10, VO announce 10 as 1, 20 as 2 and so on. Probable reason is the "ACCESSIBLE_TEXT_PROPERTY" fired by accessible JTextComponent that leads to wrong range value invoked for accessibility API by VO.
>> Workaround fix is to ensure "ACCESSIBLE_TEXT_PROPOERTY" is not fired in case of JSpinner with numeric values.
>>
>> Since the fix is in Java Component, verified fix with JAWS on windows. I don't see any side effects in announcement.
>> Manual test case is added to verify the fix.
>>
>> CI pipeline testing is ok for the proposed fix.
>
> Abhishek Kumar has updated the pull request incrementally with three additional commits since the last revision:
>
> - space fix
> - whitespace fix
> - Copyright year update and manual test case added
> > Since the fix is in Java Component, verified fix with JAWS on windows. I don't see any side effects in announcement. Manual test case is added to verify the fix.
>
> If this error affects only macOS, try looking for a solution somewhere in `src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/SpinboxAccessibility.m`.
Probable fix is related to the `Text Component` of a spinner and I didn't get any fix in SpinboxAccessibility.m. I can try to push the fix to macOS related class (which won't impact the Windows announcements).
Will update the PR after testing it.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23841#issuecomment-2693848852
From asemenov at openjdk.org Mon Mar 3 10:18:58 2025
From: asemenov at openjdk.org (Artem Semenov)
Date: Mon, 3 Mar 2025 10:18:58 GMT
Subject: RFR: 8286204: [Accessibility, macOS,
VoiceOver] VoiceOver reads the
spinner value 10 as 1 when user iterates to 10 for the first time on macOS
[v2]
In-Reply-To:
References: <8z-zsXaX0i3ZFFD4Q-EvHeiYZTiOPRN_NtjoYYMSS9A=.b08d0f23-81a9-422d-9a64-51d7f85b03a3@github.com>
Message-ID:
On Mon, 3 Mar 2025 10:00:20 GMT, Abhishek Kumar wrote:
> > > Since the fix is in Java Component, verified fix with JAWS on windows. I don't see any side effects in announcement. Manual test case is added to verify the fix.
> >
> >
> > Hello. Was this problem observed on Windows before your changes?
>
> No, this issue observed only on macOS.
Then try to modify the solution so that it also affects only macOS?
Try to debug the native implementation of NSAccessibilityElements? The error might be somewhere there.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23841#issuecomment-2693883161
From asemenov at openjdk.org Mon Mar 3 10:22:52 2025
From: asemenov at openjdk.org (Artem Semenov)
Date: Mon, 3 Mar 2025 10:22:52 GMT
Subject: RFR: 8286204: [Accessibility, macOS,
VoiceOver] VoiceOver reads the
spinner value 10 as 1 when user iterates to 10 for the first time on macOS
[v2]
In-Reply-To:
References: <8z-zsXaX0i3ZFFD4Q-EvHeiYZTiOPRN_NtjoYYMSS9A=.b08d0f23-81a9-422d-9a64-51d7f85b03a3@github.com>
Message-ID:
On Mon, 3 Mar 2025 10:03:19 GMT, Abhishek Kumar wrote:
> > > Since the fix is in Java Component, verified fix with JAWS on windows. I don't see any side effects in announcement. Manual test case is added to verify the fix.
> >
> >
> > If this error affects only macOS, try looking for a solution somewhere in `src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/SpinboxAccessibility.m`.
>
> Probable fix is related to the `Text Component` of a spinner and I didn't get any fix in SpinboxAccessibility.m. I can try to push the fix to macOS related class (which won't impact the Windows announcements). Will update the PR after testing it.
Many accessibility elements in macOS have native implementations? while others are implemented using a single universal component
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23841#issuecomment-2693893260
From abhiscxk at openjdk.org Mon Mar 3 12:11:30 2025
From: abhiscxk at openjdk.org (Abhishek Kumar)
Date: Mon, 3 Mar 2025 12:11:30 GMT
Subject: RFR: 8286204: [Accessibility, macOS,
VoiceOver] VoiceOver reads the
spinner value 10 as 1 when user iterates to 10 for the first time on macOS
[v3]
In-Reply-To: <8z-zsXaX0i3ZFFD4Q-EvHeiYZTiOPRN_NtjoYYMSS9A=.b08d0f23-81a9-422d-9a64-51d7f85b03a3@github.com>
References: <8z-zsXaX0i3ZFFD4Q-EvHeiYZTiOPRN_NtjoYYMSS9A=.b08d0f23-81a9-422d-9a64-51d7f85b03a3@github.com>
Message-ID:
> VoiceOver is unable to announce the correct value for spinner. For JSpinner with maximum value of more than 10, VO announce 10 as 1, 20 as 2 and so on. Probable reason is the "ACCESSIBLE_TEXT_PROPERTY" fired by accessible JTextComponent that leads to wrong range value invoked for accessibility API by VO.
> Workaround fix is to ensure "ACCESSIBLE_TEXT_PROPOERTY" is not fired in case of JSpinner with numeric values.
>
> Since the fix is in Java Component, verified fix with JAWS on windows. I don't see any side effects in announcement.
> Manual test case is added to verify the fix.
>
> CI pipeline testing is ok for the proposed fix.
Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
Fix pushed to mac os specific class
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23841/files
- new: https://git.openjdk.org/jdk/pull/23841/files/dec1c007..fa581c2b
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23841&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23841&range=01-02
Stats: 14 lines in 3 files changed: 5 ins; 4 del; 5 mod
Patch: https://git.openjdk.org/jdk/pull/23841.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23841/head:pull/23841
PR: https://git.openjdk.org/jdk/pull/23841
From abhiscxk at openjdk.org Mon Mar 3 12:11:31 2025
From: abhiscxk at openjdk.org (Abhishek Kumar)
Date: Mon, 3 Mar 2025 12:11:31 GMT
Subject: RFR: 8286204: [Accessibility, macOS,
VoiceOver] VoiceOver reads the
spinner value 10 as 1 when user iterates to 10 for the first time on macOS
[v2]
In-Reply-To:
References: <8z-zsXaX0i3ZFFD4Q-EvHeiYZTiOPRN_NtjoYYMSS9A=.b08d0f23-81a9-422d-9a64-51d7f85b03a3@github.com>
Message-ID:
On Mon, 3 Mar 2025 10:19:53 GMT, Artem Semenov wrote:
> > > > Since the fix is in Java Component, verified fix with JAWS on windows. I don't see any side effects in announcement. Manual test case is added to verify the fix.
> > >
> > >
> > > If this error affects only macOS, try looking for a solution somewhere in `src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/SpinboxAccessibility.m`.
> >
> >
> > Probable fix is related to the `Text Component` of a spinner and I didn't get any fix in SpinboxAccessibility.m. I can try to push the fix to macOS related class (which won't impact the Windows announcements). Will update the PR after testing it.
>
> Many accessibility elements in macOS have native implementations? while others are implemented using a single universal component
Pushed fix to `src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java` to have no impact on windows. VO announcements seems correct with the latest changes.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23841#issuecomment-2694112910
From asemenov at openjdk.org Mon Mar 3 14:21:53 2025
From: asemenov at openjdk.org (Artem Semenov)
Date: Mon, 3 Mar 2025 14:21:53 GMT
Subject: RFR: 8286204: [Accessibility, macOS,
VoiceOver] VoiceOver reads the
spinner value 10 as 1 when user iterates to 10 for the first time on macOS
[v3]
In-Reply-To:
References: <8z-zsXaX0i3ZFFD4Q-EvHeiYZTiOPRN_NtjoYYMSS9A=.b08d0f23-81a9-422d-9a64-51d7f85b03a3@github.com>
Message-ID:
On Mon, 3 Mar 2025 12:11:30 GMT, Abhishek Kumar wrote:
>> VoiceOver is unable to announce the correct value for spinner. For JSpinner with maximum value of more than 10, VO announce 10 as 1, 20 as 2 and so on. Probable reason is the "ACCESSIBLE_TEXT_PROPERTY" fired by accessible JTextComponent that leads to wrong range value invoked for accessibility API by VO.
>> Workaround fix is to ensure "ACCESSIBLE_TEXT_PROPOERTY" is not fired in case of JSpinner with numeric values.
>>
>> Since the fix is in Java Component, verified fix with JAWS on windows. I don't see any side effects in announcement.
>> Manual test case is added to verify the fix.
>>
>> CI pipeline testing is ok for the proposed fix.
>
> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix pushed to mac os specific class
src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java line 127:
> 125: AccessibleContext thisAC = accessible.getAccessibleContext();
> 126: Accessible parentAccessible = thisAC.getAccessibleParent();
> 127: if (!(parentAccessible instanceof JSpinner.NumberEditor)) {
Why do you need all this if the spinner has an accessible role?
```jdk-21.0.6+7/src/java.desktop/share/classes/javax/swing/JSpinner.java```
public AccessibleRole getAccessibleRole() {
return AccessibleRole.SPIN_BOX;
}
Also, there is already getting an a11y parent lower in the code.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23841#discussion_r1977592083
From azvegint at openjdk.org Mon Mar 3 14:36:32 2025
From: azvegint at openjdk.org (Alexander Zvegintsev)
Date: Mon, 3 Mar 2025 14:36:32 GMT
Subject: RFR: 8344892: beans/finder/MethodFinder.findMethod incorrectly
returns null [v2]
In-Reply-To:
References:
Message-ID:
> During the [JDK-8344891 Remove uses of sun.misc.ReflectUtil in java.desktop](https://bugs.openjdk.org/browse/JDK-8344891) it was discovered that `beans/finder/MethodFinder.findMethod' incorrectly returned null if a signature was not in the cache and added it to the cache if it was already there:
>
>
> Method method = CACHE.get(signature);
> return (method == null) ? method : CACHE.create(signature);
>
> This resulted in a [significant drop in performance](https://bugs.openjdk.org/browse/JDK-8350573).
>
> ----
>
> Before ReflectUtil was removed, it worked by coincidence:
>
>
> Method method = CACHE.get(signature);
> return (method == null) || isPackageAccessible(method.getDeclaringClass()) ? method : CACHE.create(signature);
>
>
>
>
> 1. `Cache#get` non-obviously creates a value in Cache, this in turn allowed us to avoid the NPE in the `(method == null) || isPackageAccessible(method.getDeclaringClass())` condition
>
>
> https://github.com/openjdk/jdk/blob/d6c4be672f6348f8ed985416ed90d0447f5d5bb3/src/java.desktop/share/classes/com/sun/beans/util/Cache.java#L120-L126
>
> 2. `isPackageAccessible(method.getDeclaringClass())` was evaluated as true
>
> This is how we previously returned the cached value.
>
> ---
>
> So the solution is obvious:
>
>
> Method method = CACHE.get(signature);
> return (method != null) ? method : CACHE.create(signature);
>
>
> Testing is green.
Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision:
return CACHE.get(signature);
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23845/files
- new: https://git.openjdk.org/jdk/pull/23845/files/36546eb6..e6f0f433
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23845&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23845&range=00-01
Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/23845.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23845/head:pull/23845
PR: https://git.openjdk.org/jdk/pull/23845
From azvegint at openjdk.org Mon Mar 3 14:36:32 2025
From: azvegint at openjdk.org (Alexander Zvegintsev)
Date: Mon, 3 Mar 2025 14:36:32 GMT
Subject: RFR: 8344892: beans/finder/MethodFinder.findMethod incorrectly
returns null [v2]
In-Reply-To:
References:
<_HAbLsDWyXBG68JmdP65CDcuha-P0vi3u83HmyPsKNw=.141ba8d0-4082-45ea-bbd3-ab50768ff90e@github.com>
Message-ID:
On Fri, 28 Feb 2025 18:49:58 GMT, Alexey Ivanov wrote:
>> Sorry for my last premature comment.
>>
>> I have looked at `Cache`, and believe `create` should be made protected to indicate it is not intended to be called, but only overridden.
>>
>> The preexisting code called `create` to reuse the creation mechanism without going through the cache - such usage is dubious. Per my experience, similar conditional caches are better implemented by enclosing the logic into the cache structure and use a common endpoint to access, so we have one universal site to determine the conditionality of caching. In this case, such a condition is better included in the `Cache` class itself, and the `create` method should not be publicly exposed.
>
> Yes, I'd prefer `CACHE.get(signature)`.
>
> At the same time, I've got doubts that Alexander has?
>
> Although, strictly speaking, it is not ?implementation dependent? because the `Cache` class is part of OpenJDK, and I think it's reasonable to depend on its implementation.
At this point I changed it to `return CACHE.get(signature)` to fix an obvious bug and go back to the execution path that has been around for years to regain the former performance
The thread safety issue and the get/create logic will be dealt with separately in [JDK-8351043](https://bugs.openjdk.org/browse/JDK-8351043)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23845#discussion_r1977621067
From aivanov at openjdk.org Mon Mar 3 16:24:03 2025
From: aivanov at openjdk.org (Alexey Ivanov)
Date: Mon, 3 Mar 2025 16:24:03 GMT
Subject: RFR: 8344892: beans/finder/MethodFinder.findMethod incorrectly
returns null [v2]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 14:36:32 GMT, Alexander Zvegintsev wrote:
>> During the [JDK-8344891 Remove uses of sun.misc.ReflectUtil in java.desktop](https://bugs.openjdk.org/browse/JDK-8344891) it was discovered that `beans/finder/MethodFinder.findMethod' incorrectly returned null if a signature was not in the cache and added it to the cache if it was already there:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method == null) ? method : CACHE.create(signature);
>>
>> This resulted in a [significant drop in performance](https://bugs.openjdk.org/browse/JDK-8350573).
>>
>> ----
>>
>> Before ReflectUtil was removed, it worked by coincidence:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method == null) || isPackageAccessible(method.getDeclaringClass()) ? method : CACHE.create(signature);
>>
>>
>>
>>
>> 1. `Cache#get` non-obviously creates a value in Cache, this in turn allowed us to avoid the NPE in the `(method == null) || isPackageAccessible(method.getDeclaringClass())` condition
>>
>>
>> https://github.com/openjdk/jdk/blob/d6c4be672f6348f8ed985416ed90d0447f5d5bb3/src/java.desktop/share/classes/com/sun/beans/util/Cache.java#L120-L126
>>
>> 2. `isPackageAccessible(method.getDeclaringClass())` was evaluated as true
>>
>> This is how we previously returned the cached value.
>>
>> ---
>>
>> So the solution is obvious:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method != null) ? method : CACHE.create(signature);
>>
>>
>> Testing is green.
>
> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision:
>
> return CACHE.get(signature);
Looks good to me.
I agree it's better to handle other issues under a separate bug or bugs.
src/java.desktop/share/classes/com/sun/beans/finder/MethodFinder.java line 1:
> 1: /*
Could you update the copyright year?
-------------
Marked as reviewed by aivanov (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/23845#pullrequestreview-2654619166
PR Review Comment: https://git.openjdk.org/jdk/pull/23845#discussion_r1977805251
From azvegint at openjdk.org Mon Mar 3 16:52:04 2025
From: azvegint at openjdk.org (Alexander Zvegintsev)
Date: Mon, 3 Mar 2025 16:52:04 GMT
Subject: RFR: 8344892: beans/finder/MethodFinder.findMethod incorrectly
returns null [v3]
In-Reply-To:
References:
Message-ID:
> During the [JDK-8344891 Remove uses of sun.misc.ReflectUtil in java.desktop](https://bugs.openjdk.org/browse/JDK-8344891) it was discovered that `beans/finder/MethodFinder.findMethod' incorrectly returned null if a signature was not in the cache and added it to the cache if it was already there:
>
>
> Method method = CACHE.get(signature);
> return (method == null) ? method : CACHE.create(signature);
>
> This resulted in a [significant drop in performance](https://bugs.openjdk.org/browse/JDK-8350573).
>
> ----
>
> Before ReflectUtil was removed, it worked by coincidence:
>
>
> Method method = CACHE.get(signature);
> return (method == null) || isPackageAccessible(method.getDeclaringClass()) ? method : CACHE.create(signature);
>
>
>
>
> 1. `Cache#get` non-obviously creates a value in Cache, this in turn allowed us to avoid the NPE in the `(method == null) || isPackageAccessible(method.getDeclaringClass())` condition
>
>
> https://github.com/openjdk/jdk/blob/d6c4be672f6348f8ed985416ed90d0447f5d5bb3/src/java.desktop/share/classes/com/sun/beans/util/Cache.java#L120-L126
>
> 2. `isPackageAccessible(method.getDeclaringClass())` was evaluated as true
>
> This is how we previously returned the cached value.
>
> ---
>
> So the solution is obvious:
>
>
> Method method = CACHE.get(signature);
> return (method != null) ? method : CACHE.create(signature);
>
>
> Testing is green.
Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision:
year update
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23845/files
- new: https://git.openjdk.org/jdk/pull/23845/files/e6f0f433..2afb11ca
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23845&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23845&range=01-02
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/23845.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23845/head:pull/23845
PR: https://git.openjdk.org/jdk/pull/23845
From aivanov at openjdk.org Mon Mar 3 16:52:04 2025
From: aivanov at openjdk.org (Alexey Ivanov)
Date: Mon, 3 Mar 2025 16:52:04 GMT
Subject: RFR: 8344892: beans/finder/MethodFinder.findMethod incorrectly
returns null [v3]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 16:48:50 GMT, Alexander Zvegintsev wrote:
>> During the [JDK-8344891 Remove uses of sun.misc.ReflectUtil in java.desktop](https://bugs.openjdk.org/browse/JDK-8344891) it was discovered that `beans/finder/MethodFinder.findMethod' incorrectly returned null if a signature was not in the cache and added it to the cache if it was already there:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method == null) ? method : CACHE.create(signature);
>>
>> This resulted in a [significant drop in performance](https://bugs.openjdk.org/browse/JDK-8350573).
>>
>> ----
>>
>> Before ReflectUtil was removed, it worked by coincidence:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method == null) || isPackageAccessible(method.getDeclaringClass()) ? method : CACHE.create(signature);
>>
>>
>>
>>
>> 1. `Cache#get` non-obviously creates a value in Cache, this in turn allowed us to avoid the NPE in the `(method == null) || isPackageAccessible(method.getDeclaringClass())` condition
>>
>>
>> https://github.com/openjdk/jdk/blob/d6c4be672f6348f8ed985416ed90d0447f5d5bb3/src/java.desktop/share/classes/com/sun/beans/util/Cache.java#L120-L126
>>
>> 2. `isPackageAccessible(method.getDeclaringClass())` was evaluated as true
>>
>> This is how we previously returned the cached value.
>>
>> ---
>>
>> So the solution is obvious:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method != null) ? method : CACHE.create(signature);
>>
>>
>> Testing is green.
>
> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision:
>
> year update
Marked as reviewed by aivanov (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/23845#pullrequestreview-2654686345
From azvegint at openjdk.org Mon Mar 3 16:52:06 2025
From: azvegint at openjdk.org (Alexander Zvegintsev)
Date: Mon, 3 Mar 2025 16:52:06 GMT
Subject: RFR: 8344892: beans/finder/MethodFinder.findMethod incorrectly
returns null [v2]
In-Reply-To:
References:
Message-ID: <8eUPLMlMNTnV_UVAy1AQWOBmvEirAS4ojEtPpb7ubf0=.9ba7480e-4f2b-4368-a797-69536418db47@github.com>
On Mon, 3 Mar 2025 16:21:00 GMT, Alexey Ivanov wrote:
>> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision:
>>
>> return CACHE.get(signature);
>
> src/java.desktop/share/classes/com/sun/beans/finder/MethodFinder.java line 1:
>
>> 1: /*
>
> Could you update the copyright year?
Sure
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23845#discussion_r1977843018
From serb at openjdk.org Mon Mar 3 16:53:53 2025
From: serb at openjdk.org (Sergey Bylokhov)
Date: Mon, 3 Mar 2025 16:53:53 GMT
Subject: RFR: 8224968: javax/swing/JColorChooser/Test6827032.java times out
in Windows 10
In-Reply-To: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com>
References: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com>
Message-ID:
On Fri, 28 Feb 2025 15:42:51 GMT, Alexey Ivanov wrote:
> **Problem:**
>
> The test hangs intermittently when run on Windows. (In some cases, handling the timeout takes 2 hours.)
>
> Thread dump shows no AWT threads, yet jtreg harness still waits for the test thread to finish, in particular it waits for [`StreamCopier`](https://github.com/openjdk/jtreg/blob/759946dedbafa423552851ecb98bc3bb8dcf30ec/src/share/classes/com/sun/javatest/regtest/exec/ProcessCommand.java#L279-L281). See `threaddump.log` attached to the bug and [my comment](https://bugs.openjdk.org/browse/JDK-8224968?focusedId=14757188&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14757188) for more details.
>
> **Fix, or Workaround:**
>
> Drag mouse for a short while.
>
> In my testing on CI, the `javax/swing/JColorChooser/Test6827032.java` failed on Windows *3 times* out of 6 runs with 20 repeats (`JTREG=REPEAT_COUNT=20`) without the fix.
>
> There have been no failures after the fix in 10 runs with 20 repeats.
Is it possible that this is some kind of deadlock between WToolkit.shutdown, WToolkit.eventLoop, and ApplicationShutdownHooks.runHooks?
The ApplicationShutdownHooks.runHooks waits when the WToolkit.shutdown will be completed, the WToolkit.shutdown waits when the message will be handled and toolkit disposed, WToolkit.eventLoop, for some reason cannot handle that message.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23846#issuecomment-2694996189
From aivanov at openjdk.org Mon Mar 3 17:07:56 2025
From: aivanov at openjdk.org (Alexey Ivanov)
Date: Mon, 3 Mar 2025 17:07:56 GMT
Subject: RFR: 8224968: javax/swing/JColorChooser/Test6827032.java times out
in Windows 10
In-Reply-To:
References: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com>
Message-ID:
On Mon, 3 Mar 2025 16:51:23 GMT, Sergey Bylokhov wrote:
> Is it possible that this is some kind of deadlock between WToolkit.shutdown, WToolkit.eventLoop, and ApplicationShutdownHooks.runHooks?
I can't see any AWT related threads in the thread dump of the hung process.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23846#issuecomment-2695033387
From serb at openjdk.org Mon Mar 3 17:07:56 2025
From: serb at openjdk.org (Sergey Bylokhov)
Date: Mon, 3 Mar 2025 17:07:56 GMT
Subject: RFR: 8350813: Rendering of bulky sound bank from MIDI sequence can
cause OutOfMemoryError
In-Reply-To:
References:
Message-ID:
On Wed, 26 Feb 2025 22:26:48 GMT, Alexander Zuev wrote:
> - Check that the calculated audio data size does not exceed available heap memory before committing to the rendering
> - Add a test case
src/java.desktop/share/classes/com/sun/media/sound/AudioFileSoundbankReader.java line 93:
> 91: }
> 92:
> 93: long maximumHeapSize = Runtime.getRuntime().maxMemory() -
The test program does not contain any "real" large data, so it should not run into an OutOfMemoryError from the start.
Note that after the current patch, the code may still allocate a huge chunk of memory on large systems just by processing a small soundbank which is not good.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23814#discussion_r1977872436
From kizune at openjdk.org Mon Mar 3 17:14:59 2025
From: kizune at openjdk.org (Alexander Zuev)
Date: Mon, 3 Mar 2025 17:14:59 GMT
Subject: RFR: 8286204: [Accessibility, macOS,
VoiceOver] VoiceOver reads the
spinner value 10 as 1 when user iterates to 10 for the first time on macOS
[v3]
In-Reply-To:
References: <8z-zsXaX0i3ZFFD4Q-EvHeiYZTiOPRN_NtjoYYMSS9A=.b08d0f23-81a9-422d-9a64-51d7f85b03a3@github.com>
Message-ID:
On Mon, 3 Mar 2025 12:11:30 GMT, Abhishek Kumar wrote:
>> VoiceOver is unable to announce the correct value for spinner. For JSpinner with maximum value of more than 10, VO announce 10 as 1, 20 as 2 and so on. Probable reason is the "ACCESSIBLE_TEXT_PROPERTY" fired by accessible JTextComponent that leads to wrong range value invoked for accessibility API by VO.
>> Workaround fix is to ensure "ACCESSIBLE_TEXT_PROPOERTY" is not fired in case of JSpinner with numeric values.
>>
>> Since the fix is in Java Component, verified fix with JAWS on windows. I don't see any side effects in announcement.
>> Manual test case is added to verify the fix.
>>
>> CI pipeline testing is ok for the proposed fix.
>
> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix pushed to mac os specific class
The latest version looks good.
-------------
Marked as reviewed by kizune (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/23841#pullrequestreview-2654750633
From aivanov at openjdk.org Mon Mar 3 17:14:59 2025
From: aivanov at openjdk.org (Alexey Ivanov)
Date: Mon, 3 Mar 2025 17:14:59 GMT
Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update
of Built-In ICC_Profiles [v11]
In-Reply-To:
References:
Message-ID:
On Sat, 1 Mar 2025 01:11:45 GMT, Harshitha Onkar wrote:
>> Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance().
>>
>> It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated.
>>
>> With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_
>>
>> There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance.
>>
>> Applications which need a modified version of the ICC Profile should instead do the following:
>>
>>
>> byte[] profileData = ICC_Profile.getData() // get the byte array representation of BuiltIn- profile
>> ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile
>> newProfile.setData() // to modify and customize the profile
>>
>>
>> Following existing tests are modified to update a copy of Built-In profile.
>>
>> - java/awt/color/ICC_Profile/SetHeaderInfo.java
>> - java/awt/color/ICC_ProfileSetNullDataTest.java
>> - sun/java2d/cmm/ProfileOp/SetDataTest.java
>
> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>
> doc update
@mrserb You may want to take a look.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23606#issuecomment-2695049023
From prr at openjdk.org Mon Mar 3 17:28:52 2025
From: prr at openjdk.org (Phil Race)
Date: Mon, 3 Mar 2025 17:28:52 GMT
Subject: RFR: 8224968: javax/swing/JColorChooser/Test6827032.java times out
in Windows 10
In-Reply-To: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com>
References: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com>
Message-ID:
On Fri, 28 Feb 2025 15:42:51 GMT, Alexey Ivanov wrote:
>Drag mouse for a short while.
Why does this help ?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23846#issuecomment-2695080463
From serb at openjdk.org Mon Mar 3 17:33:51 2025
From: serb at openjdk.org (Sergey Bylokhov)
Date: Mon, 3 Mar 2025 17:33:51 GMT
Subject: RFR: 8224968: javax/swing/JColorChooser/Test6827032.java times out
in Windows 10
In-Reply-To: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com>
References: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com>
Message-ID:
On Fri, 28 Feb 2025 15:42:51 GMT, Alexey Ivanov wrote:
> **Problem:**
>
> The test hangs intermittently when run on Windows. (In some cases, handling the timeout takes 2 hours.)
>
> Thread dump shows no AWT threads, yet jtreg harness still waits for the test thread to finish, in particular it waits for [`StreamCopier`](https://github.com/openjdk/jtreg/blob/759946dedbafa423552851ecb98bc3bb8dcf30ec/src/share/classes/com/sun/javatest/regtest/exec/ProcessCommand.java#L279-L281). See `threaddump.log` attached to the bug and [my comment](https://bugs.openjdk.org/browse/JDK-8224968?focusedId=14757188&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14757188) for more details.
>
> **Fix, or Workaround:**
>
> Drag mouse for a short while.
>
> In my testing on CI, the `javax/swing/JColorChooser/Test6827032.java` failed on Windows *3 times* out of 6 runs with 20 repeats (`JTREG=REPEAT_COUNT=20`) without the fix.
>
> There have been no failures after the fix in 10 runs with 20 repeats.
That is from the description of the bug:
jib > at java.lang.ApplicationShutdownHooks.runHooks([java.base at 13-internal](mailto:java.base at 13-internal)/ApplicationShutdownHooks.java:107)
jib > at java.lang.ApplicationShutdownHooks$1.run([java.base at 13-internal](mailto:java.base at 13-internal)/ApplicationShutdownHooks.java:46)
jib > at java.lang.Shutdown.runHooks([java.base at 13-internal](mailto:java.base at 13-internal)/Shutdown.java:130)
jib > at java.lang.Shutdown.exit([java.base at 13-internal](mailto:java.base at 13-internal)/Shutdown.java:174)
jib > - locked <0x00000000ebc91040> (a java.lang.Class for java.lang.Shutdown)
jib > at java.lang.Runtime.exit([java.base at 13-internal](mailto:java.base at 13-internal)/Runtime.java:113)
jib > at java.lang.System.exit([java.base at 13-internal](mailto:java.base at 13-internal)/System.java:1781)
jib > at com.sun.javatest.regtest.agent.AStatus.exit(AStatus.java:199)
jib > at com.sun.javatest.regtest.agent.MainWrapper.main(MainWrapper.java:84)
ib > "AWT-Windows" #17 daemon prio=6 os_prio=0 cpu=119281.25ms elapsed=119.91s tid=0x000001ba2f2e7000 nid=0x1ff0 runnable [0x0000002df5fff000]
jib > java.lang.Thread.State: RUNNABLE
jib > at sun.awt.windows.WToolkit.eventLoop([java.desktop at 13-internal](mailto:java.desktop at 13-internal)/Native Method)
jib > at sun.awt.windows.WToolkit.run([java.desktop at 13-internal](mailto:java.desktop at 13-internal)/WToolkit.java:312)
jib > at java.lang.Thread.run([java.base at 13-internal](mailto:java.base at 13-internal)/Thread.java:830)
jib > "ToolkitShutdown" #18 daemon prio=6 os_prio=0 cpu=0.00ms elapsed=119.24s tid=0x000001ba33531000 nid=0x29ec runnable [0x0000002df71fe000]
jib > java.lang.Thread.State: RUNNABLE
jib > at sun.awt.windows.WToolkit.shutdown([java.desktop at 13-internal](mailto:java.desktop at 13-internal)/Native Method)
jib > at sun.awt.windows.WToolkit$$Lambda$27/0x0000000800bc0840.run([java.desktop at 13-internal](mailto:java.desktop at 13-internal)/Unknown Source)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23846#issuecomment-2695092486
From kizune at openjdk.org Mon Mar 3 17:43:53 2025
From: kizune at openjdk.org (Alexander Zuev)
Date: Mon, 3 Mar 2025 17:43:53 GMT
Subject: RFR: 8350813: Rendering of bulky sound bank from MIDI sequence can
cause OutOfMemoryError
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 17:04:52 GMT, Sergey Bylokhov wrote:
>> - Check that the calculated audio data size does not exceed available heap memory before committing to the rendering
>> - Add a test case
>
> src/java.desktop/share/classes/com/sun/media/sound/AudioFileSoundbankReader.java line 93:
>
>> 91: }
>> 92:
>> 93: long maximumHeapSize = Runtime.getRuntime().maxMemory() -
>
> The test program does not contain any "real" large data, so it should not run into an OutOfMemoryError from the start.
>
> Note that after the current patch, the code may still allocate a huge chunk of memory on large systems just by processing a small soundbank which is not good.
Well, it does contain a valid MIDI sequence that produces 1.9GB sound file - you can try to render it with any MIDI sequencer and will get the same result - the uncompressed WAV file generated with Apple GarageBand is about 2.1GB. That's just how MIDI work.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23814#discussion_r1977921357
From serb at openjdk.org Mon Mar 3 17:44:55 2025
From: serb at openjdk.org (Sergey Bylokhov)
Date: Mon, 3 Mar 2025 17:44:55 GMT
Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update
of Built-In ICC_Profiles [v11]
In-Reply-To:
References:
Message-ID:
On Sat, 1 Mar 2025 01:11:45 GMT, Harshitha Onkar wrote:
>> Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance().
>>
>> It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated.
>>
>> With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_
>>
>> There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance.
>>
>> Applications which need a modified version of the ICC Profile should instead do the following:
>>
>>
>> byte[] profileData = ICC_Profile.getData() // get the byte array representation of BuiltIn- profile
>> ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile
>> newProfile.setData() // to modify and customize the profile
>>
>>
>> Following existing tests are modified to update a copy of Built-In profile.
>>
>> - java/awt/color/ICC_Profile/SetHeaderInfo.java
>> - java/awt/color/ICC_ProfileSetNullDataTest.java
>> - sun/java2d/cmm/ProfileOp/SetDataTest.java
>
> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>
> doc update
src/java.desktop/share/classes/java/awt/color/ICC_Profile.java line 138:
> 136:
> 137: ICC_Profile PYCC = new ICC_Profile(new ProfileDeferralInfo(
> 138: "PYCC.pf", ColorSpace.TYPE_3CLR, 3, CLASS_COLORSPACECONVERSION));
The change in this block will exceed 80 characters per line.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r1977923363
From aivanov at openjdk.org Mon Mar 3 17:50:52 2025
From: aivanov at openjdk.org (Alexey Ivanov)
Date: Mon, 3 Mar 2025 17:50:52 GMT
Subject: RFR: 8224968: javax/swing/JColorChooser/Test6827032.java times out
in Windows 10
In-Reply-To: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com>
References: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com>
Message-ID:
On Fri, 28 Feb 2025 15:42:51 GMT, Alexey Ivanov wrote:
> **Problem:**
>
> The test hangs intermittently when run on Windows. (In some cases, handling the timeout takes 2 hours.)
>
> Thread dump shows no AWT threads, yet jtreg harness still waits for the test thread to finish, in particular it waits for [`StreamCopier`](https://github.com/openjdk/jtreg/blob/759946dedbafa423552851ecb98bc3bb8dcf30ec/src/share/classes/com/sun/javatest/regtest/exec/ProcessCommand.java#L279-L281). See `threaddump.log` attached to the bug and [my comment](https://bugs.openjdk.org/browse/JDK-8224968?focusedId=14757188&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14757188) for more details.
>
> **Fix, or Workaround:**
>
> Drag mouse for a short while.
>
> In my testing on CI, the `javax/swing/JColorChooser/Test6827032.java` failed on Windows *3 times* out of 6 runs with 20 repeats (`JTREG=REPEAT_COUNT=20`) without the fix.
>
> There have been no failures after the fix in 10 runs with 20 repeats.
[JDK-8224968](https://bugs.openjdk.org/browse/JDK-8224968) was filed in 2019. I can't reproduce the same failure that's in description. Over these 6 years many things have changed, so the original problem may be unreproducible any more.
I ran the `javax/swing/JColorChooser/Test6827032.java` test, and it hung. I got the stack traces from the hung process, and there were no AWT threads.
The test isn't problem-listed in LTS releases, that's how I ended up looking at the failure.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23846#issuecomment-2695130155
From serb at openjdk.org Mon Mar 3 17:50:57 2025
From: serb at openjdk.org (Sergey Bylokhov)
Date: Mon, 3 Mar 2025 17:50:57 GMT
Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update
of Built-In ICC_Profiles [v11]
In-Reply-To:
References:
Message-ID:
On Sat, 1 Mar 2025 01:11:45 GMT, Harshitha Onkar wrote:
>> Built-in Profiles are singleton objects and if the user happens to modify this shared profile object via setData() then the modified version of the profile is returned each time the same built-in profile is requested via getInstance().
>>
>> It is good to protect Built-in profiles from such direct modification by adding BuiltIn profile check in `setData()` such that **only copies** of Built-In profiles are allowed to be updated.
>>
>> With the proposed fix, if Built-In profile is updated using `.setData()` it throws _**IAE - "BuiltIn profile cannot be modified"**_
>>
>> There are no restrictions on creating copies of BuiltIn profile and then modifying it, but what is being restricted with this fix is - the direct modification of the shared BuiltIn profile instance.
>>
>> Applications which need a modified version of the ICC Profile should instead do the following:
>>
>>
>> byte[] profileData = ICC_Profile.getData() // get the byte array representation of BuiltIn- profile
>> ICCProfile newProfile = ICC_Profile.getInstance(profileData) // create a new profile
>> newProfile.setData() // to modify and customize the profile
>>
>>
>> Following existing tests are modified to update a copy of Built-In profile.
>>
>> - java/awt/color/ICC_Profile/SetHeaderInfo.java
>> - java/awt/color/ICC_ProfileSetNullDataTest.java
>> - sun/java2d/cmm/ProfileOp/SetDataTest.java
>
> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>
> doc update
src/java.desktop/share/classes/java/awt/color/ICC_Profile.java line 784:
> 782: * Note: {@code ProfileDeferralInfo} is used for only built-in profile
> 783: * creation and all built-in profiles should be constructed using it.
> 784: *
is not necessary here.
src/java.desktop/share/classes/java/awt/color/ICC_Profile.java line 1156:
> 1154: * {@link ColorSpace#CS_sRGB}, {@link ColorSpace#CS_LINEAR_RGB},
> 1155: * {@link ColorSpace#CS_PYCC}, {@link ColorSpace#CS_GRAY} or
> 1156: * {@link ColorSpace#CS_CIEXYZ}.
The standard profile could be acquired by the application via serialization as well, but I'm not sure if we should mention it.
src/java.desktop/share/classes/java/awt/color/ICC_Profile.java line 1169:
> 1167: * @throws IllegalArgumentException if this is a built-in profile for one
> 1168: * of the pre-defined ColorSpaces, i.e. those which can be obtained
> 1169: * by calling {@code ICC_Profile.getInstance(int colorSpaceID)}
can we just ignore it instead and did not use suspicion IllegalArgumentException for correct parameters? or change the type to something unrelated to "..ArgumentException"?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r1977924842
PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r1977928295
PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r1977930093
From serb at openjdk.org Mon Mar 3 17:53:53 2025
From: serb at openjdk.org (Sergey Bylokhov)
Date: Mon, 3 Mar 2025 17:53:53 GMT
Subject: RFR: 8350813: Rendering of bulky sound bank from MIDI sequence can
cause OutOfMemoryError
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 17:41:13 GMT, Alexander Zuev wrote:
>> src/java.desktop/share/classes/com/sun/media/sound/AudioFileSoundbankReader.java line 93:
>>
>>> 91: }
>>> 92:
>>> 93: long maximumHeapSize = Runtime.getRuntime().maxMemory() -
>>
>> The test program does not contain any "real" large data, so it should not run into an OutOfMemoryError from the start.
>>
>> Note that after the current patch, the code may still allocate a huge chunk of memory on large systems just by processing a small soundbank which is not good.
>
> Well, it does contain a valid MIDI sequence that produces 1.9GB sound file - you can try to render it with any MIDI sequencer and will get the same result - the uncompressed WAV file generated with Apple GarageBand is about 2.1GB. That's just how MIDI work.
If the data is correct then you do not need to add any additional checks in front, just proceed it as is and catch OOM. similar to [this](https://github.com/openjdk/jdk/commit/af20c6b9c4a3a21c1e2c7f56721e1077e7d8f388#diff-b92a36346bec4c6f7d5e8921bd69b038e0932f116d627bb4f6b514e670e1fccdR1035).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23814#discussion_r1977934824
From aivanov at openjdk.org Mon Mar 3 18:02:57 2025
From: aivanov at openjdk.org (Alexey Ivanov)
Date: Mon, 3 Mar 2025 18:02:57 GMT
Subject: RFR: 8224968: javax/swing/JColorChooser/Test6827032.java times out
in Windows 10
In-Reply-To:
References: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com>
Message-ID:
On Mon, 3 Mar 2025 17:26:04 GMT, Phil Race wrote:
> > Drag mouse for a short while.
>
> Why does this help ?
Initially I thought the problem was similar to other drag and drop tests where handling timeout takes 2 hours occasionally. There are several cases where `javax/swing/JColorChooser/Test6827032.java` took more than 2 hours.
----------System.out:(1/37)----------
Timeout signalled after 240 seconds
----------System.err:(1/16)----------
STATUS:Passed.
result: Error. Program `?\jdk-17.0.16\bin\java' timed out
(timeout set to 240000ms, elapsed time including timeout handling was 7469797ms).
We've never figured out why it happens.
However, the hang that I reproduced locally looked differently. I thought it could be related to starting secondary event loop for drag and drop? but then I didn't see any AWT threads in the thread dump.
It may be that dragging mouse actually finishes drag and drop? and it makes the test run a little longer.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23846#issuecomment-2695161702
From prr at openjdk.org Mon Mar 3 18:04:07 2025
From: prr at openjdk.org (Phil Race)
Date: Mon, 3 Mar 2025 18:04:07 GMT
Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update
of Built-In ICC_Profiles [v11]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 17:47:57 GMT, Sergey Bylokhov wrote:
>> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>>
>> doc update
>
> src/java.desktop/share/classes/java/awt/color/ICC_Profile.java line 1169:
>
>> 1167: * @throws IllegalArgumentException if this is a built-in profile for one
>> 1168: * of the pre-defined ColorSpaces, i.e. those which can be obtained
>> 1169: * by calling {@code ICC_Profile.getInstance(int colorSpaceID)}
>
> can we just ignore it instead and did not use suspicion IllegalArgumentException for correct parameters? or change the type to something unrelated to "..ArgumentException"?
The silently do nothing option was considered, but if you do that, then you have no easy way of knowing if it worked.
Tests may pass spuriously, or fail later for the wrong reasons. So a worse choice.
And in all my searching of uses of this API it is (1) tests in the JDK itself and (2) a couple of libraries that are targeting specific known profiles with issues and are fixed up - so never applied to built-in profiles.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r1977947820
From kizune at openjdk.org Mon Mar 3 18:04:51 2025
From: kizune at openjdk.org (Alexander Zuev)
Date: Mon, 3 Mar 2025 18:04:51 GMT
Subject: RFR: 8350813: Rendering of bulky sound bank from MIDI sequence can
cause OutOfMemoryError [v2]
In-Reply-To:
References:
Message-ID: <6iJuLvNcGeUG94Ejhab5xpBKCxhAtFKbKeYU1s5kkWo=.3812dae7-482f-4a6f-ae55-cdeab623e792@github.com>
> - Check that the calculated audio data size does not exceed available heap memory before committing to the rendering
> - Add a test case
Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision:
Update test/jdk/javax/sound/midi/BulkSoundBank/BulkSoundBank.java
Use try with resources clause in the test.
Co-authored-by: Harshitha Onkar
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23814/files
- new: https://git.openjdk.org/jdk/pull/23814/files/8a2fa6c1..e48e16a1
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23814&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23814&range=00-01
Stats: 6 lines in 1 file changed: 2 ins; 3 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/23814.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23814/head:pull/23814
PR: https://git.openjdk.org/jdk/pull/23814
From kizune at openjdk.org Mon Mar 3 18:13:55 2025
From: kizune at openjdk.org (Alexander Zuev)
Date: Mon, 3 Mar 2025 18:13:55 GMT
Subject: RFR: 8350813: Rendering of bulky sound bank from MIDI sequence can
cause OutOfMemoryError [v2]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 17:51:36 GMT, Sergey Bylokhov wrote:
>> Well, it does contain a valid MIDI sequence that produces 1.9GB sound file - you can try to render it with any MIDI sequencer and will get the same result - the uncompressed WAV file generated with Apple GarageBand is about 2.1GB. That's just how MIDI work.
>
> If the data is correct then you do not need to add any additional checks in front, just proceed it as is and catch OOM. similar to [this](https://github.com/openjdk/jdk/commit/af20c6b9c4a3a21c1e2c7f56721e1077e7d8f388#diff-b92a36346bec4c6f7d5e8921bd69b038e0932f116d627bb4f6b514e670e1fccdR1035).
That's actually a very bad idea for two reasons:
1. It will consume a lot of resources loading and rendering the sound bank impacting background task that might fail because they do not have enough memory - and that's while we know upfront that we will not be able to finish with the rendering process.
2. It is not advised to continue normal operation after OOME is caught, because at this moment VM might not work reliably unless we can guarantee that memory can be immediately released. For example in the code above we are trying to re-throw OOME as a checked exception - but if we do not have enough heap to instantiate a new IOException - then what? What if some background task already failed because it could not initialize its inner classes? What if that background task is GC? It is commonly advised to catch OOME only as a "fail gracefully" scenario and be ready with pre-initialized output classes to save current state because you might not have enough heap to initialize the emergency shutdown procedure.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23814#discussion_r1977961866
From prr at openjdk.org Mon Mar 3 18:16:16 2025
From: prr at openjdk.org (Phil Race)
Date: Mon, 3 Mar 2025 18:16:16 GMT
Subject: RFR: 8224968: javax/swing/JColorChooser/Test6827032.java times out
in Windows 10
In-Reply-To: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com>
References: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com>
Message-ID:
On Fri, 28 Feb 2025 15:42:51 GMT, Alexey Ivanov wrote:
> **Problem:**
>
> The test hangs intermittently when run on Windows. (In some cases, handling the timeout takes 2 hours.)
>
> Thread dump shows no AWT threads, yet jtreg harness still waits for the test thread to finish, in particular it waits for [`StreamCopier`](https://github.com/openjdk/jtreg/blob/759946dedbafa423552851ecb98bc3bb8dcf30ec/src/share/classes/com/sun/javatest/regtest/exec/ProcessCommand.java#L279-L281). See `threaddump.log` attached to the bug and [my comment](https://bugs.openjdk.org/browse/JDK-8224968?focusedId=14757188&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14757188) for more details.
>
> **Fix, or Workaround:**
>
> Drag mouse for a short while.
>
> In my testing on CI, the `javax/swing/JColorChooser/Test6827032.java` failed on Windows *3 times* out of 6 runs with 20 repeats (`JTREG=REPEAT_COUNT=20`) without the fix.
>
> There have been no failures after the fix in 10 runs with 20 repeats.
>It may be that dragging mouse actually finishes drag and drop? and it makes the test run a little longer.
OK.
-------------
Marked as reviewed by prr (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/23846#pullrequestreview-2654878595
From serb at openjdk.org Mon Mar 3 18:16:16 2025
From: serb at openjdk.org (Sergey Bylokhov)
Date: Mon, 3 Mar 2025 18:16:16 GMT
Subject: RFR: 8224968: javax/swing/JColorChooser/Test6827032.java times out
in Windows 10
In-Reply-To:
References: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com>
Message-ID: <-NhXj9tbsfgwXLypF7JQ2vBVEj_iAjREvSMC2mwLexA=.fbb6a163-a9db-4db7-b3fa-11bae9aa6da7@github.com>
On Mon, 3 Mar 2025 17:47:52 GMT, Alexey Ivanov wrote:
> I ran the `javax/swing/JColorChooser/Test6827032.java` test, and it hung. I got the stack traces from the hung process, and there were no AWT threads.
>
> The test isn't problem-listed in LTS releases, that's how I ended up looking at the failure.
Could it be possible that the different modes used to run the test in the past: ovm vs agent are causing this issue?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23846#issuecomment-2695191688
From honkar at openjdk.org Mon Mar 3 18:18:05 2025
From: honkar at openjdk.org (Harshitha Onkar)
Date: Mon, 3 Mar 2025 18:18:05 GMT
Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update
of Built-In ICC_Profiles [v11]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 17:46:36 GMT, Sergey Bylokhov wrote:
>> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>>
>> doc update
>
> src/java.desktop/share/classes/java/awt/color/ICC_Profile.java line 1156:
>
>> 1154: * {@link ColorSpace#CS_sRGB}, {@link ColorSpace#CS_LINEAR_RGB},
>> 1155: * {@link ColorSpace#CS_PYCC}, {@link ColorSpace#CS_GRAY} or
>> 1156: * {@link ColorSpace#CS_CIEXYZ}.
>
> The standard profile could be acquired by the application via serialization as well, but I'm not sure if we should mention it.
This builtin flag check is exclusively for JDK built-in profiles created within the private interface `BuiltInProfile` and not applicable if an application loads the profile by serialization.
Since `BuiltInProfile` interface and `builtin` flag are private we could not include it in javadoc hence used ICC_Profile.getInstance(int colorspaceID) to specify built-in profile. Please let us know if the javadoc sound okay or requires any changes?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r1977966082
From honkar at openjdk.org Mon Mar 3 18:21:56 2025
From: honkar at openjdk.org (Harshitha Onkar)
Date: Mon, 3 Mar 2025 18:21:56 GMT
Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update
of Built-In ICC_Profiles [v11]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 17:43:44 GMT, Sergey Bylokhov wrote:
>> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision:
>>
>> doc update
>
> src/java.desktop/share/classes/java/awt/color/ICC_Profile.java line 784:
>
>> 782: * Note: {@code ProfileDeferralInfo} is used for only built-in profile
>> 783: * creation and all built-in profiles should be constructed using it.
>> 784: *
>
> is not necessary here.
This note was added based on the suggestion here: https://github.com/openjdk/jdk/pull/23606#discussion_r1976123437
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r1977970353
From honkar at openjdk.org Mon Mar 3 18:30:56 2025
From: honkar at openjdk.org (Harshitha Onkar)
Date: Mon, 3 Mar 2025 18:30:56 GMT
Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update
of Built-In ICC_Profiles [v11]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 18:18:58 GMT, Harshitha Onkar wrote:
>> src/java.desktop/share/classes/java/awt/color/ICC_Profile.java line 784:
>>
>>> 782: * Note: {@code ProfileDeferralInfo} is used for only built-in profile
>>> 783: * creation and all built-in profiles should be constructed using it.
>>> 784: *
>>
>> is not necessary here.
>
> This note was added based on the suggestion here: https://github.com/openjdk/jdk/pull/23606#discussion_r1976123437
Oh you meant `` tag :)
It was not rendered in github comment.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r1977981688
From kizune at openjdk.org Mon Mar 3 18:47:10 2025
From: kizune at openjdk.org (Alexander Zuev)
Date: Mon, 3 Mar 2025 18:47:10 GMT
Subject: RFR: 8350813: Rendering of bulky sound bank from MIDI sequence can
cause OutOfMemoryError [v3]
In-Reply-To:
References:
Message-ID:
> - Check that the calculated audio data size does not exceed available heap memory before committing to the rendering
> - Add a test case
Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision:
Remove extra whitespace
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23814/files
- new: https://git.openjdk.org/jdk/pull/23814/files/e48e16a1..e02c5863
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23814&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23814&range=01-02
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/23814.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23814/head:pull/23814
PR: https://git.openjdk.org/jdk/pull/23814
From serb at openjdk.org Mon Mar 3 18:50:56 2025
From: serb at openjdk.org (Sergey Bylokhov)
Date: Mon, 3 Mar 2025 18:50:56 GMT
Subject: RFR: 8350813: Rendering of bulky sound bank from MIDI sequence can
cause OutOfMemoryError [v3]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 18:11:37 GMT, Alexander Zuev wrote:
>2. It is not advised to continue normal operation after OOME is caught, because at this moment VM might not work reliably unless we can guarantee that memory can be immediately released. For example in the code above we are trying to re-throw OOME as a checked exception - but if we do not have enough heap to instantiate a new IOException - then what?
Then an OOM will be thrown, signaling to the application that it is not possible to proceed?
>What if some background task already failed because it could not initialize its inner classes? What if that background task is GC? It is commonly advised to catch OOME only as a "fail gracefully" scenario and be ready with pre-initialized output classes to save current state because you might not have enough heap to initialize the emergency shutdown procedure.
The current patch will not solve any of these issues, as the check in advance may pass while the code still fails producing an unexpected exception in the application. The try/catch block, at the very least, provides an opportunity for the application to catch the expected IOException instead of fatal OOM and retry or skip this file. That is exact reason why the try/catch was added [here](https://github.com/openjdk/jdk/commit/af20c6b9c4a3a21c1e2c7f56721e1077e7d8f388#diff-b92a36346bec4c6f7d5e8921bd69b038e0932f116d627bb4f6b514e670e1fccdR1035)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23814#discussion_r1978013315
From bpb at openjdk.org Mon Mar 3 18:54:57 2025
From: bpb at openjdk.org (Brian Burkhalter)
Date: Mon, 3 Mar 2025 18:54:57 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v7]
In-Reply-To:
References:
Message-ID:
On Sat, 1 Mar 2025 17:58:44 GMT, Jeremy wrote:
>> src/java.desktop/share/classes/com/sun/imageio/plugins/jpeg/ExifMarkerSegment.java line 182:
>>
>>> 180: // file shows it can also sometimes be 0x60000. I've also observed it to be
>>> 181: // undefined, 0x0007, or several variations of 0x????0006. Similarly the same
>>> 182: // tag should be 0x0001 for TIFFs, but I also observed a case where it as 0x10000.
>>
>> Isn't this ( 0x0001/0x0006 vs 0x1000/0x6000) just a matter of endianness in the TIFF structure? Some odd writers may also use LONG/32 bit values, even though the TiFF and Exif specs only mention SHORT/16 bit values for the compression tag.
>>
>> Compression 7 "New JPEG" is not as per the Exif spec, but it can probably safely be treated the same way as "Old JPEG" compression 6 for Exif thumbnails.
>
> Yes, it probably is endianness, or endianness-related. My first design question is: should we care? Currently this PR infers whether we're looking for a JPEG or TIFF thumbnail based on other fields. If we strictly rely on the compression tag (250) instead: is that better/desirable? (That is: we could just throw an IOException in the rare case this field is missing/broken.)
> Compression 7 "New JPEG" is not as per the Exif spec, but it can probably safely be treated the same way as "Old JPEG" compression 6 for Exif thumbnails.
Probably the `Compression` tag should not be relied upon. While the Exif specification strangely states that for compressed thumbnails its value should be 6, there is no harm in its being 7.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22898#discussion_r1978020479
From bpb at openjdk.org Mon Mar 3 18:59:02 2025
From: bpb at openjdk.org (Brian Burkhalter)
Date: Mon, 3 Mar 2025 18:59:02 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v7]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 18:52:45 GMT, Brian Burkhalter wrote:
>> Yes, it probably is endianness, or endianness-related. My first design question is: should we care? Currently this PR infers whether we're looking for a JPEG or TIFF thumbnail based on other fields. If we strictly rely on the compression tag (250) instead: is that better/desirable? (That is: we could just throw an IOException in the rare case this field is missing/broken.)
>
>> Compression 7 "New JPEG" is not as per the Exif spec, but it can probably safely be treated the same way as "Old JPEG" compression 6 for Exif thumbnails.
>
> Probably the `Compression` tag should not be relied upon. While the Exif specification strangely states that for compressed thumbnails its value should be 6, there is no harm in its being 7.
> Currently this PR infers whether we're looking for a JPEG or TIFF thumbnail based on other fields.
Specifically the `JPEGInterchangeFormat` and `JPEGInterchangeFormatLength` fields. In the Exif 3.0 specification these have support level _mandatory_ for compressed thumbnails and _disallowed_ for uncompressed thumbnails.
> If we strictly rely on the compression tag (250) instead: is that better/desirable?
I don't think so.
> (That is: we could just throw an IOException in the rare case this field is missing/broken.)
This will indeed happen if `JPEGInterchangeFormat` does not point to a valid JPEG stream (SOI marker).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22898#discussion_r1978025262
From serb at openjdk.org Mon Mar 3 19:23:04 2025
From: serb at openjdk.org (Sergey Bylokhov)
Date: Mon, 3 Mar 2025 19:23:04 GMT
Subject: RFR: 8224968: javax/swing/JColorChooser/Test6827032.java times out
in Windows 10
In-Reply-To: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com>
References: <3MCr_BXtTLAnt1pEMH0dW96FXrIMeout345TMUw04Ts=.e0ec91be-0211-4485-8edd-4325c6ed589d@github.com>
Message-ID:
On Fri, 28 Feb 2025 15:42:51 GMT, Alexey Ivanov wrote:
> **Problem:**
>
> The test hangs intermittently when run on Windows. (In some cases, handling the timeout takes 2 hours.)
>
> Thread dump shows no AWT threads, yet jtreg harness still waits for the test thread to finish, in particular it waits for [`StreamCopier`](https://github.com/openjdk/jtreg/blob/759946dedbafa423552851ecb98bc3bb8dcf30ec/src/share/classes/com/sun/javatest/regtest/exec/ProcessCommand.java#L279-L281). See `threaddump.log` attached to the bug and [my comment](https://bugs.openjdk.org/browse/JDK-8224968?focusedId=14757188&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14757188) for more details.
>
> **Fix, or Workaround:**
>
> Drag mouse for a short while.
>
> In my testing on CI, the `javax/swing/JColorChooser/Test6827032.java` failed on Windows *3 times* out of 6 runs with 20 repeats (`JTREG=REPEAT_COUNT=20`) without the fix.
>
> There have been no failures after the fix in 10 runs with 20 repeats.
It looks like the test was updated at some point (see [commit c0084100](https://github.com/openjdk/jdk/commit/c0084100)), as discussed in the PR [#2220](https://github.com/openjdk/jdk/pull/2220). It seems we worked around a product bug by changing the test. It was promised that the bug would be addressed in [JDK-8261016](https://bugs.openjdk.org/browse/JDK-8261016), but it has been closed as "Cannot Reproduce."
I can still reproduce it if that commit is reverted.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23846#issuecomment-2695330926
From bpb at openjdk.org Mon Mar 3 19:27:01 2025
From: bpb at openjdk.org (Brian Burkhalter)
Date: Mon, 3 Mar 2025 19:27:01 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v7]
In-Reply-To:
References:
Message-ID:
On Wed, 26 Feb 2025 09:23:47 GMT, Jeremy wrote:
>> This adds support for parsing thumbnails in an APP1 Exif marker.
>>
>> This builds on an unfinished proposal by Brian Burkhalter (around 2016). In that previous work the only additional meta info he parsed was the image creation time; this PR similarly includes the same property. (I can't speak to why he included that property, but it looks like he has a lot of experience with ImageIO so I trust his judgment.)
>>
>> ~~The test addresses the original images attached to the ticket plus a few extra images I found on my computer that include unusual properties. (Possibly those images are malformed, but if they exist in the wild and other platforms support them then I'd prefer to support them too.)~~
>>
>> The images used in this test are contributed by Brian and me.
>
> Jeremy has updated the pull request incrementally with one additional commit since the last revision:
>
> 8160327: trying to placate PR script
>
> The github script still classifies two of the sample jpgs as executable files, which it classifies as errors.
I think we need to add something to the specification, for example:
--- a/src/java.desktop/share/classes/javax/imageio/metadata/doc-files/jpeg_metadata.html
+++ b/src/java.desktop/share/classes/javax/imageio/metadata/doc-files/jpeg_metadata.html
@@ -509,6 +509,17 @@
+
+Reading Thumbnail Images
+
+Thumbnail images are read from JFIF, JFIF extension, and Exif marker segments.
+One or more thumbnails may be present in the JFIF segment(s), but at most one
+will be present in the Exif segment. As specified, JFIF and Exif marker segments
+should be mutually exclusive, but if they are both present, then any JFIF
+thumbnail(s) will precede any Exif thumbnail.
+
+Writing Thumbnail Images
+
Thumbnails are supported by the use of JFIF and JFIF extension marker segments.
Thumbnails provided on the write methods determine the thumbnails that will be
included. app0JFIF
and app0JFXX
nodes present in
If this is agreeable, I can file a matching CSR.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22898#issuecomment-2695336992
From kcr at openjdk.org Mon Mar 3 19:36:00 2025
From: kcr at openjdk.org (Kevin Rushforth)
Date: Mon, 3 Mar 2025 19:36:00 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v7]
In-Reply-To:
References:
Message-ID:
On Wed, 26 Feb 2025 09:23:47 GMT, Jeremy wrote:
>> This adds support for parsing thumbnails in an APP1 Exif marker.
>>
>> This builds on an unfinished proposal by Brian Burkhalter (around 2016). In that previous work the only additional meta info he parsed was the image creation time; this PR similarly includes the same property. (I can't speak to why he included that property, but it looks like he has a lot of experience with ImageIO so I trust his judgment.)
>>
>> ~~The test addresses the original images attached to the ticket plus a few extra images I found on my computer that include unusual properties. (Possibly those images are malformed, but if they exist in the wild and other platforms support them then I'd prefer to support them too.)~~
>>
>> The images used in this test are contributed by Brian and me.
>
> Jeremy has updated the pull request incrementally with one additional commit since the last revision:
>
> 8160327: trying to placate PR script
>
> The github script still classifies two of the sample jpgs as executable files, which it classifies as errors.
I should add that image files for tests are an exception to the general rule that binary files should not be checked into the repo. Zip files are not.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22898#issuecomment-2695358120
From kcr at openjdk.org Mon Mar 3 19:35:59 2025
From: kcr at openjdk.org (Kevin Rushforth)
Date: Mon, 3 Mar 2025 19:35:59 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v5]
In-Reply-To: <8a8UN_0ztfKz4bQ565qe0XvhIkTdfOkgXbqxdezgVk0=.06e333e9-fd6d-43c6-a6a3-af35ee648ca8@github.com>
References:
<8a8UN_0ztfKz4bQ565qe0XvhIkTdfOkgXbqxdezgVk0=.06e333e9-fd6d-43c6-a6a3-af35ee648ca8@github.com>
Message-ID:
On Mon, 24 Feb 2025 07:09:35 GMT, Jeremy wrote:
> A few questions remain on my end:
>
> 1. The PR bot somehow flagged two of the test jpg files as executables (which it describes as "Errors"). Any recommendations on how to placate this error? (Should I just zip the images together?)
No, please don't do this. All this does is obscure the fact that the zip file contains images. If you need 2 (or 3 or 10) images, place them each in their own file. Skara will note that they exist so that reviewers can check them.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22898#issuecomment-2695354366
From kcr at openjdk.org Mon Mar 3 19:41:53 2025
From: kcr at openjdk.org (Kevin Rushforth)
Date: Mon, 3 Mar 2025 19:41:53 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v5]
In-Reply-To: <8a8UN_0ztfKz4bQ565qe0XvhIkTdfOkgXbqxdezgVk0=.06e333e9-fd6d-43c6-a6a3-af35ee648ca8@github.com>
References:
<8a8UN_0ztfKz4bQ565qe0XvhIkTdfOkgXbqxdezgVk0=.06e333e9-fd6d-43c6-a6a3-af35ee648ca8@github.com>
Message-ID:
On Mon, 24 Feb 2025 07:09:35 GMT, Jeremy wrote:
>> Jeremy has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8160327: replacing the "sony-d700" image
>>
>> The origins of that image were unknown, so we weren't sure if we had the rights to store it in the OpenJDK repo.
>>
>> I couldn't figure out how to create this kind of uncompressed thumbnail from an image editing app, so I spliced this new file together manually in a hex editor using the sony-d700 image as a blueprint.
>
> I think I've finished all the pending edits I had in mind.
>
> Regarding ownership of images:
> One sample image comes from Brian, the rest come from me.
>
> A few questions remain on my end:
>
> 1. The PR bot somehow flagged two of the test jpg files as executables (which it describes as "Errors"). Any recommendations on how to placate this error? (Should I just zip the images together?)
>
> @bplb :
> 2. Do you still think a test case featuring an uncompressed RGB main image with a uncompressed RGB thumbnail is necessary?
>
> I'm not sure off the top of my head how to generate this kind of image. It seems to me like reading any thumbnail is completely insulated from reading the main image, so mixing and matching combinations of main images and thumbnails shouldn't be an issue. (?)
>
> 3. Should I add a test that includes an EXIF thumbnail followed by a JFIF thumbnail? You asked about (and the original ticket included) an image that featured a JFIF thumbnail followed by an EXIF thumbnail, and this PR now covers that test case. But I think the JFIF logic is stricter and will probably throw an exception if the EXIF thumbnail appears first.
@mickleness Your source branch is very out of date (more than two months). Can you merge in the latest upstream master?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22898#issuecomment-2695368442
From bpb at openjdk.org Mon Mar 3 20:00:53 2025
From: bpb at openjdk.org (Brian Burkhalter)
Date: Mon, 3 Mar 2025 20:00:53 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v5]
In-Reply-To:
References:
<8a8UN_0ztfKz4bQ565qe0XvhIkTdfOkgXbqxdezgVk0=.06e333e9-fd6d-43c6-a6a3-af35ee648ca8@github.com>
Message-ID: <9FjnBZwyhnRhVJA_cxzIIh5UMOAfLt54bCYYJLA6rpk=.70742367-e548-4ad8-a58d-4c60132b50ae@github.com>
On Mon, 3 Mar 2025 19:38:56 GMT, Kevin Rushforth wrote:
>> I think I've finished all the pending edits I had in mind.
>>
>> Regarding ownership of images:
>> One sample image comes from Brian, the rest come from me.
>>
>> A few questions remain on my end:
>>
>> 1. The PR bot somehow flagged two of the test jpg files as executables (which it describes as "Errors"). Any recommendations on how to placate this error? (Should I just zip the images together?)
>>
>> @bplb :
>> 2. Do you still think a test case featuring an uncompressed RGB main image with a uncompressed RGB thumbnail is necessary?
>>
>> I'm not sure off the top of my head how to generate this kind of image. It seems to me like reading any thumbnail is completely insulated from reading the main image, so mixing and matching combinations of main images and thumbnails shouldn't be an issue. (?)
>>
>> 3. Should I add a test that includes an EXIF thumbnail followed by a JFIF thumbnail? You asked about (and the original ticket included) an image that featured a JFIF thumbnail followed by an EXIF thumbnail, and this PR now covers that test case. But I think the JFIF logic is stricter and will probably throw an exception if the EXIF thumbnail appears first.
>
> @mickleness Your source branch is very out of date (more than two months). Can you merge in the latest upstream master?
Thanks, @kevinrushforth, for the various comments.
@mickleness, the merge should be no problem as, aside from the image archive, the diff from the webrev applies cleanly to the current master and builds without problems.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22898#issuecomment-2695407850
From serb at openjdk.org Mon Mar 3 20:16:58 2025
From: serb at openjdk.org (Sergey Bylokhov)
Date: Mon, 3 Mar 2025 20:16:58 GMT
Subject: RFR: JDK-8346465 : Add a check in setData() to restrict the update
of Built-In ICC_Profiles [v11]
In-Reply-To:
References:
Message-ID: <8jjMYB1Gq6UdQLWUPxUr_VzrFvNDgFXQf4SRlKFX3TA=.974162ad-9f6f-4201-a267-3e5c358003ba@github.com>
On Mon, 3 Mar 2025 18:15:35 GMT, Harshitha Onkar wrote:
> This builtin flag check is exclusively for JDK built-in profiles created within the private interface `BuiltInProfile` and not applicable if an application loads the profile by serialization.
The built-in profiles can be serialized and deserialized, [see](https://github.com/openjdk/jdk/blob/c4b516dfe7c5a5fddd4d9c97a21f5f36bf845646/src/java.desktop/share/classes/java/awt/color/ICC_Profile.java#L1573). This means the application may get a reference to the profile not only via the getInstance(id) method. Therefore, the new spec is not strictly accurate regarding ICC_Profile.getInstance(int colorSpaceID), but I am not sure that we should mention serialisation here.
**Note:**
The new Javadoc for the new private built-in flag is "public" via the serialized form of the class. It probably should be marked as transient, so it will only be set to true when the built-in profile is loaded via serialization. In all other cases, it will be false.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23606#discussion_r1978134779
From serb at openjdk.org Mon Mar 3 20:41:59 2025
From: serb at openjdk.org (Sergey Bylokhov)
Date: Mon, 3 Mar 2025 20:41:59 GMT
Subject: RFR: 8344892: beans/finder/MethodFinder.findMethod incorrectly
returns null [v3]
In-Reply-To:
References:
Message-ID: <4ZREpLZ0cY20tX3DMcqr9r_nzzdaLAfN8f0ha80duko=.446f6d9a-3c89-4d0a-adde-6c42965bf859@github.com>
On Mon, 3 Mar 2025 16:52:04 GMT, Alexander Zvegintsev wrote:
>> During the [JDK-8344891 Remove uses of sun.misc.ReflectUtil in java.desktop](https://bugs.openjdk.org/browse/JDK-8344891) it was discovered that `beans/finder/MethodFinder.findMethod' incorrectly returned null if a signature was not in the cache and added it to the cache if it was already there:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method == null) ? method : CACHE.create(signature);
>>
>> This resulted in a [significant drop in performance](https://bugs.openjdk.org/browse/JDK-8350573).
>>
>> ----
>>
>> Before ReflectUtil was removed, it worked by coincidence:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method == null) || isPackageAccessible(method.getDeclaringClass()) ? method : CACHE.create(signature);
>>
>>
>>
>>
>> 1. `Cache#get` non-obviously creates a value in Cache, this in turn allowed us to avoid the NPE in the `(method == null) || isPackageAccessible(method.getDeclaringClass())` condition
>>
>>
>> https://github.com/openjdk/jdk/blob/d6c4be672f6348f8ed985416ed90d0447f5d5bb3/src/java.desktop/share/classes/com/sun/beans/util/Cache.java#L120-L126
>>
>> 2. `isPackageAccessible(method.getDeclaringClass())` was evaluated as true
>>
>> This is how we previously returned the cached value.
>>
>> ---
>>
>> So the solution is obvious:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method != null) ? method : CACHE.create(signature);
>>
>>
>> Testing is green.
>
> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision:
>
> year update
src/java.desktop/share/classes/com/sun/beans/finder/MethodFinder.java line 80:
> 78:
> 79: try {
> 80: return CACHE.get(signature);
Is it possible to create a test for this patch?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23845#discussion_r1978162593
From duke at openjdk.org Mon Mar 3 21:13:18 2025
From: duke at openjdk.org (Jeremy)
Date: Mon, 3 Mar 2025 21:13:18 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v8]
In-Reply-To:
References:
Message-ID:
> This adds support for parsing thumbnails in an APP1 Exif marker.
>
> This builds on an unfinished proposal by Brian Burkhalter (around 2016). In that previous work the only additional meta info he parsed was the image creation time; this PR similarly includes the same property. (I can't speak to why he included that property, but it looks like he has a lot of experience with ImageIO so I trust his judgment.)
>
> ~~The test addresses the original images attached to the ticket plus a few extra images I found on my computer that include unusual properties. (Possibly those images are malformed, but if they exist in the wild and other platforms support them then I'd prefer to support them too.)~~
>
> The images used in this test are contributed by Brian and me.
Jeremy 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 31 additional commits since the last revision:
- Merge branch 'master' into JDK-8160327
- Merge branch 'openjdk:master' into master
- Revert "8160327: trying to placate PR script"
This reverts commit 52cf81f49a61d80c473b69e4a504eeb1d03c38a3.
- 8160327: trying to placate PR script
The github script still classifies two of the sample jpgs as executable files, which it classifies as errors.
- 8160327: trying to placate PR script
Some github script is concluding:
```
Errors
?? Executable files are not allowed (file: test/jdk/javax/imageio/plugins/jpeg/JpegExifThumbnail/jfif_and_exif.jpg)
?? Executable files are not allowed (file: test/jdk/javax/imageio/plugins/jpeg/JpegExifThumbnail/malicious_looping_IFD.jpg)
```
I'm trying to figure what separates these files from the other JPGs. Maybe I need to use hyphens instead of underscores...? Let's check.
- 8160327: replacing the "sony-d700" image
The origins of that image were unknown, so we weren't sure if we had the rights to store it in the OpenJDK repo.
I couldn't figure out how to create this kind of uncompressed thumbnail from an image editing app, so I spliced this new file together manually in a hex editor using the sony-d700 image as a blueprint.
- 8160327: fix looping ImageFileDirectory vulnerability
There was a `while` loop that someone could exploit to loop infinitely. Now we read exactly 2 iterations and stop.
- 8160327: remove bug ID from image file names
Now the bug ID is mentioned in their parent directory name.
This is in response to:
https://github.com/openjdk/jdk/pull/22898#issuecomment-2675396159
- 8160327: replace image of unknown origin with my own image
- 8160327: alphabetize imports
This is in response to:
https://github.com/openjdk/jdk/pull/22898#discussion_r1956718373
- ... and 21 more: https://git.openjdk.org/jdk/compare/5c43b70e...b70b0802
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/22898/files
- new: https://git.openjdk.org/jdk/pull/22898/files/52cf81f4..b70b0802
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=22898&range=07
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=22898&range=06-07
Stats: 252503 lines in 5866 files changed: 122075 ins; 103730 del; 26698 mod
Patch: https://git.openjdk.org/jdk/pull/22898.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22898/head:pull/22898
PR: https://git.openjdk.org/jdk/pull/22898
From kcr at openjdk.org Mon Mar 3 21:17:07 2025
From: kcr at openjdk.org (Kevin Rushforth)
Date: Mon, 3 Mar 2025 21:17:07 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v8]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 21:13:18 GMT, Jeremy wrote:
>> This adds support for parsing thumbnails in an APP1 Exif marker.
>>
>> This builds on an unfinished proposal by Brian Burkhalter (around 2016). In that previous work the only additional meta info he parsed was the image creation time; this PR similarly includes the same property. (I can't speak to why he included that property, but it looks like he has a lot of experience with ImageIO so I trust his judgment.)
>>
>> ~~The test addresses the original images attached to the ticket plus a few extra images I found on my computer that include unusual properties. (Possibly those images are malformed, but if they exist in the wild and other platforms support them then I'd prefer to support them too.)~~
>>
>> The images used in this test are contributed by Brian and me.
>
> Jeremy 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 31 additional commits since the last revision:
>
> - Merge branch 'master' into JDK-8160327
> - Merge branch 'openjdk:master' into master
> - Revert "8160327: trying to placate PR script"
>
> This reverts commit 52cf81f49a61d80c473b69e4a504eeb1d03c38a3.
> - 8160327: trying to placate PR script
>
> The github script still classifies two of the sample jpgs as executable files, which it classifies as errors.
> - 8160327: trying to placate PR script
>
> Some github script is concluding:
> ```
> Errors
> ?? Executable files are not allowed (file: test/jdk/javax/imageio/plugins/jpeg/JpegExifThumbnail/jfif_and_exif.jpg)
> ?? Executable files are not allowed (file: test/jdk/javax/imageio/plugins/jpeg/JpegExifThumbnail/malicious_looping_IFD.jpg)
> ```
>
> I'm trying to figure what separates these files from the other JPGs. Maybe I need to use hyphens instead of underscores...? Let's check.
> - 8160327: replacing the "sony-d700" image
>
> The origins of that image were unknown, so we weren't sure if we had the rights to store it in the OpenJDK repo.
>
> I couldn't figure out how to create this kind of uncompressed thumbnail from an image editing app, so I spliced this new file together manually in a hex editor using the sony-d700 image as a blueprint.
> - 8160327: fix looping ImageFileDirectory vulnerability
>
> There was a `while` loop that someone could exploit to loop infinitely. Now we read exactly 2 iterations and stop.
> - 8160327: remove bug ID from image file names
>
> Now the bug ID is mentioned in their parent directory name.
>
> This is in response to:
> https://github.com/openjdk/jdk/pull/22898#issuecomment-2675396159
> - 8160327: replace image of unknown origin with my own image
> - 8160327: alphabetize imports
>
> This is in response to:
> https://github.com/openjdk/jdk/pull/22898#discussion_r1956718373
> - ... and 21 more: https://git.openjdk.org/jdk/compare/caf53b2e...b70b0802
Btw, two of the files are executable. To fix this: `chmod 644 file [file ...]` and then commit the change in file permission.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22898#issuecomment-2695550383
From prr at openjdk.org Mon Mar 3 21:21:53 2025
From: prr at openjdk.org (Phil Race)
Date: Mon, 3 Mar 2025 21:21:53 GMT
Subject: RFR: 8280991: [XWayland] No displayChanged event after
setDisplayMode call [v2]
In-Reply-To:
References:
Message-ID:
On Tue, 25 Feb 2025 16:40:37 GMT, Alexander Zvegintsev wrote:
>> Wayland clients are by design not allowed to change the resolution in Wayland.
>> XRandR in Xwayland is just an emulation, it doesn't actually change the desktop resolution. This emulation is per window/x11 client, so different clients can have different emulated resolutions at the same time.
>>
>> Any request to get the current display mode from the system will always return the original screen resolution, even if we are in emulated resolution.
>> So with this fix, we store the last display mode set so that we can react correctly to the displayChanged event later.
>>
>> ---
>>
>> There are two system side fixes related to this issue, which causes missing ConfigureNotify events to be emitted when an emulated resolution change occurs:
>>
>> 1. https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/731 - emits when the resolution changes to an emulated one
>> 2. https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/890 - emits when the resolution changes to a native one
>>
>> The second one is only available in GnomeShell 43+ (e.g. Ubuntu 22.10+), so one of the tests is excluded for versions below that.
>>
>> ---
>>
>> Testing looks good (manual + automated).
>
> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision:
>
> NoResizeEventOnDMChangeTest update
What about, if we are on Wayland, behave the same in single-screen as you say happens any way with multi-screen - report only one resolution - the current / default one ?
I suggest this in part because I am not sure what the impact is of having the resolution be "emulated". If the app, and AWT think there's a different resolution than there really is, rendering quality could be affected.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23774#issuecomment-2695568318
From serb at openjdk.org Mon Mar 3 21:31:02 2025
From: serb at openjdk.org (Sergey Bylokhov)
Date: Mon, 3 Mar 2025 21:31:02 GMT
Subject: RFR: 8344892: beans/finder/MethodFinder.findMethod incorrectly
returns null [v3]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 16:52:04 GMT, Alexander Zvegintsev wrote:
>> During the [JDK-8344891 Remove uses of sun.misc.ReflectUtil in java.desktop](https://bugs.openjdk.org/browse/JDK-8344891) it was discovered that `beans/finder/MethodFinder.findMethod' incorrectly returned null if a signature was not in the cache and added it to the cache if it was already there:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method == null) ? method : CACHE.create(signature);
>>
>> This resulted in a [significant drop in performance](https://bugs.openjdk.org/browse/JDK-8350573).
>>
>> ----
>>
>> Before ReflectUtil was removed, it worked by coincidence:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method == null) || isPackageAccessible(method.getDeclaringClass()) ? method : CACHE.create(signature);
>>
>>
>>
>>
>> 1. `Cache#get` non-obviously creates a value in Cache, this in turn allowed us to avoid the NPE in the `(method == null) || isPackageAccessible(method.getDeclaringClass())` condition
>>
>>
>> https://github.com/openjdk/jdk/blob/d6c4be672f6348f8ed985416ed90d0447f5d5bb3/src/java.desktop/share/classes/com/sun/beans/util/Cache.java#L120-L126
>>
>> 2. `isPackageAccessible(method.getDeclaringClass())` was evaluated as true
>>
>> This is how we previously returned the cached value.
>>
>> ---
>>
>> So the solution is obvious:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method != null) ? method : CACHE.create(signature);
>>
>>
>> Testing is green.
>
> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision:
>
> year update
>Cache#get non-obviously creates a value in Cache
Then why we need to call CACHE.create the second time? Can we just return it as is?
`return CACHE.get(signature);`
I think previously, we couldn't return the cached data as is, since it could be cached by one applet and requested by another. So, in the case of an inaccessible package, we call CACHE.create() and return a duplicate.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23845#issuecomment-2695593424
From serb at openjdk.org Mon Mar 3 21:46:57 2025
From: serb at openjdk.org (Sergey Bylokhov)
Date: Mon, 3 Mar 2025 21:46:57 GMT
Subject: RFR: 8344892: beans/finder/MethodFinder.findMethod incorrectly
returns null [v3]
In-Reply-To:
References:
Message-ID: <4PL3gXkKim-0CCeRe0gfVcS-DS72agDocYd18HEfKtY=.9b766bb9-6453-4ac2-96ac-005f97d69e8e@github.com>
On Mon, 3 Mar 2025 16:52:04 GMT, Alexander Zvegintsev wrote:
>> During the [JDK-8344891 Remove uses of sun.misc.ReflectUtil in java.desktop](https://bugs.openjdk.org/browse/JDK-8344891) it was discovered that `beans/finder/MethodFinder.findMethod' incorrectly returned null if a signature was not in the cache and added it to the cache if it was already there:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method == null) ? method : CACHE.create(signature);
>>
>> This resulted in a [significant drop in performance](https://bugs.openjdk.org/browse/JDK-8350573).
>>
>> ----
>>
>> Before ReflectUtil was removed, it worked by coincidence:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method == null) || isPackageAccessible(method.getDeclaringClass()) ? method : CACHE.create(signature);
>>
>>
>>
>>
>> 1. `Cache#get` non-obviously creates a value in Cache, this in turn allowed us to avoid the NPE in the `(method == null) || isPackageAccessible(method.getDeclaringClass())` condition
>>
>>
>> https://github.com/openjdk/jdk/blob/d6c4be672f6348f8ed985416ed90d0447f5d5bb3/src/java.desktop/share/classes/com/sun/beans/util/Cache.java#L120-L126
>>
>> 2. `isPackageAccessible(method.getDeclaringClass())` was evaluated as true
>>
>> This is how we previously returned the cached value.
>>
>> ---
>>
>> So the solution is obvious:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method != null) ? method : CACHE.create(signature);
>>
>>
>> Testing is green.
>
> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision:
>
> year update
`return (method == null) || isPackageAccessible(method.getDeclaringClass()) ? method : CACHE.create(signature);`
I think the old code should be read as:
- If the method is null, skip the h/w package access check and return.
- If the method is not null, then perform the h/w package access check and duplicate the data if needed.
So, when the usage of isPackageAccessible was deleted, the null check for the method should also have been removed.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23845#issuecomment-2695628234
From duke at openjdk.org Mon Mar 3 22:23:51 2025
From: duke at openjdk.org (Jeremy)
Date: Mon, 3 Mar 2025 22:23:51 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v9]
In-Reply-To:
References:
Message-ID:
> This adds support for parsing thumbnails in an APP1 Exif marker.
>
> This builds on an unfinished proposal by Brian Burkhalter (around 2016). In that previous work the only additional meta info he parsed was the image creation time; this PR similarly includes the same property. (I can't speak to why he included that property, but it looks like he has a lot of experience with ImageIO so I trust his judgment.)
>
> ~~The test addresses the original images attached to the ticket plus a few extra images I found on my computer that include unusual properties. (Possibly those images are malformed, but if they exist in the wild and other platforms support them then I'd prefer to support them too.)~~
>
> The images used in this test are contributed by Brian and me.
Jeremy has updated the pull request incrementally with one additional commit since the last revision:
8160327: trying to placate PR script
This is in response to:
https://github.com/openjdk/jdk/pull/22898#issuecomment-2695550383
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/22898/files
- new: https://git.openjdk.org/jdk/pull/22898/files/b70b0802..84827aca
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=22898&range=08
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=22898&range=07-08
Stats: 0 lines in 2 files changed: 0 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/22898.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22898/head:pull/22898
PR: https://git.openjdk.org/jdk/pull/22898
From bpb at openjdk.org Mon Mar 3 22:42:10 2025
From: bpb at openjdk.org (Brian Burkhalter)
Date: Mon, 3 Mar 2025 22:42:10 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v9]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 22:23:51 GMT, Jeremy wrote:
>> This adds support for parsing thumbnails in an APP1 Exif marker.
>>
>> This builds on an unfinished proposal by Brian Burkhalter (around 2016). In that previous work the only additional meta info he parsed was the image creation time; this PR similarly includes the same property. (I can't speak to why he included that property, but it looks like he has a lot of experience with ImageIO so I trust his judgment.)
>>
>> ~~The test addresses the original images attached to the ticket plus a few extra images I found on my computer that include unusual properties. (Possibly those images are malformed, but if they exist in the wild and other platforms support them then I'd prefer to support them too.)~~
>>
>> The images used in this test are contributed by Brian and me.
>
> Jeremy has updated the pull request incrementally with one additional commit since the last revision:
>
> 8160327: trying to placate PR script
>
> This is in response to:
> https://github.com/openjdk/jdk/pull/22898#issuecomment-2695550383
A local copy of the PR for commit 84827ac built cleanly and all tests in `javax/imageio/plugins/jpeg` passed on macOS-aarch64.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22898#issuecomment-2695728845
From kizune at openjdk.org Mon Mar 3 22:50:56 2025
From: kizune at openjdk.org (Alexander Zuev)
Date: Mon, 3 Mar 2025 22:50:56 GMT
Subject: RFR: 8350813: Rendering of bulky sound bank from MIDI sequence can
cause OutOfMemoryError [v3]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 18:47:54 GMT, Sergey Bylokhov wrote:
> The current patch will not solve any of these issues, as the check in advance may pass while the code still fails producing an unexpected exception in the application.
I am not trying to solve this problem for the reason stated above - i do not think it is a problem that needs to be solved. If we think we have enough memory but (in some corner cases) the processing overhead will eat up more memory than we expected it will take - we will fail with OOME and i'm not trying to mask it and provide some way to handle this situation - because i think it is useless. What i am trying to do - is that if we are sure that we do not have enough memory - do not eat it up causing VM to exhaust all its heap just to prove the obvious point - we can't load this sound bank. That's it - there's nothing more that i'm trying to achieve. We read the MIDI, we parse its timeline, we know how long it will be and we can calculate what amount of memory will be required to render it into a sound bank - if we know we do not have it - issue an exception with a reason. If we think we have enough memory but processing overhead or some background task consumed part of it - we will
have OOME - here or in that background memory-eating process - it does not matter, we will fail.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23814#discussion_r1978349216
From duke at openjdk.org Mon Mar 3 22:51:11 2025
From: duke at openjdk.org (Jeremy)
Date: Mon, 3 Mar 2025 22:51:11 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v8]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 21:14:47 GMT, Kevin Rushforth wrote:
>> Jeremy 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 31 additional commits since the last revision:
>>
>> - Merge branch 'master' into JDK-8160327
>> - Merge branch 'openjdk:master' into master
>> - Revert "8160327: trying to placate PR script"
>>
>> This reverts commit 52cf81f49a61d80c473b69e4a504eeb1d03c38a3.
>> - 8160327: trying to placate PR script
>>
>> The github script still classifies two of the sample jpgs as executable files, which it classifies as errors.
>> - 8160327: trying to placate PR script
>>
>> Some github script is concluding:
>> ```
>> Errors
>> ?? Executable files are not allowed (file: test/jdk/javax/imageio/plugins/jpeg/JpegExifThumbnail/jfif_and_exif.jpg)
>> ?? Executable files are not allowed (file: test/jdk/javax/imageio/plugins/jpeg/JpegExifThumbnail/malicious_looping_IFD.jpg)
>> ```
>>
>> I'm trying to figure what separates these files from the other JPGs. Maybe I need to use hyphens instead of underscores...? Let's check.
>> - 8160327: replacing the "sony-d700" image
>>
>> The origins of that image were unknown, so we weren't sure if we had the rights to store it in the OpenJDK repo.
>>
>> I couldn't figure out how to create this kind of uncompressed thumbnail from an image editing app, so I spliced this new file together manually in a hex editor using the sony-d700 image as a blueprint.
>> - 8160327: fix looping ImageFileDirectory vulnerability
>>
>> There was a `while` loop that someone could exploit to loop infinitely. Now we read exactly 2 iterations and stop.
>> - 8160327: remove bug ID from image file names
>>
>> Now the bug ID is mentioned in their parent directory name.
>>
>> This is in response to:
>> https://github.com/openjdk/jdk/pull/22898#issuecomment-2675396159
>> - 8160327: replace image of unknown origin with my own image
>> - 8160327: alphabetize imports
>>
>> This is in response to:
>> https://github.com/openjdk/jdk/pull/22898#discussion_r1956718373
>> - ... and 21 more: https://git.openjdk.org/jdk/compare/5af1de32...b70b0802
>
> Btw, two of the files are executable. To fix this: `chmod 644 file [file ...]` and then commit the change in file permission.
@kevinrushforth thanks, the executable error doesn't appear now.
I merged and double-checked that all imageio.* tests pass on my M2 Mac.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22898#issuecomment-2695742275
From duke at openjdk.org Mon Mar 3 22:54:54 2025
From: duke at openjdk.org (Jeremy)
Date: Mon, 3 Mar 2025 22:54:54 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v9]
In-Reply-To:
References:
Message-ID: <33Fmr1Ja6N2yaytsRpGO4Hen1bLL_qzQ2UBUzG2wpNg=.5fa56528-32fc-4520-9bf2-5722d8cd2cfa@github.com>
On Mon, 3 Mar 2025 22:23:51 GMT, Jeremy wrote:
>> This adds support for parsing thumbnails in an APP1 Exif marker.
>>
>> This builds on an unfinished proposal by Brian Burkhalter (around 2016). In that previous work the only additional meta info he parsed was the image creation time; this PR similarly includes the same property. (I can't speak to why he included that property, but it looks like he has a lot of experience with ImageIO so I trust his judgment.)
>>
>> ~~The test addresses the original images attached to the ticket plus a few extra images I found on my computer that include unusual properties. (Possibly those images are malformed, but if they exist in the wild and other platforms support them then I'd prefer to support them too.)~~
>>
>> The images used in this test are contributed by Brian and me.
>
> Jeremy has updated the pull request incrementally with one additional commit since the last revision:
>
> 8160327: trying to placate PR script
>
> This is in response to:
> https://github.com/openjdk/jdk/pull/22898#issuecomment-2695550383
Regarding the CSR proposal: that proposal looks accurate to me. I have no experience with CSR proposals/wording.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22898#issuecomment-2695748673
From bpb at openjdk.org Mon Mar 3 22:58:55 2025
From: bpb at openjdk.org (Brian Burkhalter)
Date: Mon, 3 Mar 2025 22:58:55 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v9]
In-Reply-To: <33Fmr1Ja6N2yaytsRpGO4Hen1bLL_qzQ2UBUzG2wpNg=.5fa56528-32fc-4520-9bf2-5722d8cd2cfa@github.com>
References:
<33Fmr1Ja6N2yaytsRpGO4Hen1bLL_qzQ2UBUzG2wpNg=.5fa56528-32fc-4520-9bf2-5722d8cd2cfa@github.com>
Message-ID:
On Mon, 3 Mar 2025 22:52:27 GMT, Jeremy wrote:
> Regarding the CSR proposal: that proposal looks accurate to me. I have no experience with CSR proposals/wording.
If you are agreed on my proposed wording, please include the HTML change in the PR and I will then create and manage the CSR.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22898#issuecomment-2695754262
From duke at openjdk.org Tue Mar 4 01:07:56 2025
From: duke at openjdk.org (Karm Michal Babacek)
Date: Tue, 4 Mar 2025 01:07:56 GMT
Subject: RFR: 8349099: java/awt/Headless/HeadlessMalfunctionTest.java fails
on CI with Compilation error [v2]
In-Reply-To:
References: <5CbDBTxpliQSqOle85ecMWccDowy2E9HbyW-uXJ-fMA=.a7f2fb31-8361-457d-a579-b2f785e9b149@github.com>
Message-ID:
On Sun, 2 Mar 2025 14:21:45 GMT, Karm Michal Babacek wrote:
>> Removed objectweb.asm for bytecode manipulation and uses JEP 484 classfile API.
>>
>> Test passes on Linux amd64 so far:
>>
>> TIME=`date +%s`;
>> mkdir -p test.${TIME}/jdk/JTwork test.${TIME}/jdk/JTreport;
>> jtreg -a -ignore:quiet -w:test.${TIME}/jdk/JTwork -r:test.${TIME}/jdk/JTreport -jdk:/home/karm/workspaceRH/jdk/build/linux-x86_64-server-release/images/graal-builder-jdk/ /home/karm/workspaceRH/jdk/test/jdk/java/awt/Headless/
>>
>> Test results: passed: 15
>
> Karm Michal Babacek has updated the pull request incrementally with one additional commit since the last revision:
>
> Removes HeadlessMalfunctionTest from ProblemList.txt
I've got my aarch64 MacMini building it and I can see that too. Gonna wire it to ci before future contributions.
Output and diagnostic info for process 76543 was saved into 'pid-76543-output.log'
Command line: [/Users/karm/tmp/JENKINS_DEMO_RUN/jdk/build/macosx-aarch64-server-release/images/graal-builder-jdk/bin/java -cp /Users/karm/tmp/JENKINS_DEMO_RUN/jdk/jtreg_results/jdk/JTwork/classes/java/awt/Headless/HeadlessMalfunctionTest.d:/Users/karm/tmp/JENKINS_DEMO_RUN/jdk/test/jdk/java/awt/Headless:/Users/karm/tmp/JENKINS_DEMO_RUN/jdk/jtreg_results/jdk/JTwork/classes/test/lib:/Users/karm/tmp/JENKINS_DEMO_RUN/jdk/test/lib:/Users/karm/tmp/JENKINS_DEMO_RUN/jtreg/build/images/jtreg/lib/javatest.jar:/Users/karm/tmp/JENKINS_DEMO_RUN/jtreg/build/images/jtreg/lib/jtreg.jar --add-opens java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED -javaagent:agent.jar HeadlessMalfunctionTest$Runner ]
[2025-03-03T23:51:31.832863Z] Gathering output for process 76544
[2025-03-03T23:51:31.832992Z] Waiting for completion for process 76544
[2025-03-03T23:51:32.309606Z] Waiting for completion finished for process 76544
Output and diagnostic info for process 76544 was saved into 'pid-76544-output.log'
----------System.err:(29/2012)----------
stdout: [Transforming java.awt.GraphicsEnvironment.
isHeadless removed from java.awt.GraphicsEnvironment.
];
stderr: [WARNING: package jdk.internal.org.objectweb.asm not in java.base
Exception in thread "main" java.lang.NoSuchMethodError: 'boolean java.awt.GraphicsEnvironment.isHeadless()'
at java.desktop/sun.lwawt.macosx.LWCToolkit.(LWCToolkit.java:155)
at java.desktop/sun.awt.PlatformGraphicsInfo.createToolkit(PlatformGraphicsInfo.java:43)
at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:580)
at java.desktop/sun.awt.CGraphicsEnvironment.(CGraphicsEnvironment.java:72)
at java.desktop/sun.awt.PlatformGraphicsInfo.createGE(PlatformGraphicsInfo.java:39)
at java.desktop/java.awt.GraphicsEnvironment$LocalGE.createGE(GraphicsEnvironment.java:89)
at java.desktop/java.awt.GraphicsEnvironment$LocalGE.(GraphicsEnvironment.java:80)
at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:102)
at HeadlessMalfunctionTest$Runner.main(HeadlessMalfunctionTest.java:69)
]
exitValue = 1
I realxed the output matching in the test as the log comes from a different code path on MacOS. Gonna take a look at Windows too...
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23852#issuecomment-2695921133
From duke at openjdk.org Tue Mar 4 03:41:10 2025
From: duke at openjdk.org (Jeremy)
Date: Tue, 4 Mar 2025 03:41:10 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v10]
In-Reply-To:
References:
Message-ID:
> This adds support for parsing thumbnails in an APP1 Exif marker.
>
> This builds on an unfinished proposal by Brian Burkhalter (around 2016). In that previous work the only additional meta info he parsed was the image creation time; this PR similarly includes the same property. (I can't speak to why he included that property, but it looks like he has a lot of experience with ImageIO so I trust his judgment.)
>
> ~~The test addresses the original images attached to the ticket plus a few extra images I found on my computer that include unusual properties. (Possibly those images are malformed, but if they exist in the wild and other platforms support them then I'd prefer to support them too.)~~
>
> The images used in this test are contributed by Brian and me.
Jeremy has updated the pull request incrementally with one additional commit since the last revision:
8160327: adding "Reading Thumbnail Images" for Exif marker changes
This is in response to:
https://github.com/openjdk/jdk/pull/22898#issuecomment-2695754262
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/22898/files
- new: https://git.openjdk.org/jdk/pull/22898/files/84827aca..eb2283c6
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=22898&range=09
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=22898&range=08-09
Stats: 12 lines in 1 file changed: 11 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/22898.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/22898/head:pull/22898
PR: https://git.openjdk.org/jdk/pull/22898
From duke at openjdk.org Tue Mar 4 03:41:11 2025
From: duke at openjdk.org (Jeremy)
Date: Tue, 4 Mar 2025 03:41:11 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v9]
In-Reply-To:
References:
<33Fmr1Ja6N2yaytsRpGO4Hen1bLL_qzQ2UBUzG2wpNg=.5fa56528-32fc-4520-9bf2-5722d8cd2cfa@github.com>
Message-ID:
On Mon, 3 Mar 2025 22:56:10 GMT, Brian Burkhalter wrote:
>> Regarding the CSR proposal: that proposal looks accurate to me. I have no experience with CSR proposals/wording.
>
>> Regarding the CSR proposal: that proposal looks accurate to me. I have no experience with CSR proposals/wording.
>
> If you are agreed on my proposed wording, please include the HTML change in the PR and I will then create and manage the CSR.
@bplb The HTML changes are added.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22898#issuecomment-2696100174
From serb at openjdk.org Tue Mar 4 03:59:51 2025
From: serb at openjdk.org (Sergey Bylokhov)
Date: Tue, 4 Mar 2025 03:59:51 GMT
Subject: RFR: 8350813: Rendering of bulky sound bank from MIDI sequence can
cause OutOfMemoryError [v3]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 22:48:17 GMT, Alexander Zuev wrote:
> I am not trying to solve this problem for the reason stated above - i do not think it is a problem that needs to be solved.
But this issue should be addressed?it's similar to a zip bomb, where small but valid source data can consume a huge amount of memory after processing. To handle this, we should convert a fatal OutOfMemoryError into an IOException, which the application is likely already expecting.
It's unlikely that throwing an IOException will also cause an OOM, since before the new exception is thrown, the GC will clean up, freeing the allocated multi-gigabyte data in this block.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23814#discussion_r1978568070
From serb at openjdk.org Tue Mar 4 04:02:52 2025
From: serb at openjdk.org (Sergey Bylokhov)
Date: Tue, 4 Mar 2025 04:02:52 GMT
Subject: RFR: 8350924: javax/swing/JMenu/4213634/bug4213634.java fails [v2]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 08:20:40 GMT, Prasanta Sadhukhan wrote:
>> Test fails in ubuntu OCI system..Made it more robust my adding waitForIdle/delay before commencing test..
>> OCI system is ok with the fix.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>
> Test fix
Is this bug a regression? Why did it start reproducing only now?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23837#issuecomment-2696132158
From prr at openjdk.org Tue Mar 4 04:35:11 2025
From: prr at openjdk.org (Phil Race)
Date: Tue, 4 Mar 2025 04:35:11 GMT
Subject: RFR: 8350924: javax/swing/JMenu/4213634/bug4213634.java fails [v2]
In-Reply-To:
References:
Message-ID:
On Tue, 4 Mar 2025 04:00:43 GMT, Sergey Bylokhov wrote:
> Is this bug a regression? Why did it start reproducing only now?
I probably should let the fixer answer this, but in JBS I saw a note (maybe not publicly visible) that says
> If we check history of this test failure in mach5 with same Exception we see that it has failed in 11, 17 and now in mainline :
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23837#issuecomment-2696164546
From serb at openjdk.org Tue Mar 4 05:08:52 2025
From: serb at openjdk.org (Sergey Bylokhov)
Date: Tue, 4 Mar 2025 05:08:52 GMT
Subject: RFR: 8344892: beans/finder/MethodFinder.findMethod incorrectly
returns null [v3]
In-Reply-To:
References:
Message-ID: <1HQ5Xhi0TgY-e5lA6euKZGXdao-43c5C3b2qV4I2zSs=.79271be6-b775-4140-baa5-9345551b127f@github.com>
On Mon, 3 Mar 2025 16:52:04 GMT, Alexander Zvegintsev wrote:
>> During the [JDK-8344891 Remove uses of sun.misc.ReflectUtil in java.desktop](https://bugs.openjdk.org/browse/JDK-8344891) it was discovered that `beans/finder/MethodFinder.findMethod' incorrectly returned null if a signature was not in the cache and added it to the cache if it was already there:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method == null) ? method : CACHE.create(signature);
>>
>> This resulted in a [significant drop in performance](https://bugs.openjdk.org/browse/JDK-8350573).
>>
>> ----
>>
>> Before ReflectUtil was removed, it worked by coincidence:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method == null) || isPackageAccessible(method.getDeclaringClass()) ? method : CACHE.create(signature);
>>
>>
>>
>>
>> 1. `Cache#get` non-obviously creates a value in Cache, this in turn allowed us to avoid the NPE in the `(method == null) || isPackageAccessible(method.getDeclaringClass())` condition
>>
>>
>> https://github.com/openjdk/jdk/blob/d6c4be672f6348f8ed985416ed90d0447f5d5bb3/src/java.desktop/share/classes/com/sun/beans/util/Cache.java#L120-L126
>>
>> 2. `isPackageAccessible(method.getDeclaringClass())` was evaluated as true
>>
>> This is how we previously returned the cached value.
>>
>> ---
>>
>> So the solution is obvious:
>>
>>
>> Method method = CACHE.get(signature);
>> return (method != null) ? method : CACHE.create(signature);
>>
>>
>> Testing is green.
>
> Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision:
>
> year update
Marked as reviewed by serb (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/23845#pullrequestreview-2655960125
From abhiscxk at openjdk.org Tue Mar 4 05:29:59 2025
From: abhiscxk at openjdk.org (Abhishek Kumar)
Date: Tue, 4 Mar 2025 05:29:59 GMT
Subject: RFR: 8286204: [Accessibility, macOS,
VoiceOver] VoiceOver reads the
spinner value 10 as 1 when user iterates to 10 for the first time on macOS
[v3]
In-Reply-To:
References: <8z-zsXaX0i3ZFFD4Q-EvHeiYZTiOPRN_NtjoYYMSS9A=.b08d0f23-81a9-422d-9a64-51d7f85b03a3@github.com>
Message-ID: <9vEpIF5dnyDMft4mhtQequEsoPHLUPsRMo_5NPie-80=.a2a0ee14-942e-4e9f-a9cb-2a628bcb6b30@github.com>
On Mon, 3 Mar 2025 14:16:56 GMT, Artem Semenov wrote:
>> Abhishek Kumar has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix pushed to mac os specific class
>
> src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java line 127:
>
>> 125: AccessibleContext thisAC = accessible.getAccessibleContext();
>> 126: Accessible parentAccessible = thisAC.getAccessibleParent();
>> 127: if (!(parentAccessible instanceof JSpinner.NumberEditor)) {
>
> Why do you need all this if the spinner has an accessible role?
> ```jdk-21.0.6+7/src/java.desktop/share/classes/javax/swing/JSpinner.java```
>
> public AccessibleRole getAccessibleRole() {
> return AccessibleRole.SPIN_BOX;
> }
>
> Also, there is already getting an a11y parent lower in the code.
Native spinner and Java spinner is not a similar UI component and the issue lies in the text component of JSpinner. I don't find any probable solution in native side implementation of spin box.
This seems a simple workaround fix for the issue right now.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23841#discussion_r1978644965
From abhiscxk at openjdk.org Tue Mar 4 05:34:57 2025
From: abhiscxk at openjdk.org (Abhishek Kumar)
Date: Tue, 4 Mar 2025 05:34:57 GMT
Subject: RFR: 8286204: [Accessibility, macOS,
VoiceOver] VoiceOver reads the
spinner value 10 as 1 when user iterates to 10 for the first time on macOS
[v2]
In-Reply-To:
References: <8z-zsXaX0i3ZFFD4Q-EvHeiYZTiOPRN_NtjoYYMSS9A=.b08d0f23-81a9-422d-9a64-51d7f85b03a3@github.com>
Message-ID:
On Mon, 3 Mar 2025 10:16:42 GMT, Artem Semenov wrote:
> Try to debug the native implementation of NSAccessibilityElements? The error might be somewhere there.
I posted my analysis in JBS and root caused the issue in a11y `(NSString *)accessibilityStringForRange:(NSRange)range` API in `NavigableTextAccessibility.m` implementation for `Text Component` but the range value invoked by system seems wrong.
So, this is a workaround fix for the issue.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/23841#issuecomment-2696263121
From bpb at openjdk.org Tue Mar 4 05:37:59 2025
From: bpb at openjdk.org (Brian Burkhalter)
Date: Tue, 4 Mar 2025 05:37:59 GMT
Subject: RFR: 8160327: Support for thumbnails present in APP1 marker for
JPEG [v9]
In-Reply-To:
References:
<33Fmr1Ja6N2yaytsRpGO4Hen1bLL_qzQ2UBUzG2wpNg=.5fa56528-32fc-4520-9bf2-5722d8cd2cfa@github.com>
Message-ID:
On Mon, 3 Mar 2025 22:56:10 GMT, Brian Burkhalter wrote:
>> Regarding the CSR proposal: that proposal looks accurate to me. I have no experience with CSR proposals/wording.
>
>> Regarding the CSR proposal: that proposal looks accurate to me. I have no experience with CSR proposals/wording.
>
> If you are agreed on my proposed wording, please include the HTML change in the PR and I will then create and manage the CSR.
> @bplb The HTML changes are added.
Thanks, @mickleness, I will file the CSR tomorrow.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22898#issuecomment-2696267308
From asemenov at openjdk.org Tue Mar 4 05:49:58 2025
From: asemenov at openjdk.org (Artem Semenov)
Date: Tue, 4 Mar 2025 05:49:58 GMT
Subject: RFR: 8286204: [Accessibility, macOS,
VoiceOver] VoiceOver reads the
spinner value 10 as 1 when user iterates to 10 for the first time on macOS
[v3]
In-Reply-To: <9vEpIF5dnyDMft4mhtQequEsoPHLUPsRMo_5NPie-80=.a2a0ee14-942e-4e9f-a9cb-2a628bcb6b30@github.com>
References: <8z-zsXaX0i3ZFFD4Q-EvHeiYZTiOPRN_NtjoYYMSS9A=.b08d0f23-81a9-422d-9a64-51d7f85b03a3@github.com>
<9vEpIF5dnyDMft4mhtQequEsoPHLUPsRMo_5NPie-80=.a2a0ee14-942e-4e9f-a9cb-2a628bcb6b30@github.com>
Message-ID: <6PRBGj0IdZvSvt04LBaGmuvIeP17DwMch0_s2fvJaOM=.159287e3-3f85-4193-a743-7e341354ec16@github.com>
On Tue, 4 Mar 2025 05:27:42 GMT, Abhishek Kumar wrote:
>> src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessible.java line 127:
>>
>>> 125: AccessibleContext thisAC = accessible.getAccessibleContext();
>>> 126: Accessible parentAccessible = thisAC.getAccessibleParent();
>>> 127: if (!(parentAccessible instanceof JSpinner.NumberEditor)) {
>>
>> Why do you need all this if the spinner has an accessible role?
>> ```jdk-21.0.6+7/src/java.desktop/share/classes/javax/swing/JSpinner.java```
>>
>> public AccessibleRole getAccessibleRole() {
>> return AccessibleRole.SPIN_BOX;
>> }
>>
>> Also, there is already getting an a11y parent lower in the code.
>
> Native spinner and Java spinner is not a similar UI component and the issue lies in the text component of JSpinner. I don't find any probable solution in native side implementation of spin box.
>
> This seems a simple workaround fix for the issue right now.
I like this solution, I just ask you to consider replacing the ```instance of``` check with a role comparison?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23841#discussion_r1978668563
From tr at openjdk.org Tue Mar 4 06:36:03 2025
From: tr at openjdk.org (Tejesh R)
Date: Tue, 4 Mar 2025 06:36:03 GMT
Subject: RFR: 8350924: javax/swing/JMenu/4213634/bug4213634.java fails [v2]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 08:20:40 GMT, Prasanta Sadhukhan wrote:
>> Test fails in ubuntu OCI system..Made it more robust my adding waitForIdle/delay before commencing test..
>> OCI system is ok with the fix.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>
> Test fix
test/jdk/javax/swing/JMenu/4213634/bug4213634.java line 40:
> 38: /*
> 39: * @test
> 40: * @key headful
Can you please add the test summary.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23837#discussion_r1978710319
From abhiscxk at openjdk.org Tue Mar 4 06:42:02 2025
From: abhiscxk at openjdk.org (Abhishek Kumar)
Date: Tue, 4 Mar 2025 06:42:02 GMT
Subject: RFR: 8286204: [Accessibility, macOS,
VoiceOver] VoiceOver reads the
spinner value 10 as 1 when user iterates to 10 for the first time on macOS
[v3]
In-Reply-To: <6PRBGj0IdZvSvt04LBaGmuvIeP17DwMch0_s2fvJaOM=.159287e3-3f85-4193-a743-7e341354ec16@github.com>
References: <8z-zsXaX0i3ZFFD4Q-EvHeiYZTiOPRN_NtjoYYMSS9A=.b08d0f23-81a9-422d-9a64-51d7f85b03a3@github.com>
<9vEpIF5dnyDMft4mhtQequEsoPHLUPsRMo_5NPie-80=.a2a0ee14-942e-4e9f-a9cb-2a628bcb6b30@github.com>
<6PRBGj0IdZvSvt04LBaGmuvIeP17DwMch0_s2fvJaOM=.159287e3-3f85-4193-a743-7e341354ec16@github.com>
Message-ID:
On Tue, 4 Mar 2025 05:47:32 GMT, Artem Semenov wrote:
>> Native spinner and Java spinner is not a similar UI component and the issue lies in the text component of JSpinner. I don't find any probable solution in native side implementation of spin box.
>>
>> This seems a simple workaround fix for the issue right now.
>
> I like this solution, I just ask you to consider replacing the ```instance of``` check with a role comparison?
ohh ok... role comparison will not work here because the role is "AccessibleRole.TEXT" and we want to ignore the property change only if the parent is a JSpinner with NumberEditor.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23841#discussion_r1978716578
From tr at openjdk.org Tue Mar 4 06:42:04 2025
From: tr at openjdk.org (Tejesh R)
Date: Tue, 4 Mar 2025 06:42:04 GMT
Subject: RFR: 8350924: javax/swing/JMenu/4213634/bug4213634.java fails [v2]
In-Reply-To:
References:
Message-ID:
On Mon, 3 Mar 2025 08:20:40 GMT, Prasanta Sadhukhan wrote:
>> Test fails in ubuntu OCI system..Made it more robust my adding waitForIdle/delay before commencing test..
>> OCI system is ok with the fix.
>
> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>
> Test fix
test/jdk/javax/swing/JMenu/4213634/bug4213634.java line 81:
> 79: frame.setLocationRelativeTo(null);
> 80: frame.setVisible(true);
> 81: button.requestFocusInWindow();
Since the root cause is unknown and you are trying to make the test more robust, should we add a delay after `frame.setVisible(true);` ? I'm just suspecting request focus failure after `setVisible`.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23837#discussion_r1978716169
From duke at openjdk.org Tue Mar 4 06:57:06 2025
From: duke at openjdk.org (Jeremy)
Date: Tue, 4 Mar 2025 06:57:06 GMT
Subject: RFR: 8351108: ImageIO.write(..) fails with exception when writing JPEG
with IndexColorModel
Message-ID: <9Ndvun3BlY3BQr1AOEkl2P2KxmFUEEMlqb-uSFcTaIU=.b63bd54c-7378-476f-adfe-3252062b78f7@github.com>
Previously ImageTypeSpecifier treated all TYPE_BYTE_INDEXED as if they were opaque.
In this ticket's case: an ImageWriter received the wrong ImageTypeSpecifier and mistakenly indicated it *could* support a BufferedImage. But when the actual BufferedImage arrived (which was translucent), the ImageWriter threw an exception.
Instead:
Now the ImageTypeSpecifier accurately describes the given BufferedImage.
-------------
Commit messages:
- 8351108: images that are TYPE_BYTE_INDEXED can vary in translucency
- 8351108: adding failing unit test from ticket
- Merge branch 'openjdk:master' into master
- Merge branch 'openjdk:master' into master
- Merge pull request #5 from openjdk/master
- Merge pull request #4 from openjdk/master
- Merge pull request #3 from openjdk/master
- Merge pull request #2 from openjdk/master
- Merge pull request #1 from openjdk/master
Changes: https://git.openjdk.org/jdk/pull/23884/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23884&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8351108
Stats: 85 lines in 2 files changed: 84 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/23884.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23884/head:pull/23884
PR: https://git.openjdk.org/jdk/pull/23884
From psadhukhan at openjdk.org Tue Mar 4 07:45:42 2025
From: psadhukhan at openjdk.org (Prasanta Sadhukhan)
Date: Tue, 4 Mar 2025 07:45:42 GMT
Subject: RFR: 8350924: javax/swing/JMenu/4213634/bug4213634.java fails [v3]
In-Reply-To:
References:
Message-ID:
> Test fails in ubuntu OCI system..Made it more robust my adding waitForIdle/delay before commencing test..
> OCI system is ok with the fix.
Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
Add summary
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/23837/files
- new: https://git.openjdk.org/jdk/pull/23837/files/840f59ff..8fa01676
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=23837&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=23837&range=01-02
Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/23837.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23837/head:pull/23837
PR: https://git.openjdk.org/jdk/pull/23837
From psadhukhan at openjdk.org Tue Mar 4 07:45:43 2025
From: psadhukhan at openjdk.org (Prasanta Sadhukhan)
Date: Tue, 4 Mar 2025 07:45:43 GMT
Subject: RFR: 8350924: javax/swing/JMenu/4213634/bug4213634.java fails [v2]
In-Reply-To:
References:
Message-ID: <-MJu4J1IrjAPIL-lFbHALElv73U_5tgZo1FHyW9QAvY=.3ce272bc-a2f7-474b-968c-a6d6164783f0@github.com>
On Tue, 4 Mar 2025 06:33:23 GMT, Tejesh R wrote:
>> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Test fix
>
> test/jdk/javax/swing/JMenu/4213634/bug4213634.java line 40:
>
>> 38: /*
>> 39: * @test
>> 40: * @key headful
>
> Can you please add the test summary.
Added
> test/jdk/javax/swing/JMenu/4213634/bug4213634.java line 81:
>
>> 79: frame.setLocationRelativeTo(null);
>> 80: frame.setVisible(true);
>> 81: button.requestFocusInWindow();
>
> Since the root cause is unknown and you are trying to make the test more robust, should we add a delay after `frame.setVisible(true);` ? I'm just suspecting request focus failure after `setVisible`.
that's why I added waitForIdle/delay after createShowGUI
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23837#discussion_r1978804150
PR Review Comment: https://git.openjdk.org/jdk/pull/23837#discussion_r1978805579
From psadhukhan at openjdk.org Tue Mar 4 07:48:13 2025
From: psadhukhan at openjdk.org (Prasanta Sadhukhan)
Date: Tue, 4 Mar 2025 07:48:13 GMT
Subject: RFR: 8350924: javax/swing/JMenu/4213634/bug4213634.java fails [v2]
In-Reply-To:
References: