From prr at openjdk.java.net Wed Jun 1 04:36:36 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 1 Jun 2022 04:36:36 GMT Subject: RFR: 8287609: Add null-check for tagsArray returned from CTFontCopyAvailableTables In-Reply-To: References: Message-ID: On Tue, 31 May 2022 23:39:09 GMT, Nikita Gubarkov wrote: > `CTFontCopyAvailableTables` can return null, which causes subsequent call to `CFArrayGetCount` to crash with SEGFAULT, just added a null-check. Where do you read it can return null ? https://developer.apple.com/documentation/coretext/1510774-ctfontcopyavailabletables?language=objc says nothing .. ------------- PR: https://git.openjdk.java.net/jdk/pull/8962 From duke at openjdk.java.net Wed Jun 1 04:48:34 2022 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 1 Jun 2022 04:48:34 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v3] In-Reply-To: References: <1-qMJRwjJVXF7BSrl5NCpoR9KMRBirtjJY--Kr6JueU=.e4a087a3-a7bb-4a93-a6ad-4a26954de78e@github.com> Message-ID: On Tue, 31 May 2022 11:30:55 GMT, Alexey Ivanov wrote: > I wonder why the test is Windows-specific if it allows changing Look and Feels. > > The only Look and Feel which ignores the background is Nimbus, other L&Fs on Windows at least paint the yellow and green background. As such, the test can be run on other platforms. > > Was the original bug in Windows Look and Feel? If so, you may want to make it the default L&F. > > The instructions don't mention anything about other Look and Feels. Does the tester have to verify each presented L&F? I think the test was in windows which I might have retained the os type, will check and confirm once. The tester have to verify with each L&F for left margin check. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From psadhukhan at openjdk.java.net Wed Jun 1 05:12:32 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 1 Jun 2022 05:12:32 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF In-Reply-To: References: Message-ID: On Tue, 31 May 2022 08:14:14 GMT, Tejesh R wrote: > The tooltip displays accelerated string along with the toooltip string. The feature is implemented and applicable for Metal Look and Feel only. Hence the test is updated for Metal Look and Feel by hard wiring it in the code. Updated the test from manual to automatic. Changes requested by psadhukhan (Reviewer). test/jdk/javax/swing/JToolTip/bug5047379.java line 54: > 52: > 53: public class bug5047379 { > 54: static volatile boolean isTooltipAdded; This is only set but never checked anywhere.. if it's not needed, it needs to be removed.. ------------- PR: https://git.openjdk.java.net/jdk/pull/8952 From duke at openjdk.java.net Wed Jun 1 05:30:23 2022 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 1 Jun 2022 05:30:23 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v2] In-Reply-To: References: Message-ID: > The tooltip displays accelerated string along with the toooltip string. The feature is implemented and applicable for Metal Look and Feel only. Hence the test is updated for Metal Look and Feel by hard wiring it in the code. Updated the test from manual to automatic. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Removed unused parameter isTooltipAdded ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8952/files - new: https://git.openjdk.java.net/jdk/pull/8952/files/79f2d58f..6d147703 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8952&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8952&range=00-01 Stats: 10 lines in 1 file changed: 0 ins; 10 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8952.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8952/head:pull/8952 PR: https://git.openjdk.java.net/jdk/pull/8952 From duke at openjdk.java.net Wed Jun 1 05:30:24 2022 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 1 Jun 2022 05:30:24 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v2] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 05:07:44 GMT, Prasanta Sadhukhan wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Removed unused parameter isTooltipAdded > > test/jdk/javax/swing/JToolTip/bug5047379.java line 54: > >> 52: >> 53: public class bug5047379 { >> 54: static volatile boolean isTooltipAdded; > > This is only set but never checked anywhere.. if it's not needed, it needs to be removed.. Yeah, removed it. ------------- PR: https://git.openjdk.java.net/jdk/pull/8952 From duke at openjdk.java.net Wed Jun 1 05:35:29 2022 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 1 Jun 2022 05:35:29 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v3] In-Reply-To: References: <1-qMJRwjJVXF7BSrl5NCpoR9KMRBirtjJY--Kr6JueU=.e4a087a3-a7bb-4a93-a6ad-4a26954de78e@github.com> Message-ID: On Wed, 1 Jun 2022 04:45:12 GMT, Tejesh R wrote: > > I wonder why the test is Windows-specific if it allows changing Look and Feels. > > The only Look and Feel which ignores the background is Nimbus, other L&Fs on Windows at least paint the yellow and green background. As such, the test can be run on other platforms. > > Was the original bug in Windows Look and Feel? If so, you may want to make it the default L&F. > > The instructions don't mention anything about other Look and Feels. Does the tester have to verify each presented L&F? > > I think the test was in windows which I might have retained the os type, will check and confirm once. The tester have to verify with each L&F for left margin check. Yeah, it was only for Motif and Windows before, so I have retained it for only windows os. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From duke at openjdk.java.net Wed Jun 1 05:40:29 2022 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 1 Jun 2022 05:40:29 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v3] In-Reply-To: References: <1-qMJRwjJVXF7BSrl5NCpoR9KMRBirtjJY--Kr6JueU=.e4a087a3-a7bb-4a93-a6ad-4a26954de78e@github.com> Message-ID: On Tue, 31 May 2022 11:15:25 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with two additional commits since the last revision: >> >> - Updated based on review comments >> - Added headful key > > test/jdk/javax/swing/JRadioButton/bug4380543.java line 106: > >> 104: >> 105: lookAndFeelMaps.put(sMapKey, sLnF); >> 106: } > > Suggestion: > > for (UIManager.LookAndFeelInfo look : lookAndFeel) { > lookAndFeelMaps.put(look.getName(), look.getClassName()); > } > > > I guess I mentioned it earlier. I think this way is cleaner and more user-friendly: the user will see the name of the Look and Feel rather than part of its class name. > > The local variables `sLnF` and `sMapKey` declared above the look become unnecessary in this case. > > If you use `LinkedHashMap`, the order of the L&Fs will be preserved the map will be iterated for creating the buttons. The reason for doing this was to use the same key for button creation (name of button) and then to link that with the button action, so changing this will affect other logics. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From psadhukhan at openjdk.java.net Wed Jun 1 05:41:34 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 1 Jun 2022 05:41:34 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v2] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 05:30:23 GMT, Tejesh R wrote: >> The tooltip displays accelerated string along with the toooltip string. The feature is implemented and applicable for Metal Look and Feel only. Hence the test is updated for Metal Look and Feel by hard wiring it in the code. Updated the test from manual to automatic. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Removed unused parameter isTooltipAdded Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8952 From duke at openjdk.java.net Wed Jun 1 06:00:34 2022 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 1 Jun 2022 06:00:34 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v4] In-Reply-To: References: Message-ID: > Added test for checking setMargin() of JRadioButton. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on review comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8721/files - new: https://git.openjdk.java.net/jdk/pull/8721/files/3001e8a8..5d4adb7f Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=02-03 Stats: 23 lines in 1 file changed: 0 ins; 6 del; 17 mod Patch: https://git.openjdk.java.net/jdk/pull/8721.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8721/head:pull/8721 PR: https://git.openjdk.java.net/jdk/pull/8721 From duke at openjdk.java.net Wed Jun 1 06:00:36 2022 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 1 Jun 2022 06:00:36 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton In-Reply-To: References: Message-ID: On Tue, 24 May 2022 10:36:09 GMT, Alexey Ivanov wrote: >>> Just an idea for discussion: I remember that we added some support for the manual tests, kind of framework or something. Probably it will be useful to reuse when we add "new" tests? https://bugs.openjdk.java.net/browse/JDK-8283803 >> >> Means you are suggesting to use the passfailFrame? > >> > Just an idea for discussion: I remember that we added some support for the manual tests, kind of framework or something. Probably it will be useful to reuse when we add "new" tests? https://bugs.openjdk.java.net/browse/JDK-8283803 >> >> Means you are suggesting to use the passfailFrame? > > Why not? The framework allows you to re-use the functionality for creating the UI and for handling Pass/Fail buttons instead of creating your own. Updated @aivanov-jdk . ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From aghaisas at openjdk.java.net Wed Jun 1 06:50:32 2022 From: aghaisas at openjdk.java.net (Ajit Ghaisas) Date: Wed, 1 Jun 2022 06:50:32 GMT Subject: RFR: 8287453: RenderPerfTest incorrectly measures performance In-Reply-To: References: Message-ID: On Tue, 31 May 2022 15:28:34 GMT, Alexey Ushakov wrote: > > Is it only a test stabilization fix? or were you able to uncover any performance issue (either with OpenGL or with Metal pipeline) with this change? Can you please provide before/after numbers? > > Initially it was a stabilization fix. However, I've found couple of issues: missing frames (I have minimal test case and here is the issue [JDK-8287600](https://bugs.openjdk.java.net/browse/JDK-8287600) ) and low performance in some test cases comparing with OGL. I've attached the results to this issue. Thanks for providing the performance numbers in JBS and filing the issue for missing frame. Another bug needs to be filed for tests having lower performance with the Metal pipeline as compared to OpenGL pipeline. It's a surprise that the modified RenderPerf test shows considerable performance difference (whereas J2DBench tests show difference only in some cases) ------------- PR: https://git.openjdk.java.net/jdk/pull/8928 From duke at openjdk.java.net Wed Jun 1 08:26:33 2022 From: duke at openjdk.java.net (Nikita Gubarkov) Date: Wed, 1 Jun 2022 08:26:33 GMT Subject: RFR: 8287609: Add null-check for tagsArray returned from CTFontCopyAvailableTables In-Reply-To: References: Message-ID: On Tue, 31 May 2022 23:39:09 GMT, Nikita Gubarkov wrote: > `CTFontCopyAvailableTables` can return null, which causes subsequent call to `CFArrayGetCount` to crash with SEGFAULT, just added a null-check. I didn't find anything in documentation too, but it does return null, I checked with a debugger ------------- PR: https://git.openjdk.java.net/jdk/pull/8962 From smandalika at openjdk.java.net Wed Jun 1 08:37:35 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 1 Jun 2022 08:37:35 GMT Subject: RFR: 8285305: Create an automated test for JDK-4495286 [v3] In-Reply-To: References: Message-ID: On Wed, 18 May 2022 08:20:47 GMT, Srinivas Mandalika wrote: >> Create an automated test for [JDK-4495286](https://bugs.openjdk.java.net/browse/JDK-4495286) >> >> AccessibleJTable.setAccessibleSelction should select rows/cols when cell selection. >> When cell selection is not enabled, there is no way, using >> accessibility, to select rows or columns. It seems logical that selecting a cell >> using accessibility should have the same effect as clicking on a cell with the >> mouse. That is, if row or column selection is enabled, then selecting a cell >> should instead cause the row or column to be selected. >> The proposed test verifies that the above behavior is fixed. >> >> This review is for migrating tests from a closed test suite to open. >> >> Testing: >> The test ran successfully on Mach5 with multiple runs (40) on windows-x64, linux-x64 and macos-x64. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > Review comments fixed: moved the file directly under the a11y folder Hi! Can someone please take a look at this PR and provide their valuable feedback ? ------------- PR: https://git.openjdk.java.net/jdk/pull/8333 From smandalika at openjdk.java.net Wed Jun 1 08:38:48 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 1 Jun 2022 08:38:48 GMT Subject: RFR: 8284524: Create an automated test for JDK-4422362 [v3] In-Reply-To: References: Message-ID: On Wed, 18 May 2022 08:38:49 GMT, Srinivas Mandalika wrote: >> Create an automated test for [JDK-4422362](https://bugs.openjdk.java.net/browse/JDK-4422362) >> >> The BoundedRangeModel components (JScrollBar, JSlider, JProgressBar) return >> BoundedRangeModel.getMaximum() from getMaximumAccessibleValue() in their >> AccessibleValue implementation. >> The real maximum value (due to the constraints on BoundedRangeModel) is >> model.getMaximum() - model.getExtent(). >> >> The test verifies that the above is adhered to as expected. >> >> This review is for migrating tests from a closed test suite to open. >> >> Testing: >> The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > Review Comments Fixed: Fixed File location path. Hi! Can someone please take a look at this PR and provide their valuable feedback ? ------------- PR: https://git.openjdk.java.net/jdk/pull/8158 From smandalika at openjdk.java.net Wed Jun 1 08:38:47 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 1 Jun 2022 08:38:47 GMT Subject: RFR: 8284767: Create an automated test for JDK-4422535 [v3] In-Reply-To: <3rXFVh7JvLK-ycYNRlmK8tTqTpmrs7GuF0lxiaO78kQ=.9f972f36-f57f-4cf1-a2d8-58feba441f71@github.com> References: <3rXFVh7JvLK-ycYNRlmK8tTqTpmrs7GuF0lxiaO78kQ=.9f972f36-f57f-4cf1-a2d8-58feba441f71@github.com> Message-ID: On Wed, 18 May 2022 08:37:03 GMT, Srinivas Mandalika wrote: >> Create an automated test for [JDK-4422535](https://bugs.openjdk.java.net/browse/JDK-4422535) >> AccessibleValue implementation only accept Integers >> The AccessibleValue implementations of the following components: >> >> java.awt.Scrollbar >> javax.swing.AbstractButton >> javax.swing.JInternalFrame >> javax.swing.JSplitPane >> javax.swing.JScrollBar >> javax.swing.JProgressBar >> javax.swing.JSlider >> >> require the argument to setCurrentAccessibleValue(Number) to be an Integer, else they completely ignore it - it returns a false indicating that the value has not been set by the return value, but they cannot know the reason for that). >> >> The test verifies that for each of the above components, the AccessibleValue is set when it is set to a Number (Float, Double, long etc) and not just for an Integer. >> >> his review is for migrating tests from a closed test suite to open. >> >> Testing: >> The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > Review Comments Fixed: Fixed File location path. Hi! Can someone please take a look at this PR and provide their valuable feedback ? ------------- PR: https://git.openjdk.java.net/jdk/pull/8220 From smandalika at openjdk.java.net Wed Jun 1 08:39:40 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 1 Jun 2022 08:39:40 GMT Subject: RFR: 8285373: Create an automated test for JDK-4702233 [v2] In-Reply-To: References: Message-ID: On Fri, 29 Apr 2022 14:11:41 GMT, Srinivas Mandalika wrote: >> Create an automated test for [JDK-4702233](https://bugs.openjdk.java.net/browse/JDK-4702233) >> >> Several new AccessibleRole and AccessibleRelation constants are needed in those classes in the java.accessibility package. These new contants codify additions made in the GNOME, Netscape, and UNO (StarOffice) accessibility APIs. >> StarOffice 6.1 and GNOME accessibility require new role, state and relation >> constants in the javax.accessibility package. The existing constants are >> inadequate for providing accessibility to StarOffice and GNOME applications >> as required by Section 508. >> >> Solution >> -------- >> Define new constants in the javax.accessibility package. >> AccessibleRelation >> AccessibleRoles >> AccessibleState >> AccessibleAction >> AccessibleContext >> >> The test validates the public fields of the above AccessibleConstants. >> >> This review is for migrating tests from a closed test suite to open. >> >> Testing: >> The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > Added missing CopyRight Header Hi! Can someone please take a look at this PR and provide their valuable feedback ? ------------- PR: https://git.openjdk.java.net/jdk/pull/8342 From avu at openjdk.java.net Wed Jun 1 09:48:33 2022 From: avu at openjdk.java.net (Alexey Ushakov) Date: Wed, 1 Jun 2022 09:48:33 GMT Subject: RFR: 8287453: RenderPerfTest incorrectly measures performance In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 06:46:40 GMT, Ajit Ghaisas wrote: > > > Is it only a test stabilization fix? or were you able to uncover any performance issue (either with OpenGL or with Metal pipeline) with this change? Can you please provide before/after numbers? > > > > > > Initially it was a stabilization fix. However, I've found couple of issues: missing frames (I have minimal test case and here is the issue [JDK-8287600](https://bugs.openjdk.java.net/browse/JDK-8287600) ) and low performance in some test cases comparing with OGL. I've attached the results to this issue. > > Thanks for providing the performance numbers in JBS and filing the issue for missing frame. > > Another bug needs to be filed for tests having lower performance with the Metal pipeline as compared to OpenGL pipeline. It's a surprise that the modified RenderPerf test shows considerable performance difference (whereas J2DBench tests show difference only in some cases) Yes, it was a surprise. We've enabled metal in EAP of our IDEs and got some complains about the performance. So, I've decided to revise our measurements. I have fixes for the problems above, but they are not complete yet. (still fighting with some regressions) ------------- PR: https://git.openjdk.java.net/jdk/pull/8928 From avu at openjdk.java.net Wed Jun 1 09:50:51 2022 From: avu at openjdk.java.net (Alexey Ushakov) Date: Wed, 1 Jun 2022 09:50:51 GMT Subject: Integrated: 8287453: RenderPerfTest incorrectly measures performance In-Reply-To: References: Message-ID: On Fri, 27 May 2022 18:58:12 GMT, Alexey Ushakov wrote: > Improved RenderPerfTest: > - removed RenderPerfLCD.java (we have LCD tests in RenderPerfTest.java) > - corrected and simplified test logic > - added timeout on low performant rendering > - used several markers to recover from missing frames > - protected measurements from multiple paint invocations This pull request has now been integrated. Changeset: 48f19e43 Author: Alexey Ushakov URL: https://git.openjdk.java.net/jdk/commit/48f19e43c5ceeed6b8f714fc921566f9260c78db Stats: 478 lines in 4 files changed: 34 ins; 402 del; 42 mod 8287453: RenderPerfTest incorrectly measures performance Reviewed-by: prr ------------- PR: https://git.openjdk.java.net/jdk/pull/8928 From duke at openjdk.java.net Wed Jun 1 10:04:31 2022 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 1 Jun 2022 10:04:31 GMT Subject: RFR: JDK-8287261: [macos] JList Focus Ring color doesn't follow Accent color changes on macOS In-Reply-To: References: Message-ID: On Wed, 25 May 2022 23:40:59 GMT, Harshitha Onkar wrote: > With the proposed fix, JList's focus ring color follows accent color changes. Previously the focus ring for JList was not prominently visible and did not follow accent color changes. > > While investing a similar issue related to JTable (https://github.com/openjdk/jdk/pull/7768#discussion_r839813517), it was observed that List.focusCellHighlightBorder was using the cellFocusRing color as well. This PR extends the focus ring accent color changes to JLists. > > Related issues: [JDK-7124282](https://bugs.openjdk.java.net/browse/JDK-7124282) , [JDK-8261243](https://bugs.openjdk.java.net/browse/JDK-8261243) > > #### Summary of changes > > - focusCellHighlightBorder in `AquaLookAndFeel` changed which is used for cell border for lists and tables > - code related to on-the-fly focus ring color refactored into a separate method (`changeFocusRingColor()`) for re-usability > - `changeFocusRingColor()` called when PropertyChangeEvent == FRAME_ACTIVE_PROPERTY and the frame gains focus, instead of calling in individual `swapSelectionColors` in `AquaFocusHandler.java` > - Common test added - `CellFocusRingTest`, which tests for both cases - Tables & Lists. > > **Before and After screenshots of JList** _(Screenshots from SwingSet2 demo)_ > > ![Screen Shot 2022-05-25 at 3 55 49 PM](https://user-images.githubusercontent.com/95945681/170382727-54ed155b-6f08-4c75-8657-89c15764e1cd.png) test/jdk/javax/swing/JTable/CellFocusRingTest.java line 60: > 58: if (errorLog.isEmpty()) { > 59: System.out.println("Test passed !!"); > 60: } `} else {` Can be in same line. (Applies to other places also) ------------- PR: https://git.openjdk.java.net/jdk/pull/8896 From duke at openjdk.java.net Wed Jun 1 10:11:39 2022 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 1 Jun 2022 10:11:39 GMT Subject: RFR: JDK-8287261: [macos] JList Focus Ring color doesn't follow Accent color changes on macOS In-Reply-To: References: Message-ID: On Wed, 25 May 2022 23:40:59 GMT, Harshitha Onkar wrote: > With the proposed fix, JList's focus ring color follows accent color changes. Previously the focus ring for JList was not prominently visible and did not follow accent color changes. > > While investing a similar issue related to JTable (https://github.com/openjdk/jdk/pull/7768#discussion_r839813517), it was observed that List.focusCellHighlightBorder was using the cellFocusRing color as well. This PR extends the focus ring accent color changes to JLists. > > Related issues: [JDK-7124282](https://bugs.openjdk.java.net/browse/JDK-7124282) , [JDK-8261243](https://bugs.openjdk.java.net/browse/JDK-8261243) > > #### Summary of changes > > - focusCellHighlightBorder in `AquaLookAndFeel` changed which is used for cell border for lists and tables > - code related to on-the-fly focus ring color refactored into a separate method (`changeFocusRingColor()`) for re-usability > - `changeFocusRingColor()` called when PropertyChangeEvent == FRAME_ACTIVE_PROPERTY and the frame gains focus, instead of calling in individual `swapSelectionColors` in `AquaFocusHandler.java` > - Common test added - `CellFocusRingTest`, which tests for both cases - Tables & Lists. > > **Before and After screenshots of JList** _(Screenshots from SwingSet2 demo)_ > > ![Screen Shot 2022-05-25 at 3 55 49 PM](https://user-images.githubusercontent.com/95945681/170382727-54ed155b-6f08-4c75-8657-89c15764e1cd.png) test/jdk/javax/swing/JTable/CellFocusRingTest.java line 85: > 83: } > 84: > 85: if (UIManager.getDefaults().get("CellFocus.color") != null if (UIManager.getDefaults().get("CellFocus.color") != null && UIManager.getDefaults().get("CellFocus.color") instanceof Color) can be changed into if (UIManager.getDefaults().get("CellFocus.color") instanceof Color) Since if the object is null then `instanceof` returns false. ------------- PR: https://git.openjdk.java.net/jdk/pull/8896 From prr at openjdk.java.net Wed Jun 1 15:16:38 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 1 Jun 2022 15:16:38 GMT Subject: RFR: 8287609: macOS: SIGSEGV at [CoreFoundation] CFArrayGetCount / sun.font.CFont.getTableBytesNative In-Reply-To: References: Message-ID: On Tue, 31 May 2022 23:39:09 GMT, Nikita Gubarkov wrote: > `CTFontCopyAvailableTables` can return null, which causes subsequent call to `CFArrayGetCount` to crash with SEGFAULT, just added a null-check. All supported font formats on macOS have such tables, so it must be something else. I don't see how it can fail unless there is something wrong with the CTFont that would have been previously signalled or we have a bad font handle, or there is a bad table entry. There's no way to tell from the stack trace. So this fixes the symptom (temporarily, since it leaves the caller to deal with not being able to get the tables it expects are there) but doesn't explain why it happens. ------------- PR: https://git.openjdk.java.net/jdk/pull/8962 From aivanov at openjdk.java.net Wed Jun 1 16:34:44 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 1 Jun 2022 16:34:44 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v4] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 06:00:34 GMT, Tejesh R wrote: >> Added test for checking setMargin() of JRadioButton. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on review comments Changes requested by aivanov (Reviewer). Shall the test be located in `test/jdk/javax/swing/JRadioButton/4380543/bug4380543.java` instead of `test/jdk/javax/swing/JRadioButton/bug4380543.java` ? Usually, there's been a folder with bugid (`/4380543/`) for each test. Do we use the flat layout now? test/jdk/javax/swing/JRadioButton/bug4380543.java line 62: > 60: "(insets set to 20 on all 4 sides)." + > 61: "\n 3. If Left insets(margins) appear Empty, press Fail, " + > 62: "else press Pass."; You should add an explicit step to verify rendering in different Look-and-Feels by clicking the buttons. test/jdk/javax/swing/JRadioButton/bug4380543.java line 102: > 100: sLnFName = sLnFName.trim(); > 101: > 102: lookAndFeelMap.put(sLnFName, sLnFClassName); Why don't you want to use `look.getName()` instead of doing the magic to extract what resembles the name from the class? test/jdk/javax/swing/JRadioButton/bug4380543.java line 126: > 124: > 125: for (Map.Entry mapElement : lookAndFeelMap.entrySet()) { > 126: String btnName = mapElement.getKey(); This can be further simplified: you don't use the value, you use only the key, so the for-loop could iterate over `lookAndFeelMap.keySet()`. In fact, you can avoid the map altogether if you use the class name as the action name: UIManager.LookAndFeelInfo[] lookAndFeel = UIManager.getInstalledLookAndFeels(); for (UIManager.LookAndFeelInfo look : lookAndFeel) { JButton btn = new JButton(look.getName()); btn.setActionCommand(look.getClassName()); btn.addActionListener(this); p.add(btn); } In this case, `initMap` and `lookAndFeelMap` should be removed. The listener should be updated: public void actionPerformed(ActionEvent e) { setLookAndFeel(e.getActionCommand()); SwingUtilities.updateComponentTreeUI(this); } ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From honkar at openjdk.java.net Wed Jun 1 16:38:33 2022 From: honkar at openjdk.java.net (Harshitha Onkar) Date: Wed, 1 Jun 2022 16:38:33 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v4] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 16:29:49 GMT, Alexey Ivanov wrote: > Shall the test be located in `test/jdk/javax/swing/JRadioButton/4380543/bug4380543.java` instead of `test/jdk/javax/swing/JRadioButton/bug4380543.java` ? > > Usually, there's been a folder with bugid (`/4380543/`) for each test. Do we use the flat layout now? @aivanov-jdk Recently we have started to use the latter and remove the extra folder (`/4380543/`) ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From honkar at openjdk.java.net Wed Jun 1 16:58:33 2022 From: honkar at openjdk.java.net (Harshitha Onkar) Date: Wed, 1 Jun 2022 16:58:33 GMT Subject: RFR: JDK-8287261: [macos] JList Focus Ring color doesn't follow Accent color changes on macOS In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 10:08:37 GMT, Tejesh R wrote: >> With the proposed fix, JList's focus ring color follows accent color changes. Previously the focus ring for JList was not prominently visible and did not follow accent color changes. >> >> While investing a similar issue related to JTable (https://github.com/openjdk/jdk/pull/7768#discussion_r839813517), it was observed that List.focusCellHighlightBorder was using the cellFocusRing color as well. This PR extends the focus ring accent color changes to JLists. >> >> Related issues: [JDK-7124282](https://bugs.openjdk.java.net/browse/JDK-7124282) , [JDK-8261243](https://bugs.openjdk.java.net/browse/JDK-8261243) >> >> #### Summary of changes >> >> - focusCellHighlightBorder in `AquaLookAndFeel` changed which is used for cell border for lists and tables >> - code related to on-the-fly focus ring color refactored into a separate method (`changeFocusRingColor()`) for re-usability >> - `changeFocusRingColor()` called when PropertyChangeEvent == FRAME_ACTIVE_PROPERTY and the frame gains focus, instead of calling in individual `swapSelectionColors` in `AquaFocusHandler.java` >> - Common test added - `CellFocusRingTest`, which tests for both cases - Tables & Lists. >> >> **Before and After screenshots of JList** _(Screenshots from SwingSet2 demo)_ >> >> ![Screen Shot 2022-05-25 at 3 55 49 PM](https://user-images.githubusercontent.com/95945681/170382727-54ed155b-6f08-4c75-8657-89c15764e1cd.png) > > test/jdk/javax/swing/JTable/CellFocusRingTest.java line 85: > >> 83: } >> 84: >> 85: if (UIManager.getDefaults().get("CellFocus.color") != null > > if (UIManager.getDefaults().get("CellFocus.color") != null > && UIManager.getDefaults().get("CellFocus.color") > instanceof Color) > > can be changed into > > if (UIManager.getDefaults().get("CellFocus.color") > instanceof Color) > > Since if the object is null then `instanceof` returns false. @TejeshR13 The second half of the condition is executed only if `"CellFocus.color" != null` (due to and conditional) ------------- PR: https://git.openjdk.java.net/jdk/pull/8896 From aivanov at openjdk.java.net Wed Jun 1 17:13:34 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 1 Jun 2022 17:13:34 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v3] In-Reply-To: References: <1-qMJRwjJVXF7BSrl5NCpoR9KMRBirtjJY--Kr6JueU=.e4a087a3-a7bb-4a93-a6ad-4a26954de78e@github.com> Message-ID: On Wed, 1 Jun 2022 05:32:27 GMT, Tejesh R wrote: > > > I wonder why the test is Windows-specific if it allows changing Look and Feels. > > > The only Look and Feel which ignores the background is Nimbus, other L&Fs on Windows at least paint the yellow and green background. As such, the test can be run on other platforms. > > > Was the original bug in Windows Look and Feel? If so, you may want to make it the default L&F. > > > The instructions don't mention anything about other Look and Feels. Does the tester have to verify each presented L&F? > > > > > > I think the test was in windows which I might have retained the os type, will check and confirm once. The tester have to verify with each L&F for left margin check. > > Yeah, it was only for Motif and Windows before, so I have retained it for only windows os. I can see no reason why the test is for Windows only. The original bug [JDK-4380543](https://bugs.openjdk.java.net/browse/JDK-4380543) lists all the operating systems as affected. Then [JDK-8134640](https://bugs.openjdk.java.net/browse/JDK-8134640) asked to support all Look-and-Feels, which somewhat implies other platforms should also be tested. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From prr at openjdk.java.net Wed Jun 1 17:21:35 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 1 Jun 2022 17:21:35 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v2] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 05:30:23 GMT, Tejesh R wrote: >> The tooltip displays accelerated string along with the toooltip string. The feature is implemented and applicable for Metal Look and Feel only. Hence the test is updated for Metal Look and Feel by hard wiring it in the code. Updated the test from manual to automatic. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Removed unused parameter isTooltipAdded Marked as reviewed by prr (Reviewer). test/jdk/javax/swing/JToolTip/bug5047379.java line 137: > 135: text += "The word \\\"TEXT\\\" and then \\\"CTRL-B\\\"\\n\"\t\t"; > 136: text += "\n"; > 137: "Mouse is hover over button B for the ToolTip to appear." ? Harmless to have this message but even though no one will be there to read it (usually) it would be nice for it to read properly. Please fix before pushing. How about "The mouse will hover over button B so the ToolTip will appear." ? ------------- PR: https://git.openjdk.java.net/jdk/pull/8952 From aivanov at openjdk.java.net Wed Jun 1 17:41:35 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 1 Jun 2022 17:41:35 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v4] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 16:35:01 GMT, Harshitha Onkar wrote: > > Shall the test be located in `test/jdk/javax/swing/JRadioButton/4380543/bug4380543.java` instead of `test/jdk/javax/swing/JRadioButton/bug4380543.java` ? > > Usually, there's been a folder with bugid (`/4380543/`) for each test. Do we use the flat layout now? > > @aivanov-jdk Recently we have started to use the latter and remove the extra folder (`/4380543/`) Thank you for clarification, Harshitha. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From prr at openjdk.java.net Wed Jun 1 17:43:38 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 1 Jun 2022 17:43:38 GMT Subject: RFR: 8286481: Exception printed to stdout on Windows when storing transparent image in clipboard In-Reply-To: References: Message-ID: On Tue, 24 May 2022 16:54:55 GMT, Alisen Chung wrote: > Removed stacktrace from WClipboard Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8871 From prr at openjdk.java.net Wed Jun 1 17:47:21 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 1 Jun 2022 17:47:21 GMT Subject: RFR: 8286846: test/jdk/javax/swing/plaf/aqua/CustomComboBoxFocusTest.java fails on mac aarch64 In-Reply-To: <8xjZ4XtQGlJMb8WL_9BnlcTd-r8sOLSlPShLoExEfVM=.72d1b3ae-697b-4695-b29f-f258805d18ef@github.com> References: <8xjZ4XtQGlJMb8WL_9BnlcTd-r8sOLSlPShLoExEfVM=.72d1b3ae-697b-4695-b29f-f258805d18ef@github.com> Message-ID: On Tue, 24 May 2022 08:28:57 GMT, Prasanta Sadhukhan wrote: > Test was failing intermiitently in iMac M1 system owing to minimalistic color difference of 1 > > x 13 y 0 refRGB ffeeeeee customRGB ffefeeee > x 0 y 0 refRGB ffefefef customRGB ffefeeef > > > so added color tolerance check. > Also, added other stability fixes.. > Several iteration of test passed in intended M1 and x64 system. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8864 From prr at openjdk.java.net Wed Jun 1 17:47:21 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 1 Jun 2022 17:47:21 GMT Subject: RFR: 8286846: test/jdk/javax/swing/plaf/aqua/CustomComboBoxFocusTest.java fails on mac aarch64 In-Reply-To: References: <8xjZ4XtQGlJMb8WL_9BnlcTd-r8sOLSlPShLoExEfVM=.72d1b3ae-697b-4695-b29f-f258805d18ef@github.com> Message-ID: On Mon, 30 May 2022 07:15:15 GMT, Prasanta Sadhukhan wrote: >> Yes for standalone testing for which I also removed dependancy on jtreg Platform class > > Any reviewers please? I prefer .toLoweCase().startsWith("mac") since the OS is called "macOS" not "macOS X" but that's just me .. ------------- PR: https://git.openjdk.java.net/jdk/pull/8864 From prr at openjdk.java.net Wed Jun 1 17:52:34 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 1 Jun 2022 17:52:34 GMT Subject: RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray [v3] In-Reply-To: References: Message-ID: On Fri, 27 May 2022 20:48:30 GMT, Alexey Ivanov wrote: >> **WTrayIconPeer**: removed duplicate call to `popupParent.dispose()` that might cause NPE (it looks `popupParent` cannot be `null`); organised imports. >> >> **SystemTray**: removed redundant initialisers; replaced sized array with empty array in `toArray` call; dropped `newValue != null` chained with `equals`. > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > Use method reference in setSystemTrayAccessor instead of anonymous class Marked as reviewed by prr (Reviewer). > If method reference is used, the code becomes much shorter: > > ```java > AWTAccessor.setSystemTrayAccessor(SystemTray::firePropertyChange); > ``` > > What do others think? I am sure this code pre-dates method references, but if updating something then using method references is perfectly OK. ------------- PR: https://git.openjdk.java.net/jdk/pull/8850 From honkar at openjdk.java.net Wed Jun 1 17:53:32 2022 From: honkar at openjdk.java.net (Harshitha Onkar) Date: Wed, 1 Jun 2022 17:53:32 GMT Subject: RFR: 8286846: test/jdk/javax/swing/plaf/aqua/CustomComboBoxFocusTest.java fails on mac aarch64 In-Reply-To: <8xjZ4XtQGlJMb8WL_9BnlcTd-r8sOLSlPShLoExEfVM=.72d1b3ae-697b-4695-b29f-f258805d18ef@github.com> References: <8xjZ4XtQGlJMb8WL_9BnlcTd-r8sOLSlPShLoExEfVM=.72d1b3ae-697b-4695-b29f-f258805d18ef@github.com> Message-ID: On Tue, 24 May 2022 08:28:57 GMT, Prasanta Sadhukhan wrote: > Test was failing intermiitently in iMac M1 system owing to minimalistic color difference of 1 > > x 13 y 0 refRGB ffeeeeee customRGB ffefeeee > x 0 y 0 refRGB ffefefef customRGB ffefeeef > > > so added color tolerance check. > Also, added other stability fixes.. > Several iteration of test passed in intended M1 and x64 system. Marked as reviewed by honkar (Author). ------------- PR: https://git.openjdk.java.net/jdk/pull/8864 From prr at openjdk.java.net Wed Jun 1 17:56:31 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 1 Jun 2022 17:56:31 GMT Subject: RFR: 8213531: Test javax/swing/border/TestTitledBorderLeak.java fails [v3] In-Reply-To: References: Message-ID: On Sat, 28 May 2022 08:41:35 GMT, Prasanta Sadhukhan wrote: >> Test was failing in linux citing `java.lang.RuntimeException: Expected Total TitledBorder to be freed : 10 Freed 9 ` >> As per the fix done in JDK-8204963 http://hg.openjdk.java.net/jdk/jdk/rev/cd7d2f9154fd >> there was no platform specific code done for the fix and logs in `TitledBorder.installPropertyChangeListeners` shows it was called 10 times for the test but `CleanerFactory.cleaner().register` action was only called 9 times in linux causing it to fail. >> >> Modified the test to not show the frame which cause the problem to go away and also it can still be used as 8204963 regression test as it still fails without the fix and pass with it. Modified test has passed in all platforms for several iterations. >> >> Also removed the deprecated `System.runFinalization` > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Made test headless Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8450 From prr at openjdk.java.net Wed Jun 1 18:04:37 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 1 Jun 2022 18:04:37 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v4] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 17:37:42 GMT, Alexey Ivanov wrote: > > > Shall the test be located in `test/jdk/javax/swing/JRadioButton/4380543/bug4380543.java` instead of `test/jdk/javax/swing/JRadioButton/bug4380543.java` ? > > > Usually, there's been a folder with bugid (`/4380543/`) for each test. Do we use the flat layout now? > > > > > > @aivanov-jdk Recently we have started to use the latter and remove the extra folder (`/4380543/`) > > Thank you for clarification, Harshitha. Yes, blame (?) me :-) We may not always remember to point it out but it is what we want. I've never seen the point in an extra level of folder except when the test is composed of multiple files all unique to the test. I also request that new tests not be given names like bug87654321.java but instead be named in a way that you can tell what they are supposed to be testing like in this case something like RadioButtonMarginTest.java ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From duke at openjdk.java.net Wed Jun 1 18:09:26 2022 From: duke at openjdk.java.net (Nikita Gubarkov) Date: Wed, 1 Jun 2022 18:09:26 GMT Subject: RFR: 8287609: macOS: SIGSEGV at [CoreFoundation] CFArrayGetCount / sun.font.CFont.getTableBytesNative In-Reply-To: References: Message-ID: On Tue, 31 May 2022 23:39:09 GMT, Nikita Gubarkov wrote: > `CTFontCopyAvailableTables` can return null, which causes subsequent call to `CFArrayGetCount` to crash with SEGFAULT, just added a null-check. Screen Shot 2022-06-01 at 8 20 04 PM It looks for a "maxp" table which is absent for this font. If you look down the stack, it's trying to find units per em and if we return NULL, then it just falls back to upem=1000 (libharfbuzz/hb-ot-head-table.hh:53): /* If no valid head table found, assume 1000, which matches typical Type1 usage. */ return 16 <= upem && upem <= 16384 ? upem : 1000; And as I can see, nobody expects `getTableBytesNative` to always return a table, it's perfectly fine to return NULL when it's not found. The only question is why `CTFontCopyAvailableTables` returns NULL - font handle looks OK as you can see on the screenshot. ------------- PR: https://git.openjdk.java.net/jdk/pull/8962 From prr at openjdk.java.net Wed Jun 1 18:38:38 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 1 Jun 2022 18:38:38 GMT Subject: RFR: 8012675: Javadoc for javax.swing.text.html.parser.Parser.handleComment() needs to be updated [v4] In-Reply-To: References: Message-ID: On Tue, 31 May 2022 22:08:23 GMT, Damon Nguyen wrote: >> Updated Parser class doc by appending to the doc regarding lack of support for HTML script tags. Adding this information to the "parse" function did not seem as consistent for formatting as adding it to the Parser class doc. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Removed print statements. src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java line 27: > 25: package javax.swing.text.html; > 26: > 27: import sun.swing.SwingUtilities2; Hmm .. there's no change in this file except for import clean up. Ordinarily I'd say revert but I can see it was quite a chunk .. src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java line 1123: > 1121: */ > 1122: public void handleComment(char[] data, int pos) { > 1123: System.out.println("HTMLEditorKit"); And this one ? src/java.desktop/share/classes/javax/swing/text/html/parser/DocumentParser.java line 34: > 32: import javax.swing.text.SimpleAttributeSet; > 33: import javax.swing.text.html.HTML; > 34: import javax.swing.text.html.HTMLEditorKit; Then there's these changes. OK .. too much .. let's just revert all the files that are import only changes. test/jdk/javax/swing/text/html/parser/HtmlTagParserTest.java line 1: > 1: import java.awt.Dimension; where's the GPL header on this test ? ------------- PR: https://git.openjdk.java.net/jdk/pull/7446 From prr at openjdk.java.net Wed Jun 1 18:38:38 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 1 Jun 2022 18:38:38 GMT Subject: RFR: 8012675: Javadoc for javax.swing.text.html.parser.Parser.handleComment() needs to be updated [v4] In-Reply-To: References: Message-ID: <_9URMX51lIIW9m37eSAVuX88OTBbxTWM-EJY1NXdz58=.2bd3fc59-fd07-4a2b-a4b6-bc55616d0eba@github.com> On Wed, 1 Jun 2022 18:33:06 GMT, Phil Race wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Removed print statements. > > src/java.desktop/share/classes/javax/swing/text/html/HTMLDocument.java line 27: > >> 25: package javax.swing.text.html; >> 26: >> 27: import sun.swing.SwingUtilities2; > > Hmm .. there's no change in this file except for import clean up. > Ordinarily I'd say revert but I can see it was quite a chunk .. update .. please revert .. I guess the IDE can re-do this when we touch it next ------------- PR: https://git.openjdk.java.net/jdk/pull/7446 From honkar at openjdk.java.net Wed Jun 1 19:40:34 2022 From: honkar at openjdk.java.net (Harshitha Onkar) Date: Wed, 1 Jun 2022 19:40:34 GMT Subject: RFR: JDK-8287261: [macos] JList Focus Ring color doesn't follow Accent color changes on macOS [v2] In-Reply-To: References: Message-ID: > With the proposed fix, JList's focus ring color follows accent color changes. Previously the focus ring for JList was not prominently visible and did not follow accent color changes. > > While investing a similar issue related to JTable (https://github.com/openjdk/jdk/pull/7768#discussion_r839813517), it was observed that List.focusCellHighlightBorder was using the cellFocusRing color as well. This PR extends the focus ring accent color changes to JLists. > > Related issues: [JDK-7124282](https://bugs.openjdk.java.net/browse/JDK-7124282) , [JDK-8261243](https://bugs.openjdk.java.net/browse/JDK-8261243) > > #### Summary of changes > > - focusCellHighlightBorder in `AquaLookAndFeel` changed which is used for cell border for lists and tables > - code related to on-the-fly focus ring color refactored into a separate method (`changeFocusRingColor()`) for re-usability > - `changeFocusRingColor()` called when PropertyChangeEvent == FRAME_ACTIVE_PROPERTY and the frame gains focus, instead of calling in individual `swapSelectionColors` in `AquaFocusHandler.java` > - Common test added - `CellFocusRingTest`, which tests for both cases - Tables & Lists. > > **Before and After screenshots of JList** _(Screenshots from SwingSet2 demo)_ > > ![Screen Shot 2022-05-25 at 3 55 49 PM](https://user-images.githubusercontent.com/95945681/170382727-54ed155b-6f08-4c75-8657-89c15764e1cd.png) Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: removed redundant null checks in test ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8896/files - new: https://git.openjdk.java.net/jdk/pull/8896/files/54e54719..e98484fe Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8896&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8896&range=00-01 Stats: 110 lines in 2 files changed: 40 ins; 55 del; 15 mod Patch: https://git.openjdk.java.net/jdk/pull/8896.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8896/head:pull/8896 PR: https://git.openjdk.java.net/jdk/pull/8896 From honkar at openjdk.java.net Wed Jun 1 19:40:36 2022 From: honkar at openjdk.java.net (Harshitha Onkar) Date: Wed, 1 Jun 2022 19:40:36 GMT Subject: RFR: JDK-8287261: [macos] JList Focus Ring color doesn't follow Accent color changes on macOS [v2] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 16:54:43 GMT, Harshitha Onkar wrote: >> test/jdk/javax/swing/JTable/CellFocusRingTest.java line 85: >> >>> 83: } >>> 84: >>> 85: if (UIManager.getDefaults().get("CellFocus.color") != null >> >> if (UIManager.getDefaults().get("CellFocus.color") != null >> && UIManager.getDefaults().get("CellFocus.color") >> instanceof Color) >> >> can be changed into >> >> if (UIManager.getDefaults().get("CellFocus.color") >> instanceof Color) >> >> Since if the object is null then `instanceof` returns false. > > @TejeshR13 Your suggestion was to remove redundant null check. Correct, this is a better way to shorten the condition. Will have the changes done in the next commit. Updated PR with changes ------------- PR: https://git.openjdk.java.net/jdk/pull/8896 From avu at openjdk.java.net Wed Jun 1 20:29:59 2022 From: avu at openjdk.java.net (Alexey Ushakov) Date: Wed, 1 Jun 2022 20:29:59 GMT Subject: RFR: 8287600: AA Ovals not rendered under metal Message-ID: Commit command buffer after MTL_OP_MASK_OP operation ------------- Commit messages: - 8287600: AA Ovals not rendered under metal Changes: https://git.openjdk.java.net/jdk/pull/8981/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8981&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8287600 Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8981.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8981/head:pull/8981 PR: https://git.openjdk.java.net/jdk/pull/8981 From prr at openjdk.java.net Wed Jun 1 20:54:20 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 1 Jun 2022 20:54:20 GMT Subject: RFR: 8190907: Windows 10 default Korean Font Malgun Gothic available not used by GUI elements even though available without Korean Language Pack [v6] In-Reply-To: References: <_cAab99k8SxU4y3G_FwRT3fg8t39fYQUDTdEwOZYZmc=.5d71beab-25a0-4c29-b194-d4680961b530@github.com> Message-ID: On Sat, 28 May 2022 03:41:29 GMT, Prasanta Sadhukhan wrote: >> Malgun_Gothic(https://en.wikipedia.org/wiki/Malgun_Gothic) had replaced Gulim korean font so it needs to be updated to show korean fonts > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Added UTF-8 korean fallback Something weird is going on .. Malgun is now not appearing in the font menu of Font2DTest when I use ko + UTF-8 !? It appears if I use -Dfile.encoding=ko instead. Something we are doing is hiding it. Also can you attach the source of your test to JBS ! ------------- PR: https://git.openjdk.java.net/jdk/pull/7643 From aturbanov at openjdk.java.net Wed Jun 1 20:55:34 2022 From: aturbanov at openjdk.java.net (Andrey Turbanov) Date: Wed, 1 Jun 2022 20:55:34 GMT Subject: RFR: 8284672: Collapse identical catch branches in java.desktop [v2] In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 04:40:29 GMT, Phil Race wrote: >> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: >> >> 8284672: Collapse identical catch branches in java.desktop >> fix formatting > > src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java line 610: > >> 608: } >> 609: } catch (MalformedURLException ex) { >> 610: // OK to just ignore. We'll use a fallback theme. > > subclass of IOException I suppose Yes. `MalformedURLException extends IOException` > src/java.desktop/share/classes/com/sun/media/sound/DLSSoundbankReader.java line 50: > >> 48: try { >> 49: return new DLSSoundbank(url); >> 50: } catch (IOException e) { > > So how can this method throw the declared IOException ? > Hmm I suppose the API super-class declares it is Yep. Inherited throws section from a super method > src/java.desktop/share/classes/com/sun/media/sound/SF2SoundbankReader.java line 50: > >> 48: try { >> 49: return new SF2Soundbank(url); >> 50: } catch (IOException e) { > > same here Yeah. I think it makes sense to amend behavior here and not catch IOException. Callers should be ready for it. ------------- PR: https://git.openjdk.java.net/jdk/pull/8154 From aturbanov at openjdk.java.net Wed Jun 1 20:55:30 2022 From: aturbanov at openjdk.java.net (Andrey Turbanov) Date: Wed, 1 Jun 2022 20:55:30 GMT Subject: RFR: 8284672: Collapse identical catch branches in java.desktop [v2] In-Reply-To: References: Message-ID: > Let's take advantage of Java 7 language feature - "Catching Multiple Exception Types". > It simplifies code. Reduces duplication. > Found by IntelliJ IDEA inspection Identical 'catch' branches in 'try' statement Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8284672: Collapse identical catch branches in java.desktop fix formatting ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8154/files - new: https://git.openjdk.java.net/jdk/pull/8154/files/bc19ec42..66906b3c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8154&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8154&range=00-01 Stats: 3 lines in 2 files changed: 0 ins; 1 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8154.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8154/head:pull/8154 PR: https://git.openjdk.java.net/jdk/pull/8154 From serb at openjdk.java.net Wed Jun 1 23:17:35 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 1 Jun 2022 23:17:35 GMT Subject: RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray [v3] In-Reply-To: References: Message-ID: On Tue, 24 May 2022 11:16:16 GMT, Alexey Ivanov wrote: >> It also has a functional implication, in the old code the "size" on a Vector is called outside of the lock. So the resulted array after "icons.toArray" can be bigger than the number of icons. This is similar to this: >> https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.desktop/share/classes/javax/sound/midi/Sequence.java#L281 >> I think that race can even be triggered by the new test. > > I remember IDEs used to suggest using correctly sized arrays in the calls to `toArray`. Now they suggest using zero-sized array. > > My idea was to resolve the warning raised by the IDE to reduce the number of yellow highlights on the file outline. > > I agree the performance gain if any is negligible in this case: we don't expect many icons, probably no more than 3. The IDE warning was changed based on the article above. Did you have a chance to reproduce a possible race caused by data change after the size() was called? ------------- PR: https://git.openjdk.java.net/jdk/pull/8850 From serb at openjdk.java.net Wed Jun 1 23:55:20 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 1 Jun 2022 23:55:20 GMT Subject: RFR: 8282526: Default icon is not painted properly [v4] In-Reply-To: References: Message-ID: On Fri, 27 May 2022 18:02:51 GMT, Alexander Zuev wrote: >> Detect the situation where we do need to perform interpolation during ImageIcon >> painting and set a hint to the rendering to perform bicubic approximation so >> image details are preserved during transition. > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Use small icon pointer for icons less than 24 pixels wide - this way we > get the 16x16 icon which is better for scaling purposes. src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp line 987: > 985: size = 16; > 986: } > 987: hres = pIcon->Extract(szBuf, index, &hIcon, &hIconSmall, size); Looking into this change I assume that the reason why the windows "ignores" the requested size of 16x16 was that we request the size 16x16 but after that used the large icon only which is 32x32 by default, is it correct? The last parameter of [this](https://docs.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-iextracticonw-extract) method: >nIconSize The desired size of the icon, in pixels. The low word contains the size of the large icon, and the high word contains the size of the small icon. The size specified can be the width or height. The width of an icon always equals its height. Do we need to update the size value and take into account the low/hi sizes? src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp line 993: > 991: } else { > 992: fn_DestroyIcon((HICON)hIconSmall); > 993: } Does it mean that we will extract all images except on the sides twice? for 16x16 we will extract 16x16 and 32x32 on the next iteration for 32x32 we will extract 32x32 and 64x64? Can we try to do that via different API: https://devblogs.microsoft.com/oldnewthing/20140501-00/?p=1103 probably it will work better? ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From serb at openjdk.java.net Thu Jun 2 00:12:30 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Jun 2022 00:12:30 GMT Subject: RFR: 8282526: Default icon is not painted properly [v4] In-Reply-To: <8vrDNTJTPocLihty5ZMoBaqGEX23B4gXxis8TtBvuZ8=.5700255b-33a0-4b17-bbb2-523f5a19e9c8@github.com> References: <8vrDNTJTPocLihty5ZMoBaqGEX23B4gXxis8TtBvuZ8=.5700255b-33a0-4b17-bbb2-523f5a19e9c8@github.com> Message-ID: On Fri, 27 May 2022 18:12:59 GMT, Alexander Zuev wrote: > On 10000 iterations the difference is measurable in tens of milliseconds between test runs. On 100000 iterations test execution with BICUBIC approximation is noticeable (like test run takes more than a second longer). Not an ideal benchmark but it shows that the bicubic is ~200 times slower. public static void main(String[] args) { var gc = GraphicsEnvironment.getLocalGraphicsEnvironment() .getDefaultScreenDevice() .getDefaultConfiguration(); var vi = gc.createCompatibleVolatileImage(50, 50, Transparency.TRANSLUCENT); var bi = new BufferedImage(50,50,BufferedImage.TYPE_INT_ARGB); Graphics2D g2d = vi.createGraphics(); g2d.scale(2,2); test(bi, g2d);// warmup test(bi, g2d); g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BICUBIC); test(bi, g2d);// warmup test(bi, g2d); } private static void test(BufferedImage bi, Graphics2D g2d) { long start = System.nanoTime(); for (int i = 0; i < 1000; ++i) { g2d.drawImage(bi, null, 0, 0); } long time = System.nanoTime() - start; System.out.println("Time: " + time); } Time: 21313400 Time: 4036200 Time: 1140613100 Time: 839499200 ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From serb at openjdk.java.net Thu Jun 2 00:39:27 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Jun 2022 00:39:27 GMT Subject: RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray [v3] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 23:13:57 GMT, Sergey Bylokhov wrote: >> I remember IDEs used to suggest using correctly sized arrays in the calls to `toArray`. Now they suggest using zero-sized array. >> >> My idea was to resolve the warning raised by the IDE to reduce the number of yellow highlights on the file outline. >> >> I agree the performance gain if any is negligible in this case: we don't expect many icons, probably no more than 3. > > The IDE warning was changed based on the article above. Did you have a chance to reproduce a possible race caused by data change after the size() was called? I can reproduce it by this code example: class Scratch { static volatile Throwable failed; static volatile long endtime; public static void main(String[] args) throws Exception { if (!SystemTray.isSupported()) { return; // passed if SystemTray is not supported } SystemTray st = SystemTray.getSystemTray(); endtime = System.nanoTime() + TimeUnit.SECONDS.toNanos(5); Thread thread1 = new Thread(() -> { while (!isComplete()) { try { st.add(new TrayIcon(new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB))); } catch (AWTException e) { failed = e; } } }); Thread thread2 = new Thread(() -> { while (!isComplete()) { try { st.add(new TrayIcon(new BufferedImage(10, 10, BufferedImage.TYPE_INT_ARGB))); } catch (AWTException e) { failed = e; } } }); Thread thread3 = new Thread(() -> { while (!isComplete()) { TrayIcon[] icons = st.getTrayIcons(); if (icons.length > 0) { st.remove(icons[0]); } } }); Thread thread4 = new Thread(() -> { while (!isComplete()) { TrayIcon[] icons = st.getTrayIcons(); if (icons.length > 0 && icons[icons.length - 1] == null) { failed = new RuntimeException( "icon is null:" + Arrays.toString(icons)); } } }); thread1.start(); thread2.start(); thread3.start(); thread4.start(); thread1.join(); thread2.join(); thread3.join(); thread4.join(); for (TrayIcon icon : st.getTrayIcons()) { st.remove(icon); // cleanup } if (failed != null) { System.err.println("Test failed"); throw new RuntimeException(failed); } } private static boolean isComplete() { return endtime - System.nanoTime() < 0 || failed != null; } } ------------- PR: https://git.openjdk.java.net/jdk/pull/8850 From serb at openjdk.java.net Thu Jun 2 00:39:27 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Jun 2022 00:39:27 GMT Subject: RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray [v3] In-Reply-To: References: Message-ID: <1zmgKAKgBzh5-I4aGlM0Egx64C-Fv3r2Yhl5R0Mu5ho=.c67c08aa-8d49-4550-9e07-505a93be3840@github.com> On Thu, 2 Jun 2022 00:32:29 GMT, Sergey Bylokhov wrote: >> The IDE warning was changed based on the article above. Did you have a chance to reproduce a possible race caused by data change after the size() was called? > > I can reproduce it by this code example: > > class Scratch { > > static volatile Throwable failed; > static volatile long endtime; > > public static void main(String[] args) throws Exception { > if (!SystemTray.isSupported()) { > return; // passed if SystemTray is not supported > } > SystemTray st = SystemTray.getSystemTray(); > > endtime = System.nanoTime() + TimeUnit.SECONDS.toNanos(5); > > Thread thread1 = new Thread(() -> { > while (!isComplete()) { > try { > st.add(new TrayIcon(new BufferedImage(10, 10, > BufferedImage.TYPE_INT_ARGB))); > } catch (AWTException e) { > failed = e; > } > } > }); > Thread thread2 = new Thread(() -> { > while (!isComplete()) { > try { > st.add(new TrayIcon(new BufferedImage(10, 10, > BufferedImage.TYPE_INT_ARGB))); > } catch (AWTException e) { > failed = e; > } > } > }); > Thread thread3 = new Thread(() -> { > while (!isComplete()) { > TrayIcon[] icons = st.getTrayIcons(); > if (icons.length > 0) { > st.remove(icons[0]); > } > } > }); > Thread thread4 = new Thread(() -> { > while (!isComplete()) { > TrayIcon[] icons = st.getTrayIcons(); > if (icons.length > 0 && icons[icons.length - 1] == null) { > failed = new RuntimeException( > "icon is null:" + Arrays.toString(icons)); > } > } > }); > thread1.start(); > thread2.start(); > thread3.start(); > thread4.start(); > thread1.join(); > thread2.join(); > thread3.join(); > thread4.join(); > for (TrayIcon icon : st.getTrayIcons()) { > st.remove(icon); // cleanup > } > if (failed != null) { > System.err.println("Test failed"); > throw new RuntimeException(failed); > } > } > > private static boolean isComplete() { > return endtime - System.nanoTime() < 0 || failed != null; > } > } BTW I think that the usage of `return icons.toArray(EMPTY_TRAY_ARRAY);` is slower than any of other cases: presized or zero. So if we would like to use a similar pattern the zero version is better. ------------- PR: https://git.openjdk.java.net/jdk/pull/8850 From serb at openjdk.java.net Thu Jun 2 00:46:33 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Jun 2022 00:46:33 GMT Subject: RFR: 8285305: Create an automated test for JDK-4495286 [v3] In-Reply-To: References: Message-ID: On Wed, 18 May 2022 08:20:47 GMT, Srinivas Mandalika wrote: >> Create an automated test for [JDK-4495286](https://bugs.openjdk.java.net/browse/JDK-4495286) >> >> AccessibleJTable.setAccessibleSelction should select rows/cols when cell selection. >> When cell selection is not enabled, there is no way, using >> accessibility, to select rows or columns. It seems logical that selecting a cell >> using accessibility should have the same effect as clicking on a cell with the >> mouse. That is, if row or column selection is enabled, then selecting a cell >> should instead cause the row or column to be selected. >> The proposed test verifies that the above behavior is fixed. >> >> This review is for migrating tests from a closed test suite to open. >> >> Testing: >> The test ran successfully on Mach5 with multiple runs (40) on windows-x64, linux-x64 and macos-x64. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > Review comments fixed: moved the file directly under the a11y folder Looks fine, please confirm that mach5 is green. ------------- Marked as reviewed by serb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8333 From serb at openjdk.java.net Thu Jun 2 00:50:40 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Jun 2022 00:50:40 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v2] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 05:30:23 GMT, Tejesh R wrote: >> The tooltip displays accelerated string along with the toooltip string. The feature is implemented and applicable for Metal Look and Feel only. Hence the test is updated for Metal Look and Feel by hard wiring it in the code. Updated the test from manual to automatic. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Removed unused parameter isTooltipAdded I think this feature was implemented someday for some L&Fs and then deleted. please double-check the history of releated bugs/files. ------------- PR: https://git.openjdk.java.net/jdk/pull/8952 From serb at openjdk.java.net Thu Jun 2 00:57:30 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Jun 2022 00:57:30 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v2] In-Reply-To: References: Message-ID: <3Z0TE9KWfpoFwVC8KCYi9DX7Lef8j-VmW_PB9bUd8Ko=.90847f16-5042-422e-a15d-e492fb3bb3f7@github.com> On Thu, 2 Jun 2022 00:48:33 GMT, Sergey Bylokhov wrote: > I think this feature was implemented someday for some L&Fs and then deleted. please double-check the history of releated bugs/files. Hmm, I thought this is a produce fix since it has a CSR in the description. The test for metal is fine. ------------- PR: https://git.openjdk.java.net/jdk/pull/8952 From honkar at openjdk.java.net Thu Jun 2 00:57:33 2022 From: honkar at openjdk.java.net (Harshitha Onkar) Date: Thu, 2 Jun 2022 00:57:33 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v2] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 05:30:23 GMT, Tejesh R wrote: >> The tooltip displays accelerated string along with the toooltip string. The feature is implemented and applicable for Metal Look and Feel only. Hence the test is updated for Metal Look and Feel by hard wiring it in the code. Updated the test from manual to automatic. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Removed unused parameter isTooltipAdded test/jdk/javax/swing/JToolTip/bug5047379.java line 173: > 171: frame.setVisible(true); > 172: } > 173: }; Extra semi colon at the end ------------- PR: https://git.openjdk.java.net/jdk/pull/8952 From serb at openjdk.java.net Thu Jun 2 00:58:19 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Jun 2022 00:58:19 GMT Subject: RFR: JDK-8287261: [macos] JList Focus Ring color doesn't follow Accent color changes on macOS [v2] In-Reply-To: References: Message-ID: <0qBB8EiFX2jC8stWm73ILBjH9b4n5ejPaH1F1xtS1W0=.1eb0f8d4-4458-4957-a460-4acc6bba77bd@github.com> On Wed, 1 Jun 2022 19:40:34 GMT, Harshitha Onkar wrote: >> With the proposed fix, JList's focus ring color follows accent color changes. Previously the focus ring for JList was not prominently visible and did not follow accent color changes. >> >> While investing a similar issue related to JTable (https://github.com/openjdk/jdk/pull/7768#discussion_r839813517), it was observed that List.focusCellHighlightBorder was using the cellFocusRing color as well. This PR extends the focus ring accent color changes to JLists. >> >> Related issues: [JDK-7124282](https://bugs.openjdk.java.net/browse/JDK-7124282) , [JDK-8261243](https://bugs.openjdk.java.net/browse/JDK-8261243) >> >> #### Summary of changes >> >> - focusCellHighlightBorder in `AquaLookAndFeel` changed which is used for cell border for lists and tables >> - code related to on-the-fly focus ring color refactored into a separate method (`changeFocusRingColor()`) for re-usability >> - `changeFocusRingColor()` called when PropertyChangeEvent == FRAME_ACTIVE_PROPERTY and the frame gains focus, instead of calling in individual `swapSelectionColors` in `AquaFocusHandler.java` >> - Common test added - `CellFocusRingTest`, which tests for both cases - Tables & Lists. >> >> **Before and After screenshots of JList** _(Screenshots from SwingSet2 demo)_ >> >> ![Screen Shot 2022-05-25 at 3 55 49 PM](https://user-images.githubusercontent.com/95945681/170382727-54ed155b-6f08-4c75-8657-89c15764e1cd.png) > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > removed redundant null checks in test Can you please double check how the native applications/components look when the colors are "similar". ------------- PR: https://git.openjdk.java.net/jdk/pull/8896 From honkar at openjdk.java.net Thu Jun 2 01:06:31 2022 From: honkar at openjdk.java.net (Harshitha Onkar) Date: Thu, 2 Jun 2022 01:06:31 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v2] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 05:30:23 GMT, Tejesh R wrote: >> The tooltip displays accelerated string along with the toooltip string. The feature is implemented and applicable for Metal Look and Feel only. Hence the test is updated for Metal Look and Feel by hard wiring it in the code. Updated the test from manual to automatic. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Removed unused parameter isTooltipAdded test/jdk/javax/swing/JToolTip/bug5047379.java line 28: > 26: @summary Checks that Tooltips are rendered properly for Metal Look and Feel > 27: @library ../regtesthelpers > 28: @build Util @TejeshR13 Can you please crosscheck the regtesthelpers & Util path. I'm unable to run it as jtreg test ------------- PR: https://git.openjdk.java.net/jdk/pull/8952 From serb at openjdk.java.net Thu Jun 2 01:17:20 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Jun 2022 01:17:20 GMT Subject: RFR: 8213531: Test javax/swing/border/TestTitledBorderLeak.java fails [v2] In-Reply-To: <3cFgKe1kh2sMLag9N4n4xEAR2Z9ZyGqc514s4aBbM6Q=.3b0fb8bf-a295-48af-910c-424012dc4307@github.com> References: <7f6imhO_fmNXVejmC3boQyV0uNjoHOJCiVzetcCOHpY=.b2d95eab-e3f7-45db-83ad-92e91e3a5585@github.com> <3cFgKe1kh2sMLag9N4n4xEAR2Z9ZyGqc514s4aBbM6Q=.3b0fb8bf-a295-48af-910c-424012dc4307@github.com> Message-ID: <23mfmnzwJlgwfXwmOSVrtzuU_PXPynI1XCiuNlSwRuE=.86cc6ee5-63a6-4383-932d-aa76513ce57e@github.com> On Thu, 26 May 2022 07:49:30 GMT, Prasanta Sadhukhan wrote: > Even if we remove TitledBorder code from the test and only keep JFrame, then also I see So it means that the last visible but already disposed frame is sitting in the memory/leaked and this test catch that, isn't it? ------------- PR: https://git.openjdk.java.net/jdk/pull/8450 From serb at openjdk.java.net Thu Jun 2 01:20:32 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Jun 2022 01:20:32 GMT Subject: RFR: 8285373: Create an automated test for JDK-4702233 [v2] In-Reply-To: References: Message-ID: <5vdop4nnA8Yq5zZCRTBwfleB4Q24R5SOYhVn-EFJwH4=.d63b8ab8-60f1-45bb-9443-062857981350@github.com> On Fri, 29 Apr 2022 14:11:41 GMT, Srinivas Mandalika wrote: >> Create an automated test for [JDK-4702233](https://bugs.openjdk.java.net/browse/JDK-4702233) >> >> Several new AccessibleRole and AccessibleRelation constants are needed in those classes in the java.accessibility package. These new contants codify additions made in the GNOME, Netscape, and UNO (StarOffice) accessibility APIs. >> StarOffice 6.1 and GNOME accessibility require new role, state and relation >> constants in the javax.accessibility package. The existing constants are >> inadequate for providing accessibility to StarOffice and GNOME applications >> as required by Section 508. >> >> Solution >> -------- >> Define new constants in the javax.accessibility package. >> AccessibleRelation >> AccessibleRoles >> AccessibleState >> AccessibleAction >> AccessibleContext >> >> The test validates the public fields of the above AccessibleConstants. >> >> This review is for migrating tests from a closed test suite to open. >> >> Testing: >> The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > Added missing CopyRight Header Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8342 From tr at openjdk.java.net Thu Jun 2 02:33:19 2022 From: tr at openjdk.java.net (Tejesh R) Date: Thu, 2 Jun 2022 02:33:19 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v2] In-Reply-To: <3Z0TE9KWfpoFwVC8KCYi9DX7Lef8j-VmW_PB9bUd8Ko=.90847f16-5042-422e-a15d-e492fb3bb3f7@github.com> References: <3Z0TE9KWfpoFwVC8KCYi9DX7Lef8j-VmW_PB9bUd8Ko=.90847f16-5042-422e-a15d-e492fb3bb3f7@github.com> Message-ID: On Thu, 2 Jun 2022 00:51:22 GMT, Sergey Bylokhov wrote: > > I think this feature was implemented someday for some L&Fs and then deleted. please double-check the history of releated bugs/files. > > Hmm, I thought this is a produce fix since it has a CSR in the description. The test for metal is fine. Yeah @mrserb , but I didn't integrate it, I had moved the feature to ToolTipUI, but based on review suggestions, it was decided that the feature better be in metal alone. So just updated the test for metal alone here. ------------- PR: https://git.openjdk.java.net/jdk/pull/8952 From psadhukhan at openjdk.java.net Thu Jun 2 03:43:33 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 2 Jun 2022 03:43:33 GMT Subject: Integrated: 8213531: Test javax/swing/border/TestTitledBorderLeak.java fails In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 11:59:45 GMT, Prasanta Sadhukhan wrote: > Test was failing in linux citing `java.lang.RuntimeException: Expected Total TitledBorder to be freed : 10 Freed 9 ` > As per the fix done in JDK-8204963 http://hg.openjdk.java.net/jdk/jdk/rev/cd7d2f9154fd > there was no platform specific code done for the fix and logs in `TitledBorder.installPropertyChangeListeners` shows it was called 10 times for the test but `CleanerFactory.cleaner().register` action was only called 9 times in linux causing it to fail. > > Modified the test to not show the frame which cause the problem to go away and also it can still be used as 8204963 regression test as it still fails without the fix and pass with it. Modified test has passed in all platforms for several iterations. > > Also removed the deprecated `System.runFinalization` This pull request has now been integrated. Changeset: 07d24509 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/07d24509a68cc06f062b8249f207bc0d2148c79b Stats: 89 lines in 2 files changed: 16 ins; 61 del; 12 mod 8213531: Test javax/swing/border/TestTitledBorderLeak.java fails Reviewed-by: prr ------------- PR: https://git.openjdk.java.net/jdk/pull/8450 From psadhukhan at openjdk.java.net Thu Jun 2 03:44:27 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 2 Jun 2022 03:44:27 GMT Subject: Integrated: 8286846: test/jdk/javax/swing/plaf/aqua/CustomComboBoxFocusTest.java fails on mac aarch64 In-Reply-To: <8xjZ4XtQGlJMb8WL_9BnlcTd-r8sOLSlPShLoExEfVM=.72d1b3ae-697b-4695-b29f-f258805d18ef@github.com> References: <8xjZ4XtQGlJMb8WL_9BnlcTd-r8sOLSlPShLoExEfVM=.72d1b3ae-697b-4695-b29f-f258805d18ef@github.com> Message-ID: On Tue, 24 May 2022 08:28:57 GMT, Prasanta Sadhukhan wrote: > Test was failing intermiitently in iMac M1 system owing to minimalistic color difference of 1 > > x 13 y 0 refRGB ffeeeeee customRGB ffefeeee > x 0 y 0 refRGB ffefefef customRGB ffefeeef > > > so added color tolerance check. > Also, added other stability fixes.. > Several iteration of test passed in intended M1 and x64 system. This pull request has now been integrated. Changeset: d7341ae4 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/d7341ae42e11fd08508c5f9c67c09c44b62da59b Stats: 38 lines in 1 file changed: 20 ins; 8 del; 10 mod 8286846: test/jdk/javax/swing/plaf/aqua/CustomComboBoxFocusTest.java fails on mac aarch64 Reviewed-by: tr, prr, honkar ------------- PR: https://git.openjdk.java.net/jdk/pull/8864 From psadhukhan at openjdk.java.net Thu Jun 2 03:58:46 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 2 Jun 2022 03:58:46 GMT Subject: RFR: 8190907: Windows 10 default Korean Font Malgun Gothic available not used by GUI elements even though available without Korean Language Pack [v6] In-Reply-To: References: <_cAab99k8SxU4y3G_FwRT3fg8t39fYQUDTdEwOZYZmc=.5d71beab-25a0-4c29-b194-d4680961b530@github.com> Message-ID: On Wed, 1 Jun 2022 20:50:47 GMT, Phil Race wrote: > Also can you attach the source of your test to JBS ! I have attached. ------------- PR: https://git.openjdk.java.net/jdk/pull/7643 From psadhukhan at openjdk.java.net Thu Jun 2 04:23:32 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 2 Jun 2022 04:23:32 GMT Subject: RFR: 8213531: Test javax/swing/border/TestTitledBorderLeak.java fails [v3] In-Reply-To: References: Message-ID: On Sat, 28 May 2022 08:41:35 GMT, Prasanta Sadhukhan wrote: >> Test was failing in linux citing `java.lang.RuntimeException: Expected Total TitledBorder to be freed : 10 Freed 9 ` >> As per the fix done in JDK-8204963 http://hg.openjdk.java.net/jdk/jdk/rev/cd7d2f9154fd >> there was no platform specific code done for the fix and logs in `TitledBorder.installPropertyChangeListeners` shows it was called 10 times for the test but `CleanerFactory.cleaner().register` action was only called 9 times in linux causing it to fail. >> >> Modified the test to not show the frame which cause the problem to go away and also it can still be used as 8204963 regression test as it still fails without the fix and pass with it. Modified test has passed in all platforms for several iterations. >> >> Also removed the deprecated `System.runFinalization` > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Made test headless Have raised JDK-8287707 for JFrame leak but it is seem playing around with Thread.sleep, the freed count varies from 7-9 so it can be a test issue too. ------------- PR: https://git.openjdk.java.net/jdk/pull/8450 From tr at openjdk.java.net Thu Jun 2 04:43:31 2022 From: tr at openjdk.java.net (Tejesh R) Date: Thu, 2 Jun 2022 04:43:31 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v3] In-Reply-To: References: Message-ID: > The tooltip displays accelerated string along with the toooltip string. The feature is implemented and applicable for Metal Look and Feel only. Hence the test is updated for Metal Look and Feel by hard wiring it in the code. Updated the test from manual to automatic. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on review comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8952/files - new: https://git.openjdk.java.net/jdk/pull/8952/files/6d147703..8f86a17a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8952&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8952&range=01-02 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/8952.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8952/head:pull/8952 PR: https://git.openjdk.java.net/jdk/pull/8952 From tr at openjdk.java.net Thu Jun 2 04:43:34 2022 From: tr at openjdk.java.net (Tejesh R) Date: Thu, 2 Jun 2022 04:43:34 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v2] In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 01:02:43 GMT, Harshitha Onkar wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Removed unused parameter isTooltipAdded > > test/jdk/javax/swing/JToolTip/bug5047379.java line 28: > >> 26: @summary Checks that Tooltips are rendered properly for Metal Look and Feel >> 27: @library ../regtesthelpers >> 28: @build Util > > @TejeshR13 Can you please crosscheck the regtesthelpers & Util path. I'm unable to run it as jtreg test One directory up which will land to _swing_ folder, and then to _regtesthelpers_ folder for `Util.java.`. The same path works fine for me. ------------- PR: https://git.openjdk.java.net/jdk/pull/8952 From tr at openjdk.java.net Thu Jun 2 04:43:36 2022 From: tr at openjdk.java.net (Tejesh R) Date: Thu, 2 Jun 2022 04:43:36 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v2] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 17:17:34 GMT, Phil Race wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Removed unused parameter isTooltipAdded > > test/jdk/javax/swing/JToolTip/bug5047379.java line 137: > >> 135: text += "The word \\\"TEXT\\\" and then \\\"CTRL-B\\\"\\n\"\t\t"; >> 136: text += "\n"; >> 137: > > "Mouse is hover over button B for the ToolTip to appear." ? > Harmless to have this message but even though no one will be there to read it (usually) > it would be nice for it to read properly. > > Please fix before pushing. > How about "The mouse will hover over button B so the ToolTip will appear." ? Updated. ------------- PR: https://git.openjdk.java.net/jdk/pull/8952 From tr at openjdk.java.net Thu Jun 2 04:51:36 2022 From: tr at openjdk.java.net (Tejesh R) Date: Thu, 2 Jun 2022 04:51:36 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v4] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 18:00:44 GMT, Phil Race wrote: > > > > Shall the test be located in `test/jdk/javax/swing/JRadioButton/4380543/bug4380543.java` instead of `test/jdk/javax/swing/JRadioButton/bug4380543.java` ? > > > > Usually, there's been a folder with bugid (`/4380543/`) for each test. Do we use the flat layout now? > > > > > > > > > @aivanov-jdk Recently we have started to use the latter and remove the extra folder (`/4380543/`) > > > > > > Thank you for clarification, Harshitha. > > Yes, blame (?) me :-) We may not always remember to point it out but it is what we want. I've never seen the point in an extra level of folder except when the test is composed of multiple files all unique to the test. I also request that new tests not be given names like bug87654321.java but instead be named in a way that you can tell what they are supposed to be testing like in this case something like RadioButtonMarginTest.java Sure @prrace , will rename the test. Harshitha also suggested that previously, I thought of retaining for this test. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From tr at openjdk.java.net Thu Jun 2 05:02:15 2022 From: tr at openjdk.java.net (Tejesh R) Date: Thu, 2 Jun 2022 05:02:15 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v4] In-Reply-To: References: Message-ID: > The tooltip displays accelerated string along with the toooltip string. The feature is implemented and applicable for Metal Look and Feel only. Hence the test is updated for Metal Look and Feel by hard wiring it in the code. Updated the test from manual to automatic. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Test file rename ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8952/files - new: https://git.openjdk.java.net/jdk/pull/8952/files/8f86a17a..6af6f31c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8952&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8952&range=02-03 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8952.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8952/head:pull/8952 PR: https://git.openjdk.java.net/jdk/pull/8952 From psadhukhan at openjdk.java.net Thu Jun 2 05:05:25 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 2 Jun 2022 05:05:25 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v4] In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 04:48:09 GMT, Tejesh R wrote: > > > > > Shall the test be located in `test/jdk/javax/swing/JRadioButton/4380543/bug4380543.java` instead of `test/jdk/javax/swing/JRadioButton/bug4380543.java` ? > > > > > Usually, there's been a folder with bugid (`/4380543/`) for each test. Do we use the flat layout now? > > > > > > > > > > > > @aivanov-jdk Recently we have started to use the latter and remove the extra folder (`/4380543/`) > > > > > > > > > Thank you for clarification, Harshitha. > > > > > > Yes, blame (?) me :-) We may not always remember to point it out but it is what we want. I've never seen the point in an extra level of folder except when the test is composed of multiple files all unique to the test. I also request that new tests not be given names like bug87654321.java but instead be named in a way that you can tell what they are supposed to be testing like in this case something like RadioButtonMarginTest.java > > Sure @prrace , will rename the test. Harshitha also suggested that previously, I thought of retaining for this test. But it's not a new test. I guess you are moving it from closed to open, right? and recent PRs prefer keeping the same name to view the history of the test.. I dont object to it but we should be consistent.. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From tr at openjdk.java.net Thu Jun 2 05:29:32 2022 From: tr at openjdk.java.net (Tejesh R) Date: Thu, 2 Jun 2022 05:29:32 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v3] In-Reply-To: References: <1-qMJRwjJVXF7BSrl5NCpoR9KMRBirtjJY--Kr6JueU=.e4a087a3-a7bb-4a93-a6ad-4a26954de78e@github.com> Message-ID: On Wed, 1 Jun 2022 17:09:37 GMT, Alexey Ivanov wrote: > > > > I wonder why the test is Windows-specific if it allows changing Look and Feels. > > > > The only Look and Feel which ignores the background is Nimbus, other L&Fs on Windows at least paint the yellow and green background. As such, the test can be run on other platforms. > > > > Was the original bug in Windows Look and Feel? If so, you may want to make it the default L&F. > > > > The instructions don't mention anything about other Look and Feels. Does the tester have to verify each presented L&F? > > > > > > > > > I think the test was in windows which I might have retained the os type, will check and confirm once. The tester have to verify with each L&F for left margin check. > > > > > > Yeah, it was only for Motif and Windows before, so I have retained it for only windows os. > > I can see no reason why the test is for Windows only. > > The original bug [JDK-4380543](https://bugs.openjdk.java.net/browse/JDK-4380543) lists all the operating systems as affected. Then [JDK-8134640](https://bugs.openjdk.java.net/browse/JDK-8134640) asked to support all Look-and-Feels, which somewhat implies other platforms should also be tested. Ok. Since this PR is about the movement of test from closed to open, I would like to retain it for Windows alone @aivanov-jdk as the bug fix [JDK-8134640](https://bugs.openjdk.java.net/browse/JDK-8134640) has been taken care for windows. Will surely plan for other L&F in sometime. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From tr at openjdk.java.net Thu Jun 2 06:03:16 2022 From: tr at openjdk.java.net (Tejesh R) Date: Thu, 2 Jun 2022 06:03:16 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v5] In-Reply-To: References: Message-ID: > The tooltip displays accelerated string along with the toooltip string. The feature is implemented and applicable for Metal Look and Feel only. Hence the test is updated for Metal Look and Feel by hard wiring it in the code. Updated the test from manual to automatic. Tejesh R has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: Unused imports removed ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8952/files - new: https://git.openjdk.java.net/jdk/pull/8952/files/6af6f31c..6e914c30 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8952&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8952&range=03-04 Stats: 5 lines in 1 file changed: 0 ins; 3 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8952.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8952/head:pull/8952 PR: https://git.openjdk.java.net/jdk/pull/8952 From aivanov at openjdk.java.net Thu Jun 2 07:50:26 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 2 Jun 2022 07:50:26 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v4] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 18:00:44 GMT, Phil Race wrote: >>> > Shall the test be located in `test/jdk/javax/swing/JRadioButton/4380543/bug4380543.java` instead of `test/jdk/javax/swing/JRadioButton/bug4380543.java` ? >>> > Usually, there's been a folder with bugid (`/4380543/`) for each test. Do we use the flat layout now? >>> >>> @aivanov-jdk Recently we have started to use the latter and remove the extra folder (`/4380543/`) >> >> Thank you for clarification, Harshitha. > >> > > Shall the test be located in `test/jdk/javax/swing/JRadioButton/4380543/bug4380543.java` instead of `test/jdk/javax/swing/JRadioButton/bug4380543.java` ? >> > > Usually, there's been a folder with bugid (`/4380543/`) for each test. Do we use the flat layout now? >> > >> > >> > @aivanov-jdk Recently we have started to use the latter and remove the extra folder (`/4380543/`) >> >> Thank you for clarification, Harshitha. > > Yes, blame (?) me :-) > We may not always remember to point it out but it is what we want. > I've never seen the point in an extra level of folder except when the test is composed of multiple files all unique to the test. > I also request that new tests not be given names like bug87654321.java but instead be named in a way that you can tell what they are supposed to be testing like in this case something like RadioButtonMarginTest.java > > Sure @prrace , will rename the test. Harshitha also suggested that previously, I thought of retaining for this test. > > But it's not a new test. I guess you are moving it from closed to open, right? and recent PRs prefer keeping the same name to view the history of the test.. I dont object to it but we should be consistent.. I agree. Although I can't find many references to it in JBS, keeping the current name seems to be a better option than renaming. On the other hand, it's a manual test so it doesn't have the history in the automated test runs. I'm for keeping the current test name. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From aivanov at openjdk.java.net Thu Jun 2 07:54:24 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 2 Jun 2022 07:54:24 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v3] In-Reply-To: References: <1-qMJRwjJVXF7BSrl5NCpoR9KMRBirtjJY--Kr6JueU=.e4a087a3-a7bb-4a93-a6ad-4a26954de78e@github.com> Message-ID: On Thu, 2 Jun 2022 05:25:54 GMT, Tejesh R wrote: > > I can see no reason why the test is for Windows only. > > > > The original bug [JDK-4380543](https://bugs.openjdk.java.net/browse/JDK-4380543) lists all the operating systems as affected. Then [JDK-8134640](https://bugs.openjdk.java.net/browse/JDK-8134640) asked to support all Look-and-Feels, which somewhat implies other platforms should also be tested. > > Ok. Since this PR is about the movement of test from closed to open, I would like to retain it for Windows alone @aivanov-jdk as the bug fix [JDK-8134640](https://bugs.openjdk.java.net/browse/JDK-8134640) has been taken care for windows. Will surely plan for other L&F in sometime. Why can't we make it run on other platforms here? All it takes is removing `@requires (os.family == "windows")`. Well, obviously, you have to run it on macOS and Linux to make sure it works as expected. I think doing it right now is more than reasonable compared to submitting a new issue just to remove the OS restriction and going through the code review. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From mvs at openjdk.java.net Thu Jun 2 08:14:23 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Thu, 2 Jun 2022 08:14:23 GMT Subject: RFR: 8286822: Write a test to check the DND functionality between two InternalFrames [v2] In-Reply-To: References: Message-ID: > This test verifies that dragging from one InternalFrame and a drop target in another InternalFrame functions properly. > This fix moves an unstable closed applet based test to open regression based java test, but updated to be more comprehensive with some stabilisation improvements. The closed test was creating noise in CI as it often fails in Windows platform, especially in Windows 11. > > Testing: > 1. Tested using mach5 20 times per platform and got all Pass. > 2. Tested using mach5 5 times specifically on Windows 11 and got all Pass. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Following the process to convert a closed test to open, created a PR in closed space and got it reviewed, now updating this open PR ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8753/files - new: https://git.openjdk.java.net/jdk/pull/8753/files/7d00c305..aeb3edb1 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8753&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8753&range=00-01 Stats: 8 lines in 1 file changed: 0 ins; 4 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/8753.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8753/head:pull/8753 PR: https://git.openjdk.java.net/jdk/pull/8753 From mvs at openjdk.java.net Thu Jun 2 08:14:23 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Thu, 2 Jun 2022 08:14:23 GMT Subject: RFR: 8286822: Write a test to check the DND functionality between two InternalFrames [v2] In-Reply-To: <98d4QKHKLIaozF4R_bRk78e-ibxr7_ot6NBPbnqEw8U=.e4290fae-2a18-41cb-824c-a61541c4b27a@github.com> References: <98d4QKHKLIaozF4R_bRk78e-ibxr7_ot6NBPbnqEw8U=.e4290fae-2a18-41cb-824c-a61541c4b27a@github.com> Message-ID: On Fri, 20 May 2022 07:51:28 GMT, Tejesh R wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Following the process to convert a closed test to open, created a PR in closed space and got it reviewed, now updating this open PR > > test/jdk/java/awt/dnd/DropTargetInInternalFrameTest.java line 244: > >> 242: private final Dimension preferredDimension = new Dimension(200, 100); >> 243: private final CountDownLatch dropLatch; >> 244: private volatile int calledMethods = 0; > > Any reason for changing calledMethods to volatile? In order to get the updated data all the time, as this variable will be updated from EDT and the value will be read from main thread also. ------------- PR: https://git.openjdk.java.net/jdk/pull/8753 From aivanov at openjdk.java.net Thu Jun 2 08:10:35 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 2 Jun 2022 08:10:35 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v3] In-Reply-To: References: <1-qMJRwjJVXF7BSrl5NCpoR9KMRBirtjJY--Kr6JueU=.e4a087a3-a7bb-4a93-a6ad-4a26954de78e@github.com> Message-ID: On Thu, 2 Jun 2022 07:51:00 GMT, Alexey Ivanov wrote: >>> > > > I wonder why the test is Windows-specific if it allows changing Look and Feels. >>> > > > The only Look and Feel which ignores the background is Nimbus, other L&Fs on Windows at least paint the yellow and green background. As such, the test can be run on other platforms. >>> > > > Was the original bug in Windows Look and Feel? If so, you may want to make it the default L&F. >>> > > > The instructions don't mention anything about other Look and Feels. Does the tester have to verify each presented L&F? >>> > > >>> > > >>> > > I think the test was in windows which I might have retained the os type, will check and confirm once. The tester have to verify with each L&F for left margin check. >>> > >>> > >>> > Yeah, it was only for Motif and Windows before, so I have retained it for only windows os. >>> >>> I can see no reason why the test is for Windows only. >>> >>> The original bug [JDK-4380543](https://bugs.openjdk.java.net/browse/JDK-4380543) lists all the operating systems as affected. Then [JDK-8134640](https://bugs.openjdk.java.net/browse/JDK-8134640) asked to support all Look-and-Feels, which somewhat implies other platforms should also be tested. >> >> Ok. Since this PR is about the movement of test from closed to open, I would like to retain it for Windows alone @aivanov-jdk as the bug fix [JDK-8134640](https://bugs.openjdk.java.net/browse/JDK-8134640) has been taken care for windows. Will surely plan for other L&F in sometime. > >> > I can see no reason why the test is for Windows only. >> > >> > The original bug [JDK-4380543](https://bugs.openjdk.java.net/browse/JDK-4380543) lists all the operating systems as affected. Then [JDK-8134640](https://bugs.openjdk.java.net/browse/JDK-8134640) asked to support all Look-and-Feels, which somewhat implies other platforms should also be tested. >> >> Ok. Since this PR is about the movement of test from closed to open, I would like to retain it for Windows alone @aivanov-jdk as the bug fix [JDK-8134640](https://bugs.openjdk.java.net/browse/JDK-8134640) has been taken care for windows. Will surely plan for other L&F in sometime. > > Why can't we make it run on other platforms here? > > All it takes is removing `@requires (os.family == "windows")`. Well, obviously, you have to run it on macOS and Linux to make sure it works as expected. > > I think doing it right now is more than reasonable compared to submitting a new issue just to remove the OS restriction and going through the code review. > > > @aivanov-jdk Recently we have started to use the latter and remove the extra folder (`/4380543/`) > > > > Thank you for clarification, Harshitha. > > Yes, blame (?) me :-) > We may not always remember to point it out but it is what we want. I see. I noticed it in recent code reviews, so I wanted to clarify. > I've never seen the point in an extra level of folder except when the test is composed of multiple files all unique to the test. I agree to some extent? When using an IDE to compile and run a test, a separate folder is quite convenient: add it as test source, and you're done. When there are many tests in one folder, it could result in compilation errors. Some tests declare the same class names, a number of manual tests have `Sysout` class, and thus it causes duplicate class names, which makes it impossible to run a test right from IDE unless you take additional steps to resolve or prevent compilation errors. On the other hand, the shorter filesystem tree is easier to navigate. As such, flatter structure is the way to go. > I also request that new tests not be given names like bug87654321.java but instead be named in a way that you can tell what they are supposed to be testing like in this case something like RadioButtonMarginTest.java Descriptive names are easier to remember and to refer to, they give you an idea of what test does when you see a failure. With a bugid, you have to open the test source or the bug in JBS for getting that info. I fully support meaningful, descriptive names for new tests. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From aivanov at openjdk.java.net Thu Jun 2 08:21:19 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 2 Jun 2022 08:21:19 GMT Subject: RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray [v3] In-Reply-To: <1zmgKAKgBzh5-I4aGlM0Egx64C-Fv3r2Yhl5R0Mu5ho=.c67c08aa-8d49-4550-9e07-505a93be3840@github.com> References: <1zmgKAKgBzh5-I4aGlM0Egx64C-Fv3r2Yhl5R0Mu5ho=.c67c08aa-8d49-4550-9e07-505a93be3840@github.com> Message-ID: On Thu, 2 Jun 2022 00:36:28 GMT, Sergey Bylokhov wrote: > BTW I think that the usage of > `return icons.toArray(EMPTY_TRAY_ARRAY);` > is slower than any of other cases: presized or zero. So if we would like to use a similar pattern the zero version is better. Why is it? It's the same as `icons.toArray(new TrayIcon[0])` without creating a new zero-sized array. ------------- PR: https://git.openjdk.java.net/jdk/pull/8850 From mvs at openjdk.java.net Thu Jun 2 08:33:21 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Thu, 2 Jun 2022 08:33:21 GMT Subject: RFR: 8286772: java/awt/dnd/DropTargetInInternalFrameTest/DropTargetInInternalFrameTest.html times out and fails in Windows In-Reply-To: References: Message-ID: On Thu, 19 May 2022 16:15:05 GMT, Jayathirth D V wrote: > > > I dont see an internal PR to remove the applet based closed test. Also why https://bugs.openjdk.java.net/browse/JDK-8286822 is created as enhancement ? > > > If this test is failing intermittently how many times we have seen this test fail? Like out of 20 times how many times it will fail on Windows 11? This will help us understand how many times we need to test updated test. > > > > > > I will create an Internal PR to remove the closed test after this PR is integrated(for now I have created a closed bug to track this JDK-8286772). This test is added as a new test in open space, that's why JDK-8286822 was created as an enhancement. This test was failing 1/20 times in Windows 10, but it was failing almost 100% on Windows 11 before the fix. I have attached the failed mach5 runs also in the bug as a confidential comment. > > We dont create 2 separate JBS ID's for opening up closed test case. Opening up of test case and deleting closed test case should be handled in single JBS bug ID. Opening up a regression test case should not be handled as enhancement. We add so many of these regression tests as part of normal bugs along with product change. I have corrected this, now handling everything in a single bug [JDK-8286772](https://bugs.openjdk.java.net/browse/JDK-8286772). ------------- PR: https://git.openjdk.java.net/jdk/pull/8753 From tr at openjdk.java.net Thu Jun 2 09:14:30 2022 From: tr at openjdk.java.net (Tejesh R) Date: Thu, 2 Jun 2022 09:14:30 GMT Subject: RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v4] In-Reply-To: References: Message-ID: > _Header_ object not initialized/set when paint() method of `WindowTableHeaderUI` class is executed. The paint() event is executed through explicit call of `JTable.updateUI()` in the regression test. In order to set the _header_ to the _called_ JTable, it is set in the `getTableCellRendererComponent()` method, which in turn makes the _header_ object available during paint event without causing NPE. Tejesh R 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 14 additional commits since the last revision: - Updated based on review comments - Merge branch 'master' of https://git.openjdk.java.net/jdk into branch_6429812 - JTREG Tags updation - Removal of White space - Updated based on review comments and Added Test case TableRenderTest.java - header object set - Merge remote-tracking branch 'upstream/master' into branch_6429812 - Merge remote-tracking branch 'upstream/master' - Merge branch 'master' of github.com:TejeshR13/jdk - Merge branch 'openjdk:master' into master - ... and 4 more: https://git.openjdk.java.net/jdk/compare/a89bbd0c...98c2aab2 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8830/files - new: https://git.openjdk.java.net/jdk/pull/8830/files/f7b44322..98c2aab2 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8830&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8830&range=02-03 Stats: 104546 lines in 1509 files changed: 41748 ins; 52654 del; 10144 mod Patch: https://git.openjdk.java.net/jdk/pull/8830.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8830/head:pull/8830 PR: https://git.openjdk.java.net/jdk/pull/8830 From tr at openjdk.java.net Thu Jun 2 09:41:36 2022 From: tr at openjdk.java.net (Tejesh R) Date: Thu, 2 Jun 2022 09:41:36 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v5] In-Reply-To: References: Message-ID: <7Uq-_ddkYEjUIh6J-HSTdwLg9ghrbPEHtgDVHaK3ArM=.a0535b58-02df-4ee8-97ea-755e66e530e3@github.com> > Added test for checking setMargin() of JRadioButton. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Removed windows specific jtreg ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8721/files - new: https://git.openjdk.java.net/jdk/pull/8721/files/5d4adb7f..43cbe746 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=03-04 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8721.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8721/head:pull/8721 PR: https://git.openjdk.java.net/jdk/pull/8721 From tr at openjdk.java.net Thu Jun 2 09:41:37 2022 From: tr at openjdk.java.net (Tejesh R) Date: Thu, 2 Jun 2022 09:41:37 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v3] In-Reply-To: References: <1-qMJRwjJVXF7BSrl5NCpoR9KMRBirtjJY--Kr6JueU=.e4a087a3-a7bb-4a93-a6ad-4a26954de78e@github.com> Message-ID: On Thu, 2 Jun 2022 07:51:00 GMT, Alexey Ivanov wrote: > > > I can see no reason why the test is for Windows only. > > > The original bug [JDK-4380543](https://bugs.openjdk.java.net/browse/JDK-4380543) lists all the operating systems as affected. Then [JDK-8134640](https://bugs.openjdk.java.net/browse/JDK-8134640) asked to support all Look-and-Feels, which somewhat implies other platforms should also be tested. > > > > > > Ok. Since this PR is about the movement of test from closed to open, I would like to retain it for Windows alone @aivanov-jdk as the bug fix [JDK-8134640](https://bugs.openjdk.java.net/browse/JDK-8134640) has been taken care for windows. Will surely plan for other L&F in sometime. > > Why can't we make it run on other platforms here? > > All it takes is removing `@requires (os.family == "windows")`. Well, obviously, you have to run it on macOS and Linux to make sure it works as expected. > > I think doing it right now is more than reasonable compared to submitting a new issue just to remove the OS restriction and going through the code review. Sorry, had really misunderstood what you had meant, removing os specific is a great idea. Thank you @aivanov-jdk . ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From avu at openjdk.java.net Thu Jun 2 09:53:26 2022 From: avu at openjdk.java.net (Alexey Ushakov) Date: Thu, 2 Jun 2022 09:53:26 GMT Subject: RFR: 8287453: RenderPerfTest incorrectly measures performance In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 09:45:32 GMT, Alexey Ushakov wrote: > Another bug needs to be filed for tests having lower performance with the Metal pipeline as compared to OpenGL pipeline. I've filed [JDK-8287694](https://bugs.openjdk.java.net/browse/JDK-8287694) ------------- PR: https://git.openjdk.java.net/jdk/pull/8928 From tr at openjdk.java.net Thu Jun 2 12:25:18 2022 From: tr at openjdk.java.net (Tejesh R) Date: Thu, 2 Jun 2022 12:25:18 GMT Subject: RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v5] In-Reply-To: References: Message-ID: > _Header_ object not initialized/set when paint() method of `WindowTableHeaderUI` class is executed. The paint() event is executed through explicit call of `JTable.updateUI()` in the regression test. In order to set the _header_ to the _called_ JTable, it is set in the `getTableCellRendererComponent()` method, which in turn makes the _header_ object available during paint event without causing NPE. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Changed from manual to Automatic Test ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8830/files - new: https://git.openjdk.java.net/jdk/pull/8830/files/98c2aab2..1ac4d7b5 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8830&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8830&range=03-04 Stats: 30 lines in 1 file changed: 20 ins; 7 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/8830.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8830/head:pull/8830 PR: https://git.openjdk.java.net/jdk/pull/8830 From tr at openjdk.java.net Thu Jun 2 13:06:36 2022 From: tr at openjdk.java.net (Tejesh R) Date: Thu, 2 Jun 2022 13:06:36 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v6] In-Reply-To: References: Message-ID: > Added test for checking setMargin() of JRadioButton. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on review comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8721/files - new: https://git.openjdk.java.net/jdk/pull/8721/files/43cbe746..97aaa1b2 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=04-05 Stats: 37 lines in 1 file changed: 3 ins; 21 del; 13 mod Patch: https://git.openjdk.java.net/jdk/pull/8721.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8721/head:pull/8721 PR: https://git.openjdk.java.net/jdk/pull/8721 From psadhukhan at openjdk.java.net Thu Jun 2 13:27:26 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 2 Jun 2022 13:27:26 GMT Subject: RFR: 8190907: Windows 10 default Korean Font Malgun Gothic available not used by GUI elements even though available without Korean Language Pack [v6] In-Reply-To: References: <_cAab99k8SxU4y3G_FwRT3fg8t39fYQUDTdEwOZYZmc=.5d71beab-25a0-4c29-b194-d4680961b530@github.com> Message-ID: On Wed, 1 Jun 2022 20:50:47 GMT, Phil Race wrote: > Malgun is now not appearing in the font menu of Font2DTest when I use ko + UTF-8 !? > It appears if I use -Dfile.encoding=ko instead Are you implying it used to appear earlier? with what configuration or patch? It is same for me but I haven't run Font2DTest earlier with this patch so could not say if it used to work without file.encoding=ko. It seems to not appear even with -Duser.language=ko -Duser.country=KR -Dfile.encoding=ko. I also tried adding "ko" to 8285308 fix but to no avail. ------------- PR: https://git.openjdk.java.net/jdk/pull/7643 From kizune at openjdk.java.net Thu Jun 2 14:10:36 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Thu, 2 Jun 2022 14:10:36 GMT Subject: RFR: 8282526: Default icon is not painted properly [v4] In-Reply-To: References: <8vrDNTJTPocLihty5ZMoBaqGEX23B4gXxis8TtBvuZ8=.5700255b-33a0-4b17-bbb2-523f5a19e9c8@github.com> Message-ID: On Thu, 2 Jun 2022 00:08:48 GMT, Sergey Bylokhov wrote: > Time: 21313400 > Time: 4036200 > Time: 1140613100 > Time: 839499200 These are some extreme numbers, on my system it is more like 8 to 10 times slower depending on the run: Time: 13250900 Time: 10126200 Time: 113548000 Time: 113630100 But still - the question is: how big the difference will be in the real application, knowing that we only apply this hint to a small minority of the cases and difference for single repaint (which is cached and not like we re-draw it continuously) so can we neglect the performance variation to achieve better visual result? I think the answer is yes, we are trying to mimic the system behavior and on modern systems the icons in native applications do look much better then what we produce. ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From aghaisas at openjdk.java.net Thu Jun 2 14:23:27 2022 From: aghaisas at openjdk.java.net (Ajit Ghaisas) Date: Thu, 2 Jun 2022 14:23:27 GMT Subject: RFR: 8287600: AA Ovals not rendered under metal In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 20:21:40 GMT, Alexey Ushakov wrote: > Commit command buffer after MTL_OP_MASK_OP operation All test run is fine with this change. ------------- Marked as reviewed by aghaisas (Committer). PR: https://git.openjdk.java.net/jdk/pull/8981 From tr at openjdk.java.net Thu Jun 2 15:32:11 2022 From: tr at openjdk.java.net (Tejesh R) Date: Thu, 2 Jun 2022 15:32:11 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v7] In-Reply-To: References: Message-ID: <5X_sWM6JdbzBhbh1jHzg-03IgrQ6_A3VpudPIPdmW28=.dca81bba-fa38-4e30-bd07-860ef793155c@github.com> > Added test for checking setMargin() of JRadioButton. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Removed whitespaces ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8721/files - new: https://git.openjdk.java.net/jdk/pull/8721/files/97aaa1b2..79dd0e14 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=06 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=05-06 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/8721.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8721/head:pull/8721 PR: https://git.openjdk.java.net/jdk/pull/8721 From tr at openjdk.java.net Thu Jun 2 16:04:32 2022 From: tr at openjdk.java.net (Tejesh R) Date: Thu, 2 Jun 2022 16:04:32 GMT Subject: RFR: JDK-8287261: [macos] JList Focus Ring color doesn't follow Accent color changes on macOS [v2] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 19:40:34 GMT, Harshitha Onkar wrote: >> With the proposed fix, JList's focus ring color follows accent color changes. Previously the focus ring for JList was not prominently visible and did not follow accent color changes. >> >> While investing a similar issue related to JTable (https://github.com/openjdk/jdk/pull/7768#discussion_r839813517), it was observed that List.focusCellHighlightBorder was using the cellFocusRing color as well. This PR extends the focus ring accent color changes to JLists. >> >> Related issues: [JDK-7124282](https://bugs.openjdk.java.net/browse/JDK-7124282) , [JDK-8261243](https://bugs.openjdk.java.net/browse/JDK-8261243) >> >> #### Summary of changes >> >> - focusCellHighlightBorder in `AquaLookAndFeel` changed which is used for cell border for lists and tables >> - code related to on-the-fly focus ring color refactored into a separate method (`changeFocusRingColor()`) for re-usability >> - `changeFocusRingColor()` called when PropertyChangeEvent == FRAME_ACTIVE_PROPERTY and the frame gains focus, instead of calling in individual `swapSelectionColors` in `AquaFocusHandler.java` >> - Common test added - `CellFocusRingTest`, which tests for both cases - Tables & Lists. >> >> **Before and After screenshots of JList** _(Screenshots from SwingSet2 demo)_ >> >> ![Screen Shot 2022-05-25 at 3 55 49 PM](https://user-images.githubusercontent.com/95945681/170382727-54ed155b-6f08-4c75-8657-89c15764e1cd.png) > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > removed redundant null checks in test Marked as reviewed by tr (Author). ------------- PR: https://git.openjdk.java.net/jdk/pull/8896 From asemenov at openjdk.java.net Thu Jun 2 16:14:35 2022 From: asemenov at openjdk.java.net (Artem Semenov) Date: Thu, 2 Jun 2022 16:14:35 GMT Subject: RFR: 8287740 NSAccessibilityShowMenuAction not working for text editors Message-ID: The NSAccessibilityShouMinuAction action does not show the menu for the text element. Steps to reproduce: 1. redefine the accessible context with the addition of the toggle popup action; 2. run on macOS with VoiceOver enabled; 3. try to call the context menu in the editor by pressing vo+shift+m. @azuev-java please review. ------------- Commit messages: - 8287740 NSAccessibilityShowMenuAction not working for text editors Changes: https://git.openjdk.java.net/jdk/pull/8997/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8997&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8287740 Stats: 106 lines in 2 files changed: 97 ins; 6 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/8997.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8997/head:pull/8997 PR: https://git.openjdk.java.net/jdk/pull/8997 From honkar at openjdk.java.net Thu Jun 2 17:21:23 2022 From: honkar at openjdk.java.net (Harshitha Onkar) Date: Thu, 2 Jun 2022 17:21:23 GMT Subject: RFR: JDK-8287261: [macos] JList Focus Ring color doesn't follow Accent color changes on macOS [v2] In-Reply-To: <0qBB8EiFX2jC8stWm73ILBjH9b4n5ejPaH1F1xtS1W0=.1eb0f8d4-4458-4957-a460-4acc6bba77bd@github.com> References: <0qBB8EiFX2jC8stWm73ILBjH9b4n5ejPaH1F1xtS1W0=.1eb0f8d4-4458-4957-a460-4acc6bba77bd@github.com> Message-ID: On Thu, 2 Jun 2022 00:55:07 GMT, Sergey Bylokhov wrote: > Can you please double check how the native applications/components look when the colors are "similar". @mrserb There are different variations in the native applications - On Reminders App the background color remains the same (light gray) irrespective of changes in accent color. Screen Shot 2022-06-02 at 9 54 06 AM On edit mode it changes to - Screen Shot 2022-06-02 at 9 59 20 AM Under notification settings - the background color changes with accent color but it doesn't have a focus ring. Screen Shot 2022-06-02 at 10 03 13 AM At present a focus ring is added to JLists, but since it is almost the same color as the background it is not visible. To keep it consistent with JTable changes, the ring color is made brighter and prominent. Please let me know your suggestion or thoughts on the changes. ------------- PR: https://git.openjdk.java.net/jdk/pull/8896 From kizune at openjdk.java.net Thu Jun 2 17:30:36 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Thu, 2 Jun 2022 17:30:36 GMT Subject: RFR: 8282526: Default icon is not painted properly [v4] In-Reply-To: References: Message-ID: <394ZKlHeBY6tayJABl4zkng4n2g5Yb_zb3iJIsVTUXc=.bfae05cb-6d3e-4b8d-93d6-03f87d1b10a3@github.com> On Wed, 16 Mar 2022 05:36:04 GMT, Sergey Bylokhov wrote: >>> This might be a rookie question: >>> >>> When it comes to modifying and restoring a Graphics, I've seen two common patterns: A. Call `newG = g.create()` and later `newG.dispose()` B. Call `g.setX(newValue)` and then call `g.setX(oldValue)` later >>> >>> Is there guidance on when to use which? Or is one always preferred? >> >> Usually i follow the rule of minimal action. When i need to set a lot of hints that needs to be later unrolled such as changing graphics coordinates and such - i'm creating a new Graphics. When i only need to manipulate a single hint and it can easily be unrolled - i am using the same object. In this case i'm changing just a single hint. > > I am not sure that this is the right place to change the hints. > If we want to always scale the icon using the bicubic interpolation then it is better to do it where we call the paintIcon() method in some jcomponent(this probably may be configured by some option - similar to the text antialisaing). But it will affect performance since the bicubic is much slower. > > But before discussing this shared code change could you please provide some info on why it worked fine before? Why we try to downscale the image and do not get an exact size from the native. The reason for the issue to manifest is that due to the high resolution icon fix on Windows we are returning a multiresolution image now and the new code that fetches the icons for some icons returns 32x32 icon no matter what resolution is requested so we ended up with an 16x16 multiresolution icon with only variant available 32x32 so icon painter is doing the scaling. One of the possible solutions i considered is to interpolate the icon in the process of creation but that will only hide the problem because you see - in my test i was able to reproduce the scaling problem without the Windows code, simply by wrapping the larger icon into smaller MultiResolutionIcon. And i do not think that changing hints in every component is a good idea - because it will require these components to be much more aware of the icon's internal mechanic which is not a great idea. And taking into consuderation that we only enable bicubic interpolation for icons that really require it - when icon does not ha ve a resolution variant that fits the current icon's size - it should not be a serious performance impact. In majority of the cases interpolation is not required. ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From kizune at openjdk.java.net Thu Jun 2 17:30:39 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Thu, 2 Jun 2022 17:30:39 GMT Subject: RFR: 8282526: Default icon is not painted properly [v4] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 23:44:23 GMT, Sergey Bylokhov wrote: > Do we need to update the size value and take into account the low/hi sizes? Not exactly, the issue is that for some files (but just for some of them) this call ignores the high icon size parameter and always returns the set of small and large icons as 16x16 plus 32x32. For the rest of the files it returns 16x16 and the requested size. If low size is not set it is assumed to be 16x16 so we can omit setting it. > Does it mean that we will extract all images except on the sides twice? for 16x16 we will extract 16x16 and 32x32 on the next iteration for 32x32 we will extract 32x32 and 64x64? No, on the next iteration we will extract 16x16 and 64x64. So on each iteration we are going to extract additionally 16x16 icon and if size is 24 or more than we will ignore it. Since all the icons requested are cached that will not cause any performance degradation. ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From kizune at openjdk.java.net Thu Jun 2 17:30:43 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Thu, 2 Jun 2022 17:30:43 GMT Subject: RFR: 8282526: Default icon is not painted properly [v4] In-Reply-To: References: Message-ID: <3REYfBcQCMQm54PRhxHa4ZKtz1Xtvse9p2T_48Xfgmc=.2bbc334d-77e6-40ff-8ce6-d3fad161560a@github.com> On Mon, 14 Mar 2022 02:29:47 GMT, Jeremy wrote: >> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: >> >> Use small icon pointer for icons less than 24 pixels wide - this way we >> get the 16x16 icon which is better for scaling purposes. > > test/jdk/javax/swing/ImageIcon/MultiResolutionImageIcon.java line 127: > >> 125: return null; >> 126: } >> 127: } > > This test reads a little strange to me. (I'm not an official openjdk reviewer, though, so feel free to disregard.) > > If I run this test with the existing ImageIcon class it creates an image that resembles: > ![image](https://user-images.githubusercontent.com/7669569/158093894-be7a73c6-6936-4725-bb09-cd054a2dccc2.png) > > If I run this test with the revised code it creates an image that resembles: > ![image](https://user-images.githubusercontent.com/7669569/158093939-bffc62c7-7a5c-4b0e-b71e-710c5049daf6.png) > > Based on the changes in ImageIcon: I only expected to see changes related to rendering hints. (That is: I expected to see differences in antialiasing and scaling artifacts.) > > Would you mind if I proposed a different test? Well, the difference in the images generated is the demonstration of how significant parts of the original image gets lost during the rendering. Not sure why you think this test is not valid. ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From kizune at openjdk.java.net Thu Jun 2 18:15:35 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Thu, 2 Jun 2022 18:15:35 GMT Subject: RFR: 8282526: Default icon is not painted properly [v4] In-Reply-To: References: Message-ID: <3Dse5Mi4Lsodr2ytpTSGqNaRLiUcp4928refltpwCGw=.d3c9d1e7-8954-4356-badf-dcd2f8209fbf@github.com> On Thu, 2 Jun 2022 17:26:49 GMT, Alexander Zuev wrote: >> src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp line 993: >> >>> 991: } else { >>> 992: fn_DestroyIcon((HICON)hIconSmall); >>> 993: } >> >> Does it mean that we will extract all images except on the sides twice? for 16x16 we will extract 16x16 and 32x32 on the next iteration for 32x32 we will extract 32x32 and 64x64? >> >> Can we try to do that via different API: https://devblogs.microsoft.com/oldnewthing/20140501-00/?p=1103 probably it will work better? > >> Does it mean that we will extract all images except on the sides twice? for 16x16 we will extract 16x16 and 32x32 on the next iteration for 32x32 we will extract 32x32 and 64x64? > > No, on the next iteration we will extract 16x16 and 64x64. So on each iteration we are going to extract additionally 16x16 icon and if size is 24 or more than we will ignore it. Since all the icons requested are cached that will not cause any performance degradation. > Can we try to do that via different API: https://devblogs.microsoft.com/oldnewthing/20140501-00/?p=1103 probably it will work better? No, during initial implementation i tried it and it worked even worse and less stable. ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From azvegint at openjdk.java.net Thu Jun 2 20:19:50 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Thu, 2 Jun 2022 20:19:50 GMT Subject: RFR: 8273573: [macos12] ActionListenerCalledTwiceTest.java fails on macOS 12 Message-ID: This test was failing consistently on same machines and at the same time as #8532. Test failure is also no longer reproducible after #8320 fix. This is macOS only test, so corresponding `@requires os.family` tag was added. Testing is green. ------------- Commit messages: - os.family - initial Changes: https://git.openjdk.java.net/jdk/pull/9003/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=9003&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273573 Stats: 2 lines in 2 files changed: 1 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/9003.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/9003/head:pull/9003 PR: https://git.openjdk.java.net/jdk/pull/9003 From bourges.laurent at gmail.com Thu Jun 2 20:48:25 2022 From: bourges.laurent at gmail.com (=?UTF-8?Q?Laurent_Bourg=C3=A8s?=) Date: Thu, 2 Jun 2022 22:48:25 +0200 Subject: Any interest in JDK-8264999 (stroke miter edge case in Marlin) In-Reply-To: References: Message-ID: Jeremy, I hope you are doing well. As jdk9 rdp1 is next week, do you plan this bug to be ready for this short window or not ? Laurent Le dim. 29 mai 2022, 09:31, Laurent Bourg?s a ?crit : > One more general comment on this bug: > what is expected when lineTo() does not change last point after all other > possible operations ? > - lineTo, lineto (this bug) > - quadTo, lineto > - cubicTo, lineto > - moveto, lineto: point (ok) > - close, lineto(star: equiv to close, move start, lineto start: point > start (ok ?) > > If any drawing operation in progress (lineto, quadto, curveto), then skip > repeated end point is the specified behaviour. > > Laurent > > Le mer. 25 mai 2022, 08:57, Laurent Bourg?s a > ?crit : > >> In Stroker, this lines seems causing the problem: >> >> https://github.com/openjdk/jdk/blob/a0cccb54791d954bf08da5aac9b9794e370617c8/src/java.desktop/share/classes/sun/java2d/marlin/Stroker.java#L568 >> >> If delta is 0, then tangent is (1, 0) ! >> Should be: >> If drawOp was lineTo and delta is 0, return (skip). >> >> I wonder if there are other renderer suffering the same problem. >> Phil, how could we generalize this kind of path operation filtering ? >> >> My 2 cents, >> Laurent >> >> Le mer. 25 mai 2022, 08:15, Laurent Bourg?s >> a ?crit : >> >>> Jeremy, >>> >>> Probably your fix could be plugged in marlin pathTo() : >>> >>> https://github.com/openjdk/jdk/blob/742644e291039e4f2f30cf80718669c06da5809c/src/java.desktop/share/classes/sun/java2d/marlin/DMarlinRenderingEngine.java#L768 >>> >>> Or in Stroker lineTo... >>> >>> Laurent >>> >>> Le mar. 24 mai 2022, 22:55, Jeremy Wood a ?crit : >>> >>>> I may still move it in the Stroker classes. There are a few other >>>> things >>>> I want to look at, too. This is a very rough draft I put together in >>>> under an hour; I just wanted to make sure it was worth pursuing before >>>> I >>>> put more time into it. >>>> >>>> - Jeremy >>>> >>>> >>>> ------ Original Message ------ >>>> From "Laurent Bourg?s" >>>> To "Jeremy Wood" >>>> Cc client-libs-dev at openjdk.java.net >>>> Date 5/24/2022 4:35:21 PM >>>> Subject Re: Any interest in JDK-8264999 (stroke miter edge case in >>>> Marlin) >>>> >>>> >Thanks Jereremy for the notification I was not aware of this one. >>>> > >>>> >I wonder if the problem should be fixed inside the marlin renderer >>>> >Stroker that should ignore such useless lineTo... >>>> > >>>> >I will read your code and try to figure out potential causes in >>>> stroker >>>> >and give you my feedback. >>>> > >>>> >Laurent >>>> > >>>> >Le mar. 24 mai 2022, 19:52, Jeremy Wood a >>>> ?crit >>>> >: >>>> >>This is a P3 ticket currently assigned to Philip Race: >>>> >>https://bugs.openjdk.java.net/browse/JDK-8264999 >>>> >> >>>> >>If I put together a PR: Is anyone available/willing to help review it? >>>> >> >>>> >>I made a rough draft >>>> >>< >>>> https://github.com/openjdk/jdk/compare/master...mickleness:JDK-8264999?expand=1 >>>> > >>>> >>of a potential solution last night. I can continue to work on this, >>>> or >>>> >>I >>>> >>can move on if the interest isn?t there. >>>> >> >>>> >>(No urgency at all.) >>>> >> >>>> >>Regards, >>>> >> - Jeremy >>>> >> >>>> >>> From mickleness at gmail.com Thu Jun 2 21:35:57 2022 From: mickleness at gmail.com (Jeremy Wood) Date: Thu, 02 Jun 2022 21:35:57 +0000 Subject: Any interest in JDK-8264999 (stroke miter edge case in Marlin) In-Reply-To: References: Message-ID: Laurent, I made a very modest PR here: https://github.com/openjdk/jdk/pull/8943 I wasn?t aware there was a deadline coming up; thanks for letting me know. This passes my current test, but depending on code review feedback it?s hard to predict if this will be ready by next week. - Jeremy ------ Original Message ------ >From "Laurent Bourg?s" To "Jeremy Wood" Cc client-libs-dev at openjdk.java.net Date 6/2/2022 4:48:25 PM Subject Re: Re[2]: Any interest in JDK-8264999 (stroke miter edge case in Marlin) >Jeremy, > >I hope you are doing well. > >As jdk9 rdp1 is next week, do you plan this bug to be ready for this >short window or not ? > >Laurent > >Le dim. 29 mai 2022, 09:31, Laurent Bourg?s >a ?crit : >>One more general comment on this bug: >>what is expected when lineTo() does not change last point after all >>other possible operations ? >>- lineTo, lineto (this bug) >>- quadTo, lineto >>- cubicTo, lineto >>- moveto, lineto: point (ok) >>- close, lineto(star: equiv to close, move start, lineto start: point >>start (ok ?) >> >>If any drawing operation in progress (lineto, quadto, curveto), then >>skip repeated end point is the specified behaviour. >> >>Laurent >> >>Le mer. 25 mai 2022, 08:57, Laurent Bourg?s >> a ?crit : >>>In Stroker, this lines seems causing the problem: >>>https://github.com/openjdk/jdk/blob/a0cccb54791d954bf08da5aac9b9794e370617c8/src/java.desktop/share/classes/sun/java2d/marlin/Stroker.java#L568 >>> >>>If delta is 0, then tangent is (1, 0) ! >>>Should be: >>>If drawOp was lineTo and delta is 0, return (skip). >>> >>>I wonder if there are other renderer suffering the same problem. >>>Phil, how could we generalize this kind of path operation filtering ? >>> >>>My 2 cents, >>>Laurent >>> >>>Le mer. 25 mai 2022, 08:15, Laurent Bourg?s >>> a ?crit : >>>>Jeremy, >>>> >>>>Probably your fix could be plugged in marlin pathTo() : >>>>https://github.com/openjdk/jdk/blob/742644e291039e4f2f30cf80718669c06da5809c/src/java.desktop/share/classes/sun/java2d/marlin/DMarlinRenderingEngine.java#L768 >>>> >>>>Or in Stroker lineTo... >>>> >>>>Laurent >>>> >>>>Le mar. 24 mai 2022, 22:55, Jeremy Wood a >>>>?crit : >>>>>I may still move it in the Stroker classes. There are a few other >>>>>things >>>>>I want to look at, too. This is a very rough draft I put together >>>>>in >>>>>under an hour; I just wanted to make sure it was worth pursuing >>>>>before I >>>>>put more time into it. >>>>> >>>>> - Jeremy >>>>> >>>>> >>>>>------ Original Message ------ >>>>>From "Laurent Bourg?s" >>>>>To "Jeremy Wood" >>>>>Cc client-libs-dev at openjdk.java.net >>>>>Date 5/24/2022 4:35:21 PM >>>>>Subject Re: Any interest in JDK-8264999 (stroke miter edge case in >>>>>Marlin) >>>>> >>>>> >Thanks Jereremy for the notification I was not aware of this one. >>>>> > >>>>> >I wonder if the problem should be fixed inside the marlin renderer >>>>> >Stroker that should ignore such useless lineTo... >>>>> > >>>>> >I will read your code and try to figure out potential causes in >>>>>stroker >>>>> >and give you my feedback. >>>>> > >>>>> >Laurent >>>>> > >>>>> >Le mar. 24 mai 2022, 19:52, Jeremy Wood a >>>>>?crit >>>>> >: >>>>> >>This is a P3 ticket currently assigned to Philip Race: >>>>> >>https://bugs.openjdk.java.net/browse/JDK-8264999 >>>>> >> >>>>> >>If I put together a PR: Is anyone available/willing to help >>>>>review it? >>>>> >> >>>>> >>I made a rough draft >>>>> >> >>>>> >>of a potential solution last night. I can continue to work on >>>>>this, or >>>>> >>I >>>>> >>can move on if the interest isn?t there. >>>>> >> >>>>> >>(No urgency at all.) >>>>> >> >>>>> >>Regards, >>>>> >> - Jeremy >>>>> >> From serb at openjdk.java.net Thu Jun 2 21:51:33 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Jun 2022 21:51:33 GMT Subject: RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray [v3] In-Reply-To: References: <1zmgKAKgBzh5-I4aGlM0Egx64C-Fv3r2Yhl5R0Mu5ho=.c67c08aa-8d49-4550-9e07-505a93be3840@github.com> Message-ID: <5SH_KFNr0P2qlV7JwxrkYrnNDYgm3JiUv8izisiLZmI=.a3abcf0f-3fa8-4ee6-b6a5-0e3e3e3a85ef@github.com> On Thu, 2 Jun 2022 08:18:21 GMT, Alexey Ivanov wrote: >> BTW I think that the usage of >> `return icons.toArray(EMPTY_TRAY_ARRAY);` >> is slower than any of other cases: presized or zero. So if we would like to use a similar pattern the zero version is better. > >> BTW I think that the usage of >> `return icons.toArray(EMPTY_TRAY_ARRAY);` >> is slower than any of other cases: presized or zero. So if we would like to use a similar pattern the zero version is better. > > Why is it? It's the same as `icons.toArray(new TrayIcon[0])` without creating a new zero-sized array. It should be checked of course, but in zero case the size is known by the compiler not sure that in the cached case it can make the same optimizations. The article above said the cached case is a "marginal improvement over new Foo[0]" ------------- PR: https://git.openjdk.java.net/jdk/pull/8850 From serb at openjdk.java.net Thu Jun 2 21:53:32 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Jun 2022 21:53:32 GMT Subject: RFR: 8282526: Default icon is not painted properly [v4] In-Reply-To: <3Dse5Mi4Lsodr2ytpTSGqNaRLiUcp4928refltpwCGw=.d3c9d1e7-8954-4356-badf-dcd2f8209fbf@github.com> References: <3Dse5Mi4Lsodr2ytpTSGqNaRLiUcp4928refltpwCGw=.d3c9d1e7-8954-4356-badf-dcd2f8209fbf@github.com> Message-ID: On Thu, 2 Jun 2022 18:12:26 GMT, Alexander Zuev wrote: >>> Does it mean that we will extract all images except on the sides twice? for 16x16 we will extract 16x16 and 32x32 on the next iteration for 32x32 we will extract 32x32 and 64x64? >> >> No, on the next iteration we will extract 16x16 and 64x64. So on each iteration we are going to extract additionally 16x16 icon and if size is 24 or more than we will ignore it. Since all the icons requested are cached that will not cause any performance degradation. > >> Can we try to do that via different API: https://devblogs.microsoft.com/oldnewthing/20140501-00/?p=1103 probably it will work better? > > No, during initial implementation i tried it and it worked even worse and less stable. But can we use it as a backup if the system does not return the expected size on the initial/current call? ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From bourges.laurent at gmail.com Thu Jun 2 22:00:50 2022 From: bourges.laurent at gmail.com (=?UTF-8?Q?Laurent_Bourg=C3=A8s?=) Date: Fri, 3 Jun 2022 00:00:50 +0200 Subject: Any interest in JDK-8264999 (stroke miter edge case in Marlin) In-Reply-To: References: Message-ID: Hi Jeremy, I quickly tested my modified path with the extra condition and noticed so difference in my tests + fixed the original reproducer code. It is quite trivial ~ 3 lines in Stroker so it seems doable to release this fix on time. I will look at your test code and see how to test few more cases : quad(..., end) + lineto(end) and cubicto(..., end) + lineto(end). Anyway this looks good to fix. Let's see if phil or anybody else has a slot for a simple review next week. Roadmap: https://openjdk.org/projects/jdk/19/ Deadline for integration is june 9th. Cheers, Laurent Le jeu. 2 juin 2022, 23:36, Jeremy Wood a ?crit : > Laurent, > > I made a very modest PR here: > > https://github.com/openjdk/jdk/pull/8943 > > I wasn?t aware there was a deadline coming up; thanks for letting me > know. > > This passes my current test, but depending on code review feedback it?s > hard to predict if this will be ready by next week. > > - Jeremy > > ------ Original Message ------ > From "Laurent Bourg?s" > To "Jeremy Wood" > Cc client-libs-dev at openjdk.java.net > Date 6/2/2022 4:48:25 PM > Subject Re: Re[2]: Any interest in JDK-8264999 (stroke miter edge case > in Marlin) > > >Jeremy, > > > >I hope you are doing well. > > > >As jdk9 rdp1 is next week, do you plan this bug to be ready for this > >short window or not ? > > > >Laurent > > > >Le dim. 29 mai 2022, 09:31, Laurent Bourg?s > >a ?crit : > >>One more general comment on this bug: > >>what is expected when lineTo() does not change last point after all > >>other possible operations ? > >>- lineTo, lineto (this bug) > >>- quadTo, lineto > >>- cubicTo, lineto > >>- moveto, lineto: point (ok) > >>- close, lineto(star: equiv to close, move start, lineto start: point > >>start (ok ?) > >> > >>If any drawing operation in progress (lineto, quadto, curveto), then > >>skip repeated end point is the specified behaviour. > >> > >>Laurent > >> > >>Le mer. 25 mai 2022, 08:57, Laurent Bourg?s > >> a ?crit : > >>>In Stroker, this lines seems causing the problem: > >>> > https://github.com/openjdk/jdk/blob/a0cccb54791d954bf08da5aac9b9794e370617c8/src/java.desktop/share/classes/sun/java2d/marlin/Stroker.java#L568 > >>> > >>>If delta is 0, then tangent is (1, 0) ! > >>>Should be: > >>>If drawOp was lineTo and delta is 0, return (skip). > >>> > >>>I wonder if there are other renderer suffering the same problem. > >>>Phil, how could we generalize this kind of path operation filtering ? > >>> > >>>My 2 cents, > >>>Laurent > >>> > >>>Le mer. 25 mai 2022, 08:15, Laurent Bourg?s > >>> a ?crit : > >>>>Jeremy, > >>>> > >>>>Probably your fix could be plugged in marlin pathTo() : > >>>> > https://github.com/openjdk/jdk/blob/742644e291039e4f2f30cf80718669c06da5809c/src/java.desktop/share/classes/sun/java2d/marlin/DMarlinRenderingEngine.java#L768 > >>>> > >>>>Or in Stroker lineTo... > >>>> > >>>>Laurent > >>>> > >>>>Le mar. 24 mai 2022, 22:55, Jeremy Wood a > >>>>?crit : > >>>>>I may still move it in the Stroker classes. There are a few other > >>>>>things > >>>>>I want to look at, too. This is a very rough draft I put together > >>>>>in > >>>>>under an hour; I just wanted to make sure it was worth pursuing > >>>>>before I > >>>>>put more time into it. > >>>>> > >>>>> - Jeremy > >>>>> > >>>>> > >>>>>------ Original Message ------ > >>>>>From "Laurent Bourg?s" > >>>>>To "Jeremy Wood" > >>>>>Cc client-libs-dev at openjdk.java.net > >>>>>Date 5/24/2022 4:35:21 PM > >>>>>Subject Re: Any interest in JDK-8264999 (stroke miter edge case in > >>>>>Marlin) > >>>>> > >>>>> >Thanks Jereremy for the notification I was not aware of this one. > >>>>> > > >>>>> >I wonder if the problem should be fixed inside the marlin renderer > >>>>> >Stroker that should ignore such useless lineTo... > >>>>> > > >>>>> >I will read your code and try to figure out potential causes in > >>>>>stroker > >>>>> >and give you my feedback. > >>>>> > > >>>>> >Laurent > >>>>> > > >>>>> >Le mar. 24 mai 2022, 19:52, Jeremy Wood a > >>>>>?crit > >>>>> >: > >>>>> >>This is a P3 ticket currently assigned to Philip Race: > >>>>> >>https://bugs.openjdk.java.net/browse/JDK-8264999 > >>>>> >> > >>>>> >>If I put together a PR: Is anyone available/willing to help > >>>>>review it? > >>>>> >> > >>>>> >>I made a rough draft > >>>>> >>< > https://github.com/openjdk/jdk/compare/master...mickleness:JDK-8264999?expand=1 > > > >>>>> >>of a potential solution last night. I can continue to work on > >>>>>this, or > >>>>> >>I > >>>>> >>can move on if the interest isn?t there. > >>>>> >> > >>>>> >>(No urgency at all.) > >>>>> >> > >>>>> >>Regards, > >>>>> >> - Jeremy > >>>>> >> > From bourges.laurent at gmail.com Thu Jun 2 22:07:26 2022 From: bourges.laurent at gmail.com (=?UTF-8?Q?Laurent_Bourg=C3=A8s?=) Date: Fri, 3 Jun 2022 00:07:26 +0200 Subject: Any interest in JDK-8264999 (stroke miter edge case in Marlin) In-Reply-To: References: Message-ID: Sorry, I corrected 2 typo error: I quickly tested my modified patch with the extra condition and noticed no difference in my tests + fixed the original reproducer code. Laurent Le ven. 3 juin 2022, 00:00, Laurent Bourg?s a ?crit : > Hi Jeremy, > > I quickly tested my modified path with the extra condition and noticed so > difference in my tests + fixed the original reproducer code. > > It is quite trivial ~ 3 lines in Stroker so it seems doable to release > this fix on time. > > I will look at your test code and see how to test few more cases : > quad(..., end) + lineto(end) and cubicto(..., end) + lineto(end). > > Anyway this looks good to fix. > > Let's see if phil or anybody else has a slot for a simple review next week. > > Roadmap: > https://openjdk.org/projects/jdk/19/ > > Deadline for integration is june 9th. > > Cheers, > Laurent > > Le jeu. 2 juin 2022, 23:36, Jeremy Wood a ?crit : > >> Laurent, >> >> I made a very modest PR here: >> >> https://github.com/openjdk/jdk/pull/8943 >> >> I wasn?t aware there was a deadline coming up; thanks for letting me >> know. >> >> This passes my current test, but depending on code review feedback it?s >> hard to predict if this will be ready by next week. >> >> - Jeremy >> >> ------ Original Message ------ >> From "Laurent Bourg?s" >> To "Jeremy Wood" >> Cc client-libs-dev at openjdk.java.net >> Date 6/2/2022 4:48:25 PM >> Subject Re: Re[2]: Any interest in JDK-8264999 (stroke miter edge case >> in Marlin) >> >> >Jeremy, >> > >> >I hope you are doing well. >> > >> >As jdk9 rdp1 is next week, do you plan this bug to be ready for this >> >short window or not ? >> > >> >Laurent >> > >> >Le dim. 29 mai 2022, 09:31, Laurent Bourg?s >> >a ?crit : >> >>One more general comment on this bug: >> >>what is expected when lineTo() does not change last point after all >> >>other possible operations ? >> >>- lineTo, lineto (this bug) >> >>- quadTo, lineto >> >>- cubicTo, lineto >> >>- moveto, lineto: point (ok) >> >>- close, lineto(star: equiv to close, move start, lineto start: point >> >>start (ok ?) >> >> >> >>If any drawing operation in progress (lineto, quadto, curveto), then >> >>skip repeated end point is the specified behaviour. >> >> >> >>Laurent >> >> >> >>Le mer. 25 mai 2022, 08:57, Laurent Bourg?s >> >> a ?crit : >> >>>In Stroker, this lines seems causing the problem: >> >>> >> https://github.com/openjdk/jdk/blob/a0cccb54791d954bf08da5aac9b9794e370617c8/src/java.desktop/share/classes/sun/java2d/marlin/Stroker.java#L568 >> >>> >> >>>If delta is 0, then tangent is (1, 0) ! >> >>>Should be: >> >>>If drawOp was lineTo and delta is 0, return (skip). >> >>> >> >>>I wonder if there are other renderer suffering the same problem. >> >>>Phil, how could we generalize this kind of path operation filtering ? >> >>> >> >>>My 2 cents, >> >>>Laurent >> >>> >> >>>Le mer. 25 mai 2022, 08:15, Laurent Bourg?s >> >>> a ?crit : >> >>>>Jeremy, >> >>>> >> >>>>Probably your fix could be plugged in marlin pathTo() : >> >>>> >> https://github.com/openjdk/jdk/blob/742644e291039e4f2f30cf80718669c06da5809c/src/java.desktop/share/classes/sun/java2d/marlin/DMarlinRenderingEngine.java#L768 >> >>>> >> >>>>Or in Stroker lineTo... >> >>>> >> >>>>Laurent >> >>>> >> >>>>Le mar. 24 mai 2022, 22:55, Jeremy Wood a >> >>>>?crit : >> >>>>>I may still move it in the Stroker classes. There are a few other >> >>>>>things >> >>>>>I want to look at, too. This is a very rough draft I put together >> >>>>>in >> >>>>>under an hour; I just wanted to make sure it was worth pursuing >> >>>>>before I >> >>>>>put more time into it. >> >>>>> >> >>>>> - Jeremy >> >>>>> >> >>>>> >> >>>>>------ Original Message ------ >> >>>>>From "Laurent Bourg?s" >> >>>>>To "Jeremy Wood" >> >>>>>Cc client-libs-dev at openjdk.java.net >> >>>>>Date 5/24/2022 4:35:21 PM >> >>>>>Subject Re: Any interest in JDK-8264999 (stroke miter edge case in >> >>>>>Marlin) >> >>>>> >> >>>>> >Thanks Jereremy for the notification I was not aware of this one. >> >>>>> > >> >>>>> >I wonder if the problem should be fixed inside the marlin renderer >> >>>>> >Stroker that should ignore such useless lineTo... >> >>>>> > >> >>>>> >I will read your code and try to figure out potential causes in >> >>>>>stroker >> >>>>> >and give you my feedback. >> >>>>> > >> >>>>> >Laurent >> >>>>> > >> >>>>> >Le mar. 24 mai 2022, 19:52, Jeremy Wood a >> >>>>>?crit >> >>>>> >: >> >>>>> >>This is a P3 ticket currently assigned to Philip Race: >> >>>>> >>https://bugs.openjdk.java.net/browse/JDK-8264999 >> >>>>> >> >> >>>>> >>If I put together a PR: Is anyone available/willing to help >> >>>>>review it? >> >>>>> >> >> >>>>> >>I made a rough draft >> >>>>> >>< >> https://github.com/openjdk/jdk/compare/master...mickleness:JDK-8264999?expand=1 >> > >> >>>>> >>of a potential solution last night. I can continue to work on >> >>>>>this, or >> >>>>> >>I >> >>>>> >>can move on if the interest isn?t there. >> >>>>> >> >> >>>>> >>(No urgency at all.) >> >>>>> >> >> >>>>> >>Regards, >> >>>>> >> - Jeremy >> >>>>> >> >> > From serb at openjdk.java.net Thu Jun 2 22:12:35 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Jun 2022 22:12:35 GMT Subject: RFR: 8282526: Default icon is not painted properly [v4] In-Reply-To: References: <8vrDNTJTPocLihty5ZMoBaqGEX23B4gXxis8TtBvuZ8=.5700255b-33a0-4b17-bbb2-523f5a19e9c8@github.com> Message-ID: On Thu, 2 Jun 2022 14:08:31 GMT, Alexander Zuev wrote: > > Time: 21313400 > > Time: 4036200 > > Time: 1140613100 > > Time: 839499200 > > These are some extreme numbers, on my system it is more like 8 to 10 times slower depending on the run: Time: 13250900 Time: 10126200 Time: 113548000 Time: 113630100 It depends on the native accelerated rendering pipeline implementation, which does not support bicubic and do it in on software loops. > But still - the question is: how big the difference will be in the real application, knowing that we only apply this hint to a small minority of the cases and difference for single repaint (which is cached and not like we re-draw it continuously) so can we neglect the performance variation to achieve better visual result? The same question could be asked about all other the icons, why we should upscale/downscale by using the bicubic only the MRI images. The same issue may occur for other icons. For example the FileSystemView.getSystemIcon() may return the icon stored in the "FileView.directoryIcon" UI property. Or the user may create its own image, etc. The reason was about performance. The problem right now is that the user cannot select the "good" appearance if he wants, unlike the text antialiasing. My suggestion is to add a UI property which we discussed above. ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From serb at openjdk.java.net Thu Jun 2 22:19:36 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Jun 2022 22:19:36 GMT Subject: RFR: 8282526: Default icon is not painted properly [v4] In-Reply-To: References: <3Dse5Mi4Lsodr2ytpTSGqNaRLiUcp4928refltpwCGw=.d3c9d1e7-8954-4356-badf-dcd2f8209fbf@github.com> Message-ID: <14w5H3NqVoh17cITByBhbUSlXUvf1o6C5_te0W0KSig=.0e13f718-4ad2-4194-875b-3d8cc4f0f950@github.com> On Thu, 2 Jun 2022 21:50:04 GMT, Sergey Bylokhov wrote: >>> Can we try to do that via different API: https://devblogs.microsoft.com/oldnewthing/20140501-00/?p=1103 probably it will work better? >> >> No, during initial implementation i tried it and it worked even worse and less stable. > > But can we use it as a backup if the system does not return the expected size on the initial/current call? > > Does it mean that we will extract all images except on the sides twice? for 16x16 we will extract 16x16 and 32x32 on the next iteration for 32x32 we will extract 32x32 and 64x64? > > No, on the next iteration we will extract 16x16 and 64x64. So on each iteration we are going to extract additionally 16x16 icon and if size is 24 or more than we will ignore it. Since all the icons requested are cached that will not cause any performance degradation. Where it is specified that the size of the small icon will be the same and the size of the large will grow? Probably it is related to the size property where we did not set the size of the small icon? I still do not see a reason why we cannot request the exact size of the image from the windows, so if the small icon and the screen scale is 1.25 we can try to extract 20x20 ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From serb at openjdk.java.net Thu Jun 2 22:33:39 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Jun 2022 22:33:39 GMT Subject: RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v5] In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 12:25:18 GMT, Tejesh R wrote: >> _Header_ object not initialized/set when paint() method of `WindowTableHeaderUI` class is executed. The paint() event is executed through explicit call of `JTable.updateUI()` in the regression test. In order to set the _header_ to the _called_ JTable, it is set in the `getTableCellRendererComponent()` method, which in turn makes the _header_ object available during paint event without causing NPE. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Changed from manual to Automatic Test I see that the bug description has a test case which produce this exception. There are these lines on the stack: at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:116) at java.awt.Container.paint(Container.java:1978) at java.awt.Window.paint(Window.java:3906) So your automatic test may override the paint method and catch an exception there. The main method will check some flags at the end. You can also repaint the window a few times to make sure it is painted. Can we iterate all installed L&F? It seems the test does not have any windows specific code. I think that the rendering to the BufferedImage as suggested by @aivanov-jdk should work as well. ------------- PR: https://git.openjdk.java.net/jdk/pull/8830 From prr at openjdk.java.net Thu Jun 2 23:10:23 2022 From: prr at openjdk.java.net (Phil Race) Date: Thu, 2 Jun 2022 23:10:23 GMT Subject: RFR: 8287600: AA Ovals not rendered under metal In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 20:21:40 GMT, Alexey Ushakov wrote: > Commit command buffer after MTL_OP_MASK_OP operation Doesn't seem specific to ovals .. [why] was nothing else affected ? ------------- Marked as reviewed by prr (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8981 From prr at openjdk.java.net Thu Jun 2 23:30:30 2022 From: prr at openjdk.java.net (Phil Race) Date: Thu, 2 Jun 2022 23:30:30 GMT Subject: RFR: 8287609: macOS: SIGSEGV at [CoreFoundation] CFArrayGetCount / sun.font.CFont.getTableBytesNative In-Reply-To: References: Message-ID: On Tue, 31 May 2022 23:39:09 GMT, Nikita Gubarkov wrote: > `CTFontCopyAvailableTables` can return null, which causes subsequent call to `CFArrayGetCount` to crash with SEGFAULT, just added a null-check. It looks for a "maxp" table which is absent for this font. Are you sure ? I know that is what we are looking for but we call an API to get all tables without specifying any particular table so maOS doesn't know ... And that is a REQUIRED table per opentype + apple truetype https://docs.microsoft.com/en-us/typography/opentype/spec/otff#font-tables https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6.html In shared code we throw an exception if we don't find it and you'd see this if you used the dynamic font loading APIs and if it were installed on Windows or Linux we'd ignore the font. I'm a bit surprised we get this far on mac without it - or that it isn't rejected by virtually every app. Of course getTableBytesNative isn't guaranteed to return a table because you could ask for the 'abcd' table .. But that macOS API didn't ask for a specific table, it just returned null for ALL tables because .... ? Seems to me that there's at the least a macOS documentation deficiency but I'm not sure you've found the answer to my question. ------------- PR: https://git.openjdk.java.net/jdk/pull/8962 From avu at openjdk.java.net Thu Jun 2 23:53:38 2022 From: avu at openjdk.java.net (Alexey Ushakov) Date: Thu, 2 Jun 2022 23:53:38 GMT Subject: RFR: 8287600: AA Ovals not rendered under metal In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 23:07:37 GMT, Phil Race wrote: > Doesn't seem specific to ovals .. [why] was nothing else affected ? Yes, you're right it's not only ovals. I've mentioned them because of my reproducer. The following missing frames also was caused by this problem: LinGrad3RotatedOvalAA : 9,15 FPS - 1 frame(s) skipped LinGradRotatedOvalAA : 11,73 FPS - 1 frame(s) skipped RadGrad3RotatedOvalAA : 11,05 FPS - 1 frame(s) skipped RotatedOvalAA : 10,76 FPS - 1 frame(s) skipped ------------- PR: https://git.openjdk.java.net/jdk/pull/8981 From avu at openjdk.java.net Thu Jun 2 23:53:40 2022 From: avu at openjdk.java.net (Alexey Ushakov) Date: Thu, 2 Jun 2022 23:53:40 GMT Subject: Integrated: 8287600: AA Ovals not rendered under metal In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 20:21:40 GMT, Alexey Ushakov wrote: > Commit command buffer after MTL_OP_MASK_OP operation This pull request has now been integrated. Changeset: cbaeb00f Author: Alexey Ushakov URL: https://git.openjdk.java.net/jdk/commit/cbaeb00fcea7fb8942838610c2d68e27d290fb58 Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod 8287600: AA Ovals not rendered under metal Reviewed-by: aghaisas, prr ------------- PR: https://git.openjdk.java.net/jdk/pull/8981 From honkar at openjdk.java.net Fri Jun 3 00:14:22 2022 From: honkar at openjdk.java.net (Harshitha Onkar) Date: Fri, 3 Jun 2022 00:14:22 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v5] In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 06:03:16 GMT, Tejesh R wrote: >> The tooltip displays accelerated string along with the toooltip string. The feature is implemented and applicable for Metal Look and Feel only. Hence the test is updated for Metal Look and Feel by hard wiring it in the code. Updated the test from manual to automatic. > > Tejesh R has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: > > Unused imports removed Marked as reviewed by honkar (Author). ------------- PR: https://git.openjdk.java.net/jdk/pull/8952 From psadhukhan at openjdk.java.net Fri Jun 3 03:29:27 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 3 Jun 2022 03:29:27 GMT Subject: RFR: 8273573: [macos12] ActionListenerCalledTwiceTest.java fails on macOS 12 In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 20:12:01 GMT, Alexander Zvegintsev wrote: > This test was failing consistently on same machines and at the same time as #8532. > > Test failure is also no longer reproducible after #8320 fix. > > This is macOS only test, so corresponding `@requires os.family` tag was added. Testing is green. I guess you can remove @author, @modules and also jtreg "Platform" dependency by using System.getProperty("os.name") and update the copyright year ------------- Marked as reviewed by psadhukhan (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/9003 From psadhukhan at openjdk.java.net Fri Jun 3 03:50:25 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 3 Jun 2022 03:50:25 GMT Subject: RFR: 8273573: [macos12] ActionListenerCalledTwiceTest.java fails on macOS 12 In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 20:12:01 GMT, Alexander Zvegintsev wrote: > This test was failing consistently on same machines and at the same time as #8532. > > Test failure is also no longer reproducible after #8320 fix. > > This is macOS only test, so corresponding `@requires os.family` tag was added. Testing is green. However, there are some observations in the JBS by @prrace regarding the test which have not been handled Also I noticed that the test doesn't exit. It appears that the call to Desktop.getDesktop().setDefaultMenuBar(bar); is effectively creating another visible window so the AWT thread doesn't exit. Adding this line below allows the test to exit and should be added to the test SwingUtilities.invokeAndWait(() -> Desktop.getDesktop().setDefaultMenuBar(null)); ------------- PR: https://git.openjdk.java.net/jdk/pull/9003 From kizune at openjdk.java.net Fri Jun 3 05:16:31 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Fri, 3 Jun 2022 05:16:31 GMT Subject: RFR: 8282526: Default icon is not painted properly [v4] In-Reply-To: <14w5H3NqVoh17cITByBhbUSlXUvf1o6C5_te0W0KSig=.0e13f718-4ad2-4194-875b-3d8cc4f0f950@github.com> References: <3Dse5Mi4Lsodr2ytpTSGqNaRLiUcp4928refltpwCGw=.d3c9d1e7-8954-4356-badf-dcd2f8209fbf@github.com> <14w5H3NqVoh17cITByBhbUSlXUvf1o6C5_te0W0KSig=.0e13f718-4ad2-4194-875b-3d8cc4f0f950@github.com> Message-ID: On Thu, 2 Jun 2022 22:15:49 GMT, Sergey Bylokhov wrote: > I still do not see a reason why we cannot request the exact size of the image from the windows, so if the small icon and the screen scale is 1.25 we can try to extract 20x20 Because for some files - and we can not predict which files these are - function will always return set of 16x16 and 32x32 icons - no matter what we request. For the icons that return proper sizes we do request exact sizes and use them. ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From kizune at openjdk.java.net Fri Jun 3 05:16:32 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Fri, 3 Jun 2022 05:16:32 GMT Subject: RFR: 8282526: Default icon is not painted properly [v4] In-Reply-To: References: <3Dse5Mi4Lsodr2ytpTSGqNaRLiUcp4928refltpwCGw=.d3c9d1e7-8954-4356-badf-dcd2f8209fbf@github.com> <14w5H3NqVoh17cITByBhbUSlXUvf1o6C5_te0W0KSig=.0e13f718-4ad2-4194-875b-3d8cc4f0f950@github.com> Message-ID: On Fri, 3 Jun 2022 05:12:05 GMT, Alexander Zuev wrote: >>> > Does it mean that we will extract all images except on the sides twice? for 16x16 we will extract 16x16 and 32x32 on the next iteration for 32x32 we will extract 32x32 and 64x64? >>> >>> No, on the next iteration we will extract 16x16 and 64x64. So on each iteration we are going to extract additionally 16x16 icon and if size is 24 or more than we will ignore it. Since all the icons requested are cached that will not cause any performance degradation. >> >> Where it is specified that the size of the small icon will be the same and the size of the large will grow? Probably it is related to the size property where we did not set the size of the small icon? >> >> I still do not see a reason why we cannot request the exact size of the image from the windows, so if the small icon and the screen scale is 1.25 we can try to extract 20x20 > >> I still do not see a reason why we cannot request the exact size of the image from the windows, so if the small icon and the screen scale is 1.25 we can try to extract 20x20 > > Because for some files - and we can not predict which files these are - function will always return set of 16x16 and 32x32 icons - no matter what we request. For the icons that return proper sizes we do request exact sizes and use them. > But can we use it as a backup if the system does not return the expected size on the initial/current call? No, because in case when current implementation returns bad results this function also returns incorrect results so it is hardly a backup. ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From kizune at openjdk.java.net Fri Jun 3 05:27:26 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Fri, 3 Jun 2022 05:27:26 GMT Subject: RFR: 8287740 NSAccessibilityShowMenuAction not working for text editors In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 16:07:37 GMT, Artem Semenov wrote: > The NSAccessibilityShouMinuAction action does not show the menu for the text element. > Steps to reproduce: > 1. redefine the accessible context with the addition of the toggle popup action; > 2. run on macOS with VoiceOver enabled; > 3. try to call the context menu in the editor by pressing vo+shift+m. > > @azuev-java please review. Looks good. ------------- Marked as reviewed by kizune (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8997 From serb at openjdk.java.net Fri Jun 3 05:35:27 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 3 Jun 2022 05:35:27 GMT Subject: RFR: 8273573: [macos12] ActionListenerCalledTwiceTest.java fails on macOS 12 In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 20:12:01 GMT, Alexander Zvegintsev wrote: > This test was failing consistently on same machines and at the same time as #8532. > > Test failure is also no longer reproducible after #8320 fix. > > This is macOS only test, so corresponding `@requires os.family` tag was added. Testing is green. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/9003 From tr at openjdk.java.net Fri Jun 3 05:42:32 2022 From: tr at openjdk.java.net (Tejesh R) Date: Fri, 3 Jun 2022 05:42:32 GMT Subject: RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v5] In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 22:29:50 GMT, Sergey Bylokhov wrote: > I see that the bug description has a test case which produce this exception. There are these lines on the stack: > > ``` > at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:116) > at java.awt.Container.paint(Container.java:1978) > at java.awt.Window.paint(Window.java:3906) > ``` > > So your automatic test may override the paint method and catch an exception there. The main method will check some flags at the end. You can also repaint the window a few times to make sure it is painted. Can we iterate all installed L&F? It seems the test does not have any windows specific code. > > I think that the rendering to the BufferedImage as suggested by @aivanov-jdk should work as well. Yeah sure @mrserb , will test it on other L&F. I think rendering to the BufferedImage might not invoke NPE, so just wanted to retain the same flow as the bug was raised. Anyhow will try to play around and see if it works. ------------- PR: https://git.openjdk.java.net/jdk/pull/8830 From serb at openjdk.java.net Fri Jun 3 05:44:34 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 3 Jun 2022 05:44:34 GMT Subject: RFR: 8287740 NSAccessibilityShowMenuAction not working for text editors In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 16:07:37 GMT, Artem Semenov wrote: > The NSAccessibilityShouMinuAction action does not show the menu for the text element. > Steps to reproduce: > 1. redefine the accessible context with the addition of the toggle popup action; > 2. run on macOS with VoiceOver enabled; > 3. try to call the context menu in the editor by pressing vo+shift+m. > > @azuev-java please review. test/jdk/java/awt/a11y/AccessibleActionsTest.java line 100: > 98: AccessibleComponentTest.INSTRUCTIONS = "INSTRUCTIONS:\n" > 99: + "Check a11y show context menu in editable JTextArea.\n\n" > 100: + "Turn screen reader on and press Tab to move to the text area and vo+shif+m.\n\n" Just a small nit, can we use the same style of instructions, the previous tests use a separate text to press the VO shortcuts, here it could be something like this: "Turn screen reader on and press Tab to move to the text area" "Perform the VO action "Open a shortcut menu" (VO+Shift+m)\n\n" ------------- PR: https://git.openjdk.java.net/jdk/pull/8997 From tr at openjdk.java.net Fri Jun 3 05:46:17 2022 From: tr at openjdk.java.net (Tejesh R) Date: Fri, 3 Jun 2022 05:46:17 GMT Subject: RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v5] In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 05:38:42 GMT, Tejesh R wrote: > > I see that the bug description has a test case which produce this exception. There are these lines on the stack: > > ``` > > at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:116) > > at java.awt.Container.paint(Container.java:1978) > > at java.awt.Window.paint(Window.java:3906) > > ``` > > > > > > > > > > > > > > > > > > > > > > > > So your automatic test may override the paint method and catch an exception there. The main method will check some flags at the end. You can also repaint the window a few times to make sure it is painted. Can we iterate all installed L&F? It seems the test does not have any windows specific code. > > I think that the rendering to the BufferedImage as suggested by @aivanov-jdk should work as well. > > Yeah sure @mrserb , will test it on other L&F. I think rendering to the BufferedImage might not invoke NPE, so just wanted to retain the same flow as the bug was raised. Anyhow will try to play around and see if it works. No issue in other L&F. Issue exists only in Windows L&F. ------------- PR: https://git.openjdk.java.net/jdk/pull/8830 From serb at openjdk.java.net Fri Jun 3 05:55:47 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 3 Jun 2022 05:55:47 GMT Subject: RFR: 8287761: Make the logging of J2DBench stable Message-ID: Currently, the logging of the J2DBench differs from run to run. Each time the order of the parameters is random. For example: First run: `with to Default Frame, bounce, 1x1, SrcOver, ident, !extraalpha, !xormode, !clip, Default, from transvolimg translucent, !touchsrc, Nearest neighbor` Next run: `with SrcOver, bounce, Nearest neighbor, ident, !touchsrc, to CompatImage(Opaque), Default, 1x1, !xormode, !clip, from bmcompatimg bitmask, !extraalpha ` The root cause is that the options are stored in the Hashtable and printed in the "random" order. The fix replaces the usage of Hashtable by the LinkedHashMap. The code is tested on jdk1.7 and -source/-target 1.4 ------------- Commit messages: - 8287761: Make the logging of J2DBench stable Changes: https://git.openjdk.java.net/jdk/pull/9008/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=9008&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8287761 Stats: 28 lines in 2 files changed: 5 ins; 5 del; 18 mod Patch: https://git.openjdk.java.net/jdk/pull/9008.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/9008/head:pull/9008 PR: https://git.openjdk.java.net/jdk/pull/9008 From smandalika at openjdk.java.net Fri Jun 3 06:30:39 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Fri, 3 Jun 2022 06:30:39 GMT Subject: RFR: JDK-8282777: Create a Regression test for JDK-4515031 [v5] In-Reply-To: References: Message-ID: > Create a Regression test for [JDK-4515031](https://bugs.openjdk.java.net/browse/JDK-4515031) > > The issue indicates the need for a a getAccessibleDescription being implemented for the JFileChooser. > The test added verifies the same. > This review is for migrating tests from a closed test suite to open. Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: Review comment fixed: removed redundant rbot code. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7738/files - new: https://git.openjdk.java.net/jdk/pull/7738/files/2dc9771d..194e4dbc Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7738&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7738&range=03-04 Stats: 5 lines in 1 file changed: 0 ins; 5 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7738.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7738/head:pull/7738 PR: https://git.openjdk.java.net/jdk/pull/7738 From smandalika at openjdk.java.net Fri Jun 3 06:36:17 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Fri, 3 Jun 2022 06:36:17 GMT Subject: RFR: JDK-8282777: Create a Regression test for JDK-4515031 [v6] In-Reply-To: References: Message-ID: > Create a Regression test for [JDK-4515031](https://bugs.openjdk.java.net/browse/JDK-4515031) > > The issue indicates the need for a a getAccessibleDescription being implemented for the JFileChooser. > The test added verifies the same. > This review is for migrating tests from a closed test suite to open. Srinivas Mandalika has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: Review comment fixed: removed redundant robot code. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7738/files - new: https://git.openjdk.java.net/jdk/pull/7738/files/194e4dbc..02705d15 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7738&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7738&range=04-05 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7738.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7738/head:pull/7738 PR: https://git.openjdk.java.net/jdk/pull/7738 From tr at openjdk.java.net Fri Jun 3 07:42:18 2022 From: tr at openjdk.java.net (Tejesh R) Date: Fri, 3 Jun 2022 07:42:18 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v5] In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 06:03:16 GMT, Tejesh R wrote: >> The tooltip displays accelerated string along with the toooltip string. The feature is implemented and applicable for Metal Look and Feel only. Hence the test is updated for Metal Look and Feel by hard wiring it in the code. Updated the test from manual to automatic. > > Tejesh R has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: > > Unused imports removed https://mach5.us.oracle.com/mdash/jobs/Tejesh-jdk-20220603-0433-33053953?search=result.status:PASSED ------------- PR: https://git.openjdk.java.net/jdk/pull/8952 From tr at openjdk.java.net Fri Jun 3 07:49:39 2022 From: tr at openjdk.java.net (Tejesh R) Date: Fri, 3 Jun 2022 07:49:39 GMT Subject: Integrated: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF In-Reply-To: References: Message-ID: On Tue, 31 May 2022 08:14:14 GMT, Tejesh R wrote: > The tooltip displays accelerated string along with the toooltip string. The feature is implemented and applicable for Metal Look and Feel only. Hence the test is updated for Metal Look and Feel by hard wiring it in the code. Updated the test from manual to automatic. This pull request has now been integrated. Changeset: 407abf5d Author: Tejesh R Committer: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/407abf5d65af918e6d9bfed1f4cc7d4cfd74ce24 Stats: 170 lines in 1 file changed: 170 ins; 0 del; 0 mod 8233477: [Win LAF]The tooltip doesn't display correctly in Win LAF Reviewed-by: psadhukhan, prr, honkar ------------- PR: https://git.openjdk.java.net/jdk/pull/8952 From psadhukhan at openjdk.java.net Fri Jun 3 09:54:49 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 3 Jun 2022 09:54:49 GMT Subject: RFR: 8287743: javax/swing/text/CSSBorder/6796710/bug6796710.java failed Message-ID: Test is failing in iMac CI systems owing to color difference of 1 `x 0 y 0 rgb1: fff0f0f0 rgb2: fff0eff0` Added minor color tolerance check. CI testing is green ------------- Commit messages: - 8287743: javax/swing/text/CSSBorder/6796710/bug6796710.java failed Changes: https://git.openjdk.java.net/jdk/pull/9011/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=9011&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8287743 Stats: 38 lines in 1 file changed: 37 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/9011.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/9011/head:pull/9011 PR: https://git.openjdk.java.net/jdk/pull/9011 From azvegint at openjdk.java.net Fri Jun 3 10:06:21 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Fri, 3 Jun 2022 10:06:21 GMT Subject: RFR: 8273573: [macos12] ActionListenerCalledTwiceTest.java fails on macOS 12 [v2] In-Reply-To: References: Message-ID: > This test was failing consistently on same machines and at the same time as #8532. > > Test failure is also no longer reproducible after #8320 fix. > > This is macOS only test, so corresponding `@requires os.family` tag was added. Testing is green. Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: clean up ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/9003/files - new: https://git.openjdk.java.net/jdk/pull/9003/files/9dd14689..71917376 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=9003&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=9003&range=00-01 Stats: 29 lines in 1 file changed: 9 ins; 4 del; 16 mod Patch: https://git.openjdk.java.net/jdk/pull/9003.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/9003/head:pull/9003 PR: https://git.openjdk.java.net/jdk/pull/9003 From azvegint at openjdk.java.net Fri Jun 3 10:06:22 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Fri, 3 Jun 2022 10:06:22 GMT Subject: RFR: 8273573: [macos12] ActionListenerCalledTwiceTest.java fails on macOS 12 In-Reply-To: References: Message-ID: <_gd4zdzPopcsmauV9G5hoOc9CO6_Inm_2NmG4HCp_gU=.d80cd415-9262-4c5c-9f03-65ae452ac6e3@github.com> On Fri, 3 Jun 2022 03:47:14 GMT, Prasanta Sadhukhan wrote: > However, there are some observations in the JBS by @prrace regarding the test which have not been handled > > ``` > Also I noticed that the test doesn't exit. It appears that the call to > > Desktop.getDesktop().setDefaultMenuBar(bar); > > is effectively creating another visible window so the AWT thread doesn't exit. > > Adding this line below allows the test to exit and should be added to the test > SwingUtilities.invokeAndWait(() -> Desktop.getDesktop().setDefaultMenuBar(null)); > ``` BTW this affects only running test in a standalone mode, jtreg handles this. But it may be a bad example, so updated. > I guess you can remove @author, @modules and also jtreg "Platform" dependency by using System.getProperty("os.name") and update the copyright year Sure, but initially it was just a removal from problemlist. Updated. ------------- PR: https://git.openjdk.java.net/jdk/pull/9003 From tr at openjdk.java.net Fri Jun 3 10:27:20 2022 From: tr at openjdk.java.net (Tejesh R) Date: Fri, 3 Jun 2022 10:27:20 GMT Subject: RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v6] In-Reply-To: References: Message-ID: > _Header_ object not initialized/set when paint() method of `WindowTableHeaderUI` class is executed. The paint() event is executed through explicit call of `JTable.updateUI()` in the regression test. In order to set the _header_ to the _called_ JTable, it is set in the `getTableCellRendererComponent()` method, which in turn makes the _header_ object available during paint event without causing NPE. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Simplified the Test ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8830/files - new: https://git.openjdk.java.net/jdk/pull/8830/files/1ac4d7b5..391e49f1 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8830&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8830&range=04-05 Stats: 88 lines in 1 file changed: 25 ins; 57 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/8830.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8830/head:pull/8830 PR: https://git.openjdk.java.net/jdk/pull/8830 From asemenov at openjdk.java.net Fri Jun 3 10:35:22 2022 From: asemenov at openjdk.java.net (Artem Semenov) Date: Fri, 3 Jun 2022 10:35:22 GMT Subject: RFR: 8287740 NSAccessibilityShowMenuAction not working for text editors [v2] In-Reply-To: References: Message-ID: > The NSAccessibilityShouMinuAction action does not show the menu for the text element. > Steps to reproduce: > 1. redefine the accessible context with the addition of the toggle popup action; > 2. run on macOS with VoiceOver enabled; > 3. try to call the context menu in the editor by pressing vo+shift+m. > > @azuev-java please review. Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: Just a small nit, can we use the same style of instructions, the previous tests use a separate text to press the VO shortcuts, here it could be something like this: "Turn screen reader on and press Tab to move to the text area" "Perform the VO action "Open a shortcut menu" (VO+Shift+m)\n\n" ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8997/files - new: https://git.openjdk.java.net/jdk/pull/8997/files/50601c12..5f217525 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8997&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8997&range=00-01 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8997.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8997/head:pull/8997 PR: https://git.openjdk.java.net/jdk/pull/8997 From asemenov at openjdk.java.net Fri Jun 3 10:35:22 2022 From: asemenov at openjdk.java.net (Artem Semenov) Date: Fri, 3 Jun 2022 10:35:22 GMT Subject: RFR: 8287740 NSAccessibilityShowMenuAction not working for text editors [v2] In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 05:41:24 GMT, Sergey Bylokhov wrote: >> Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: >> >> Just a small nit, can we use the same style of instructions, the previous tests use a separate text to press the VO shortcuts, here it could be something like this: >> "Turn screen reader on and press Tab to move to the text area" >> "Perform the VO action "Open a shortcut menu" (VO+Shift+m)\n\n" > > test/jdk/java/awt/a11y/AccessibleActionsTest.java line 100: > >> 98: AccessibleComponentTest.INSTRUCTIONS = "INSTRUCTIONS:\n" >> 99: + "Check a11y show context menu in editable JTextArea.\n\n" >> 100: + "Turn screen reader on and press Tab to move to the text area and vo+shif+m.\n\n" > > Just a small nit, can we use the same style of instructions, the previous tests use a separate text to press the VO shortcuts, here it could be something like this: > "Turn screen reader on and press Tab to move to the text area" > "Perform the VO action "Open a shortcut menu" (VO+Shift+m)\n\n" done ------------- PR: https://git.openjdk.java.net/jdk/pull/8997 From duke at openjdk.java.net Fri Jun 3 11:45:25 2022 From: duke at openjdk.java.net (Nikita Gubarkov) Date: Fri, 3 Jun 2022 11:45:25 GMT Subject: RFR: 8287609: macOS: SIGSEGV at [CoreFoundation] CFArrayGetCount / sun.font.CFont.getTableBytesNative In-Reply-To: References: Message-ID: On Tue, 31 May 2022 23:39:09 GMT, Nikita Gubarkov wrote: > `CTFontCopyAvailableTables` can return null, which causes subsequent call to `CFArrayGetCount` to crash with SEGFAULT, just added a null-check. Sorry for the confusion, "maxp" being absent was only my assumption: `CTFontCopyTable` returned NULL for it, but I cannot be 100% sure about what's going on here, given that `CTFontCopyAvailableTables` doesn't even return anything. BTW I see that `CTFontCopyAvailableTables` return type is marked as nullable, though conditions when it can be null are not specified. So this is a very old font and I couldn't even find a tool which could edit it or at least parse and see what's inside, CoreText API is not very helpful as well. But the thing is: we can actually render this font, problems begins when we try to do a full layout, so in my opinion, adding this null-check is okay, we're just not doing anything useful in our layout code instead of crashing :). And also if I'm not missing something, my change doesn't affect any behavior other that fixing the crash, look: 1. When I debugged it, I found around 5 or something calls to `getTableBytesNative` where it could crash, but the only table required by spec was "maxp" - I assume when asking for non-required table, callers already handle NULL case. 2. Caller uses "maxp" table to calculate upem (and falls back to 1000 if there's no such table) and set font scale (libharfbuzz/hb-font.cc:1512): font->x_scale = font->y_scale = hb_face_get_upem (face); 3. But this scale is then overwritten anyway, so it doesn't even matter that we didn't find "maxp" table at all (libfontmanager/hb-jdk-font.cc:410): hb_font_set_scale (font, HBFloatToFixed(jdkFontInfo->ptSize*jdkFontInfo->devScale), HBFloatToFixed(jdkFontInfo->ptSize*jdkFontInfo->devScale)); So it looks like there's really no behavior changed other than not crashing. In my tests text is properly rendered with `Font.layoutGlyphVector` being visually identical to `Font.createGlyphVector`. ------------- PR: https://git.openjdk.java.net/jdk/pull/8962 From aghaisas at openjdk.java.net Fri Jun 3 11:54:27 2022 From: aghaisas at openjdk.java.net (Ajit Ghaisas) Date: Fri, 3 Jun 2022 11:54:27 GMT Subject: RFR: 8287761: Make the logging of J2DBench stable In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 05:30:10 GMT, Sergey Bylokhov wrote: > Currently, the logging of the J2DBench differs from run to run. Each time the order of the parameters is random. > > For example: > First run: `with to Default Frame, bounce, 1x1, SrcOver, ident, !extraalpha, !xormode, !clip, Default, from transvolimg translucent, !touchsrc, Nearest neighbor` > Next run: `with SrcOver, bounce, Nearest neighbor, ident, !touchsrc, to CompatImage(Opaque), Default, 1x1, !xormode, !clip, from bmcompatimg bitmask, !extraalpha > ` > The root cause is that the options are stored in the Hashtable and printed in the "random" order. > > The fix replaces the usage of Hashtable by the LinkedHashMap. The code is tested on jdk1.7 and -source/-target 1.4 This is a good fix. ------------- Marked as reviewed by aghaisas (Committer). PR: https://git.openjdk.java.net/jdk/pull/9008 From mvs at openjdk.java.net Fri Jun 3 14:59:40 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 3 Jun 2022 14:59:40 GMT Subject: RFR: 8286772: java/awt/dnd/DropTargetInInternalFrameTest/DropTargetInInternalFrameTest.html times out and fails in Windows [v2] In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 08:14:23 GMT, Manukumar V S wrote: >> This test verifies that dragging from one InternalFrame and a drop target in another InternalFrame functions properly. >> This fix moves an unstable closed applet based test to open regression based java test, but updated to be more comprehensive with some stabilisation improvements. The closed test was creating noise in CI as it often fails in Windows platform, especially in Windows 11. >> >> Testing: >> 1. Tested using mach5 20 times per platform and got all Pass. >> 2. Tested using mach5 5 times specifically on Windows 11 and got all Pass. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Following the process to convert a closed test to open, created a PR in closed space and got it reviewed, now updating this open PR Any volunteers please? ------------- PR: https://git.openjdk.java.net/jdk/pull/8753 From tr at openjdk.java.net Fri Jun 3 15:08:33 2022 From: tr at openjdk.java.net (Tejesh R) Date: Fri, 3 Jun 2022 15:08:33 GMT Subject: RFR: 8286772: java/awt/dnd/DropTargetInInternalFrameTest/DropTargetInInternalFrameTest.html times out and fails in Windows [v2] In-Reply-To: References: <98d4QKHKLIaozF4R_bRk78e-ibxr7_ot6NBPbnqEw8U=.e4290fae-2a18-41cb-824c-a61541c4b27a@github.com> Message-ID: <33GXTH-QORnvEhncqt9YXVfG2m3ceo6KNXljqD7qxiY=.591c818c-9adb-4af4-ad30-8585fcfda995@github.com> On Thu, 2 Jun 2022 08:11:20 GMT, Manukumar V S wrote: >> test/jdk/java/awt/dnd/DropTargetInInternalFrameTest.java line 244: >> >>> 242: private final Dimension preferredDimension = new Dimension(200, 100); >>> 243: private final CountDownLatch dropLatch; >>> 244: private volatile int calledMethods = 0; >> >> Any reason for changing calledMethods to volatile? > > In order to get the updated data all the time, as this variable will be updated from EDT and the value will be read from main thread also. I meant was it causing an issue in the previous test (before updating the test)? ------------- PR: https://git.openjdk.java.net/jdk/pull/8753 From mvs at openjdk.java.net Fri Jun 3 15:08:35 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 3 Jun 2022 15:08:35 GMT Subject: RFR: 8286772: java/awt/dnd/DropTargetInInternalFrameTest/DropTargetInInternalFrameTest.html times out and fails in Windows [v2] In-Reply-To: <33GXTH-QORnvEhncqt9YXVfG2m3ceo6KNXljqD7qxiY=.591c818c-9adb-4af4-ad30-8585fcfda995@github.com> References: <98d4QKHKLIaozF4R_bRk78e-ibxr7_ot6NBPbnqEw8U=.e4290fae-2a18-41cb-824c-a61541c4b27a@github.com> <33GXTH-QORnvEhncqt9YXVfG2m3ceo6KNXljqD7qxiY=.591c818c-9adb-4af4-ad30-8585fcfda995@github.com> Message-ID: On Fri, 3 Jun 2022 15:04:02 GMT, Tejesh R wrote: >> In order to get the updated data all the time, as this variable will be updated from EDT and the value will be read from main thread also. > > I meant was it causing an issue in the previous test (before updating the test)? I think this was not causing any issues on the previous test. ------------- PR: https://git.openjdk.java.net/jdk/pull/8753 From aivanov at openjdk.java.net Fri Jun 3 15:12:41 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 3 Jun 2022 15:12:41 GMT Subject: RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v6] In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 10:27:20 GMT, Tejesh R wrote: >> _Header_ object not initialized/set when paint() method of `WindowTableHeaderUI` class is executed. The paint() event is executed through explicit call of `JTable.updateUI()` in the regression test. In order to set the _header_ to the _called_ JTable, it is set in the `getTableCellRendererComponent()` method, which in turn makes the _header_ object available during paint event without causing NPE. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Simplified the Test Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JTableHeader/TableRendererTest.java line 46: > 44: import javax.swing.table.TableCellRenderer; > 45: > 46: public class TableRendererTest{ A space between the name and opening brace, please. test/jdk/javax/swing/JTableHeader/TableRendererTest.java line 50: > 48: static JFrame frame = null; > 49: private static JScrollPane jScrollPane = null; > 50: private static JTable table = null; Assigning `null` explicitly is not required. A field will always be initialised to its default value, which is `null` for reference types. Neither `jScrollPane` nor `table` are used outside of `initialize`, convert them to local variables. test/jdk/javax/swing/JTableHeader/TableRendererTest.java line 61: > 59: Thread.currentThread().setUncaughtExceptionHandler(new ExceptionCheck()); > 60: initialize(); > 61: //Adding the Test Frame to handle dispose This comment is a left-over from previous version. test/jdk/javax/swing/JTableHeader/TableRendererTest.java line 66: > 64: } > 65: } > 66: }); The try-catch block is unnecessary, we expect no exception, please remove it. I suggest using a lambda expression instead of anonymous class. test/jdk/javax/swing/JTableHeader/TableRendererTest.java line 76: > 74: } > 75: System.out.println("Test Pass!"); > 76: frame.dispose(); Dispose of the frame before you check for the status. Plus, you have to call dispose on EDT. I suggest saving the caught exception and re-throwing it here directly or as the cause to `RuntimeException`. Something like this: SwingUtilities.invokeAndWait(frame::dispose); if (exception.get() != null) { throw new RuntimeException("Test Case Failed. NPE raised!", exception.get()); } System.out.println("Test Passed"); where `exception` is private static final AtomicReference exception = new AtomicReference<>(); test/jdk/javax/swing/JTableHeader/TableRendererTest.java line 84: > 82: table = new JTable(new MyModel()); > 83: jScrollPane = new JScrollPane(); > 84: jScrollPane.setBounds(new java.awt.Rectangle(0,0,350,618)); Suggestion: jScrollPane.setBounds(0, 0, 350, 618); You can pass the parameters directly without creating `Rectangle`. Spaces after commas, please. test/jdk/javax/swing/JTableHeader/TableRendererTest.java line 102: > 100: static class ExceptionCheck implements Thread.UncaughtExceptionHandler { > 101: public void uncaughtException(Thread t, Throwable e) > 102: { Put the opening brace on the same line as the declaration, please. Please add `@Override` annotation to this method and to methods in `MyModel` and `DecoratedHeaderRenderer`. test/jdk/javax/swing/JTableHeader/TableRendererTest.java line 129: > 127: public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { > 128: return render.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); > 129: } I suggest breaking these long lines. You can list parameters as in the interface declaration: https://github.com/openjdk/jdk/blob/3789983e89c9de252ef546a1b98a732a7d066650/src/java.desktop/share/classes/javax/swing/table/TableCellRenderer.java#L94-L96 ------------- PR: https://git.openjdk.java.net/jdk/pull/8830 From aivanov at openjdk.java.net Fri Jun 3 15:12:47 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 3 Jun 2022 15:12:47 GMT Subject: RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v4] In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 09:14:30 GMT, Tejesh R wrote: >> _Header_ object not initialized/set when paint() method of `WindowTableHeaderUI` class is executed. The paint() event is executed through explicit call of `JTable.updateUI()` in the regression test. In order to set the _header_ to the _called_ JTable, it is set in the `getTableCellRendererComponent()` method, which in turn makes the _header_ object available during paint event without causing NPE. > > Tejesh R 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 14 additional commits since the last revision: > > - Updated based on review comments > - Merge branch 'master' of https://git.openjdk.java.net/jdk into branch_6429812 > - JTREG Tags updation > - Removal of White space > - Updated based on review comments and Added Test case TableRenderTest.java > - header object set > - Merge remote-tracking branch 'upstream/master' into branch_6429812 > - Merge remote-tracking branch 'upstream/master' > - Merge branch 'master' of github.com:TejeshR13/jdk > - Merge branch 'openjdk:master' into master > - ... and 4 more: https://git.openjdk.java.net/jdk/compare/56ca5e28...98c2aab2 test/jdk/javax/swing/JTableHeader/TableRendererTest.java line 29: > 27: @library /java/awt/regtesthelpers > 28: @build PassFailJFrame > 29: @summary Test to check if table is printed without NPE Suggestion: @summary Test to check if table is painted without NPE ------------- PR: https://git.openjdk.java.net/jdk/pull/8830 From aivanov at openjdk.java.net Fri Jun 3 15:24:37 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 3 Jun 2022 15:24:37 GMT Subject: RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v5] In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 05:42:38 GMT, Tejesh R wrote: > I see that the bug description has a test case which produce this exception. There are these lines on the stack: > > ``` > at sun.awt.SunGraphicsCallback.runComponents(SunGraphicsCallback.java:116) > at java.awt.Container.paint(Container.java:1978) > at java.awt.Window.paint(Window.java:3906) > ``` > > So your automatic test may override the paint method and catch an exception there. The main method will check some flags at the end. @TejeshR13's latest version installs `UncaughtExceptionHandler` to see whether any exception occurs on EDT. > Can we iterate all installed L&F? It seems the test does not have any windows specific code. It's Windows-specific because NPE is thrown on Windows only. However, testing other L&Fs makes sense to ensure it doesn't happen there either. > I think that the rendering to the BufferedImage as suggested by @aivanov-jdk should work as well. In theory only. I was unable to make the table paint with its header to `BufferedImage`. The component isn't laid out until it's added to peered top-level. If you know how to make it paint as if in the frame, I'd welcome it. At this point, painting to `BufferedImage` doesn't reproduce the NPE. ------------- PR: https://git.openjdk.java.net/jdk/pull/8830 From aivanov at openjdk.java.net Fri Jun 3 15:42:33 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 3 Jun 2022 15:42:33 GMT Subject: RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v5] In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 15:21:02 GMT, Alexey Ivanov wrote: > > I think that the rendering to the BufferedImage as suggested by @aivanov-jdk should work as well. > > In theory only. I was unable to make the table paint with its header to `BufferedImage`. The component isn't laid out until it's added to peered top-level. If you know how to make it paint as if in the frame, I'd welcome it. At this point, painting to `BufferedImage` doesn't reproduce the NPE. I haven't been trying hard enough. Painting *the header* to buffered image throws the NPE. The test could be as simple as this: Dimension size = header.getPreferredSize(); header.setSize(size); // Create the image and graphics header.paint(g2d); You have to explicitly set size to the header. ------------- PR: https://git.openjdk.java.net/jdk/pull/8830 From kizune at openjdk.java.net Fri Jun 3 15:51:05 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Fri, 3 Jun 2022 15:51:05 GMT Subject: RFR: 8282578: AIOOBE in javax.sound.sampled.Clip Message-ID: Add try/catch clause to ignore an exception since it is harmless for we isolated the massge data before passing it ro processor. Add test case. ------------- Commit messages: - 8282578: AIOOBE in javax.sound.sampled.Clip Changes: https://git.openjdk.java.net/jdk/pull/9016/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=9016&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8282578 Stats: 464 lines in 3 files changed: 183 ins; 98 del; 183 mod Patch: https://git.openjdk.java.net/jdk/pull/9016.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/9016/head:pull/9016 PR: https://git.openjdk.java.net/jdk/pull/9016 From aivanov at openjdk.java.net Fri Jun 3 16:01:42 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 3 Jun 2022 16:01:42 GMT Subject: RFR: 8233477: : [Win LAF]The tooltip doesn't display correctly in Win LAF [v5] In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 06:03:16 GMT, Tejesh R wrote: >> The tooltip displays accelerated string along with the toooltip string. The feature is implemented and applicable for Metal Look and Feel only. Hence the test is updated for Metal Look and Feel by hard wiring it in the code. Updated the test from manual to automatic. > > Tejesh R has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: > > Unused imports removed test/jdk/javax/swing/JToolTip/bug5047379.java line 77: > 75: > 76: static void handleToolTip() throws Exception { > 77: SwingUtilities.updateComponentTreeUI(frame); This should be called on EDT, shouldn't it? test/jdk/javax/swing/JToolTip/bug5047379.java line 88: > 86: MetalToolTipUI toolTipObj = (MetalToolTipUI) MetalToolTipUI.createUI(tooltip); > 87: > 88: if (tooltip == null) { Perhaps, the check for null should go before `createUI` with a null object? test/jdk/javax/swing/JToolTip/bug5047379.java line 94: > 92: > 93: } catch (Exception e) { > 94: throw new RuntimeException(e); Do you expect any other exception but those you throw yourself to fail the test? test/jdk/javax/swing/JToolTip/bug5047379.java line 133: > 131: text += "ToolTip will appear. Here is what should show\t\t\n"; > 132: text += "The word \\\"TEXT\\\" and then \\\"CTRL-B\\\"\\n\"\t\t"; > 133: text += "\n"; Why are there two tabs in the end of each line. Why can't you use static string concatenation? Or a text block? Creating the string by `text += "literal"` isn't an efficient way. ------------- PR: https://git.openjdk.java.net/jdk/pull/8952 From vdyakov at openjdk.java.net Fri Jun 3 16:46:43 2022 From: vdyakov at openjdk.java.net (Victor Dyakov) Date: Fri, 3 Jun 2022 16:46:43 GMT Subject: RFR: 8282578: AIOOBE in javax.sound.sampled.Clip In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 15:43:39 GMT, Alexander Zuev wrote: > Add try/catch clause to ignore an exception since it is harmless for we isolated > the massge data before passing it ro processor. > Add test case. @azvegint @prrace please review ------------- PR: https://git.openjdk.java.net/jdk/pull/9016 From achung at openjdk.java.net Fri Jun 3 18:51:40 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Fri, 3 Jun 2022 18:51:40 GMT Subject: RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v20] In-Reply-To: References: Message-ID: > Changed the drawing area to be increased by 0.5 on the left side to prevent clipping Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: - don't reset transform if it contains a non-scale transformation - updated test ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7449/files - new: https://git.openjdk.java.net/jdk/pull/7449/files/935ec438..1d6ac075 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7449&range=19 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7449&range=18-19 Stats: 278 lines in 3 files changed: 10 ins; 261 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/7449.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7449/head:pull/7449 PR: https://git.openjdk.java.net/jdk/pull/7449 From aivanov at openjdk.java.net Fri Jun 3 18:53:35 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 3 Jun 2022 18:53:35 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v7] In-Reply-To: <5X_sWM6JdbzBhbh1jHzg-03IgrQ6_A3VpudPIPdmW28=.dca81bba-fa38-4e30-bd07-860ef793155c@github.com> References: <5X_sWM6JdbzBhbh1jHzg-03IgrQ6_A3VpudPIPdmW28=.dca81bba-fa38-4e30-bd07-860ef793155c@github.com> Message-ID: On Thu, 2 Jun 2022 15:32:11 GMT, Tejesh R wrote: >> Added test for checking setMargin() of JRadioButton. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Removed whitespaces Except for the minor comments, it looks good now. test/jdk/javax/swing/JRadioButton/bug4380543.java line 59: > 57: Verify only with those L&F where Margin is Visible. > 58: 3. If Left insets(margins) appear Empty, press Fail, > 59: else press Pass. Suggestion: 1. Check if the Left inset(margin) is set visually similar to other three sides around Radio Button and CheckBox (insets set to 20 on all 4 sides). 2. Rendering depends on OS and supported Look and Feels. Verify only with those L&F where margins are visible. 3. If Left inset(margin) appears too small, press Fail, else press Pass. I think _left inset_ or _margin_ is better ? it's one instance. You may want to add an additional space to all the lines without numbers to visually align the text to the start of the text after the number. I assume this is why you have an extra space before ?and?. test/jdk/javax/swing/JRadioButton/bug4380543.java line 83: > 81: > 82: class testFrame extends JFrame implements ActionListener { > 83: public testFrame() { Class names should start with a capital letter. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From aivanov at openjdk.java.net Fri Jun 3 19:07:33 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 3 Jun 2022 19:07:33 GMT Subject: RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray [v3] In-Reply-To: <5SH_KFNr0P2qlV7JwxrkYrnNDYgm3JiUv8izisiLZmI=.a3abcf0f-3fa8-4ee6-b6a5-0e3e3e3a85ef@github.com> References: <1zmgKAKgBzh5-I4aGlM0Egx64C-Fv3r2Yhl5R0Mu5ho=.c67c08aa-8d49-4550-9e07-505a93be3840@github.com> <5SH_KFNr0P2qlV7JwxrkYrnNDYgm3JiUv8izisiLZmI=.a3abcf0f-3fa8-4ee6-b6a5-0e3e3e3a85ef@github.com> Message-ID: <3Hb09vfkmzijTchm1zvhozHITFTREY71gaUEmHOUHBg=.db21f888-45d0-4a51-a8f5-030f1f533faa@github.com> On Thu, 2 Jun 2022 21:48:07 GMT, Sergey Bylokhov wrote: >>> BTW I think that the usage of >>> `return icons.toArray(EMPTY_TRAY_ARRAY);` >>> is slower than any of other cases: presized or zero. So if we would like to use a similar pattern the zero version is better. >> >> Why is it? It's the same as `icons.toArray(new TrayIcon[0])` without creating a new zero-sized array. > > It should be checked of course, but in zero case the size is known by the compiler not sure that in the cached case it can make the same optimizations. The article above said the cached case is a "marginal improvement over new Foo[0]" I'm unsure if the Java compiler performs any optimisations here. The called `toArray` verifies the size first, and it's the same size either way, which is zero. If there were no pre-allocated array, I wouldn't bother with a cached copy. But we have one. One less object to be allocated and to be garbage-collected. Since the number of the icons is unlikely to become large, I doubt there'll be any noticeable difference. As your sample above demonstrates, the old code could return an array with a null element in it. This is resolved by the new code. ------------- PR: https://git.openjdk.java.net/jdk/pull/8850 From dnguyen at openjdk.java.net Fri Jun 3 19:14:39 2022 From: dnguyen at openjdk.java.net (Damon Nguyen) Date: Fri, 3 Jun 2022 19:14:39 GMT Subject: RFR: 8012675: Javadoc for javax.swing.text.html.parser.Parser.handleComment() needs to be updated [v5] In-Reply-To: References: Message-ID: > Updated Parser class doc by appending to the doc regarding lack of support for HTML script tags. Adding this information to the "parse" function did not seem as consistent for formatting as adding it to the Parser class doc. Damon Nguyen has updated the pull request incrementally with two additional commits since the last revision: - Merge branch '8012675/htmlTagParserDocChange' of github.com:DamonGuy/jdk into 8012675/htmlTagParserDocChange - Reverted all files. Added test. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7446/files - new: https://git.openjdk.java.net/jdk/pull/7446/files/63a29983..b6ddb3cd Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7446&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7446&range=03-04 Stats: 105 lines in 1 file changed: 105 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7446.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7446/head:pull/7446 PR: https://git.openjdk.java.net/jdk/pull/7446 From dnguyen at openjdk.java.net Fri Jun 3 19:24:38 2022 From: dnguyen at openjdk.java.net (Damon Nguyen) Date: Fri, 3 Jun 2022 19:24:38 GMT Subject: RFR: 8286481: Exception printed to stdout on Windows when storing transparent image in clipboard In-Reply-To: References: Message-ID: On Tue, 24 May 2022 16:54:55 GMT, Alisen Chung wrote: > Removed stacktrace from WClipboard Marked as reviewed by dnguyen (Author). ------------- PR: https://git.openjdk.java.net/jdk/pull/8871 From dnguyen at openjdk.java.net Fri Jun 3 19:51:24 2022 From: dnguyen at openjdk.java.net (Damon Nguyen) Date: Fri, 3 Jun 2022 19:51:24 GMT Subject: RFR: 8012675: Javadoc for javax.swing.text.html.parser.Parser.handleComment() needs to be updated [v6] In-Reply-To: References: Message-ID: > Updated Parser class doc by appending to the doc regarding lack of support for HTML script tags. Adding this information to the "parse" function did not seem as consistent for formatting as adding it to the Parser class doc. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Removed print statement. Removed test. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7446/files - new: https://git.openjdk.java.net/jdk/pull/7446/files/b6ddb3cd..d587f995 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7446&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7446&range=04-05 Stats: 83 lines in 2 files changed: 0 ins; 83 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7446.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7446/head:pull/7446 PR: https://git.openjdk.java.net/jdk/pull/7446 From dnguyen at openjdk.java.net Fri Jun 3 19:58:24 2022 From: dnguyen at openjdk.java.net (Damon Nguyen) Date: Fri, 3 Jun 2022 19:58:24 GMT Subject: RFR: 8012675: Javadoc for javax.swing.text.html.parser.Parser.handleComment() needs to be updated [v7] In-Reply-To: References: Message-ID: > Updated Parser class doc by appending to the doc regarding lack of support for HTML script tags. Adding this information to the "parse" function did not seem as consistent for formatting as adding it to the Parser class doc. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Revert import changes. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7446/files - new: https://git.openjdk.java.net/jdk/pull/7446/files/d587f995..852a93f3 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7446&range=06 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7446&range=05-06 Stats: 46 lines in 2 files changed: 6 ins; 32 del; 8 mod Patch: https://git.openjdk.java.net/jdk/pull/7446.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7446/head:pull/7446 PR: https://git.openjdk.java.net/jdk/pull/7446 From prr at openjdk.java.net Fri Jun 3 20:04:45 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 3 Jun 2022 20:04:45 GMT Subject: RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v20] In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 18:51:40 GMT, Alisen Chung wrote: >> Changed the drawing area to be increased by 0.5 on the left side to prevent clipping > > Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: > > - don't reset transform if it contains a non-scale transformation > - updated test src/java.desktop/share/classes/javax/swing/border/EtchedBorder.java line 163: > 161: at = g2d.getTransform(); > 162: oldStk = g2d.getStroke(); > 163: if((at.getType() & AffineTransform.TYPE_MASK_SCALE) != 0) { if((at.getType() & AffineTransform.TYPE_MASK_SCALE) != 0) getType() returns a mask of set bits. You don't want to check that SCALE is set, you want to check that ROTATION and TRANSLATE are NOT set. Something like if (at.getType() & ~(TYPE_MASK_TRANSLATION | TYPE_MASK_ROTATION) == 0)) { ------------- PR: https://git.openjdk.java.net/jdk/pull/7449 From prr at openjdk.java.net Fri Jun 3 20:50:42 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 3 Jun 2022 20:50:42 GMT Subject: RFR: 8287609: macOS: SIGSEGV at [CoreFoundation] CFArrayGetCount / sun.font.CFont.getTableBytesNative In-Reply-To: References: Message-ID: On Tue, 31 May 2022 23:39:09 GMT, Nikita Gubarkov wrote: > `CTFontCopyAvailableTables` can return null, which causes subsequent call to `CFArrayGetCount` to crash with SEGFAULT, just added a null-check. Marked as reviewed by prr (Reviewer). oh my gosh .. it is a font designed for PRE-macOSX . meaning mac. so it is an ATM font with a resource fork and current macOS still lets you install it which is a real surprise to me. That's why there are no tables. OK I can see why this fix is needed ------------- PR: https://git.openjdk.java.net/jdk/pull/8962 From serb at openjdk.java.net Fri Jun 3 21:03:31 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 3 Jun 2022 21:03:31 GMT Subject: RFR: 8287740 NSAccessibilityShowMenuAction not working for text editors [v2] In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 10:35:22 GMT, Artem Semenov wrote: >> The NSAccessibilityShouMinuAction action does not show the menu for the text element. >> Steps to reproduce: >> 1. redefine the accessible context with the addition of the toggle popup action; >> 2. run on macOS with VoiceOver enabled; >> 3. try to call the context menu in the editor by pressing vo+shift+m. >> >> @azuev-java please review. > > Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: > > Just a small nit, can we use the same style of instructions, the previous tests use a separate text to press the VO shortcuts, here it could be something like this: > "Turn screen reader on and press Tab to move to the text area" > "Perform the VO action "Open a shortcut menu" (VO+Shift+m)\n\n" Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8997 From prr at openjdk.java.net Fri Jun 3 21:17:19 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 3 Jun 2022 21:17:19 GMT Subject: RFR: 8287102: ImageReaderSpi.canDecodeInput() for standard plugins should return false if a stream is too short [v2] In-Reply-To: References: Message-ID: <6fem9k8EG4WVoU7XDtJUp_PWPkvpox8KlvMDqs8DgME=.5856f776-f7a0-4418-a06d-b8b3f28df3d4@github.com> On Thu, 26 May 2022 11:43:07 GMT, Martin Desruisseaux wrote: > As a minor note, in `com.sun.imageio.plugins.common.ReaderUtil` class the `readMultiByteInteger(ImageInputStream)` method is used only by `WBMPImageReader`. Would it be worth to move (in a separated pull request) that method in `WBMPImageReader` for saving a few bytes in the common case where WBMP format is not used? I'd be inclined to leave it as a common utility .. someone else might need it in the future. ------------- PR: https://git.openjdk.java.net/jdk/pull/8700 From serb at openjdk.java.net Fri Jun 3 21:18:31 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 3 Jun 2022 21:18:31 GMT Subject: RFR: 8282578: AIOOBE in javax.sound.sampled.Clip In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 15:43:39 GMT, Alexander Zuev wrote: > Add try/catch clause to ignore an exception since it is harmless for we isolated > the massge data before passing it ro processor. > Add test case. Probably it is better to check the data length for each sys message and discard it if the data is too small? Ignoring all possible AIOOBE from this large method which calls many other large methods from SoftVoice/SoftTuning may hide some other bugs. ------------- PR: https://git.openjdk.java.net/jdk/pull/9016 From duke at openjdk.java.net Fri Jun 3 21:21:35 2022 From: duke at openjdk.java.net (Martin Desruisseaux) Date: Fri, 3 Jun 2022 21:21:35 GMT Subject: Integrated: 8287102: ImageReaderSpi.canDecodeInput() for standard plugins should return false if a stream is too short In-Reply-To: References: Message-ID: On Fri, 13 May 2022 12:23:24 GMT, Martin Desruisseaux wrote: > Invoking `ImageReaderSpi.canDecodeInput(Object)` with a stream having less than 8 bytes causes an `EOFException` to be thrown instead of returning `false`. This is caused by BMP, WBMP, GIF, PNG and TIFF reader implementations assuming that those bytes always exist and not checking EOF conditions. The JPEG reader is not impacted. > > The `CanDecodeTest` class in this pull request reproduces the problem and verifies that the patch solves it. The changes in `canDecodeInput(Object)` method bodies are: > > * Use `ImageInputStream.read()` instead of `readByte()` and check for -1 (EOF) return value. > * Replace `ImageInputStream.readFully(byte[])` calls by a private `tryReadFully` method. This pull request has now been integrated. Changeset: a7e07fdb Author: Martin Desruisseaux Committer: Phil Race URL: https://git.openjdk.java.net/jdk/commit/a7e07fdbc104f668a03d88330e30dbaeb7b43719 Stats: 150 lines in 8 files changed: 129 ins; 9 del; 12 mod 8287102: ImageReaderSpi.canDecodeInput() for standard plugins should return false if a stream is too short Reviewed-by: prr ------------- PR: https://git.openjdk.java.net/jdk/pull/8700 From prr at openjdk.java.net Fri Jun 3 21:22:14 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 3 Jun 2022 21:22:14 GMT Subject: RFR: 8282578: AIOOBE in javax.sound.sampled.Clip In-Reply-To: References: Message-ID: <1Dmfuzix9Bl_6qwPiUSwYo2t1tdaFZkbCZKUGf9tWKg=.fc928c00-b970-4a54-af9e-5bfc40941819@github.com> On Fri, 3 Jun 2022 15:43:39 GMT, Alexander Zuev wrote: > Add try/catch clause to ignore an exception since it is harmless for we isolated > the massge data before passing it ro processor. > Add test case. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/9016 From serb at openjdk.java.net Fri Jun 3 21:23:33 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 3 Jun 2022 21:23:33 GMT Subject: RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray [v3] In-Reply-To: References: Message-ID: On Fri, 27 May 2022 20:48:30 GMT, Alexey Ivanov wrote: >> **WTrayIconPeer**: removed duplicate call to `popupParent.dispose()` that might cause NPE (it looks `popupParent` cannot be `null`); organised imports. >> >> **SystemTray**: removed redundant initialisers; replaced sized array with empty array in `toArray` call; dropped `newValue != null` chained with `equals`. > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > Use method reference in setSystemTrayAccessor instead of anonymous class Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8850 From smandalika at openjdk.java.net Fri Jun 3 21:29:58 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Fri, 3 Jun 2022 21:29:58 GMT Subject: Integrated: 8285373: Create an automated test for JDK-4702233 In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 15:54:02 GMT, Srinivas Mandalika wrote: > Create an automated test for [JDK-4702233](https://bugs.openjdk.java.net/browse/JDK-4702233) > > Several new AccessibleRole and AccessibleRelation constants are needed in those classes in the java.accessibility package. These new contants codify additions made in the GNOME, Netscape, and UNO (StarOffice) accessibility APIs. > StarOffice 6.1 and GNOME accessibility require new role, state and relation > constants in the javax.accessibility package. The existing constants are > inadequate for providing accessibility to StarOffice and GNOME applications > as required by Section 508. > > Solution > -------- > Define new constants in the javax.accessibility package. > AccessibleRelation > AccessibleRoles > AccessibleState > AccessibleAction > AccessibleContext > > The test validates the public fields of the above AccessibleConstants. > > This review is for migrating tests from a closed test suite to open. > > Testing: > The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. This pull request has now been integrated. Changeset: 6f526e1b Author: Srinivas Mandalika Committer: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/6f526e1bc3e0af4189fbb7d3b48d614717f266b0 Stats: 415 lines in 6 files changed: 415 ins; 0 del; 0 mod 8285373: Create an automated test for JDK-4702233 Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8342 From prr at openjdk.java.net Fri Jun 3 21:32:39 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 3 Jun 2022 21:32:39 GMT Subject: RFR: 8287761: Make the logging of J2DBench stable In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 05:30:10 GMT, Sergey Bylokhov wrote: > Currently, the logging of the J2DBench differs from run to run. Each time the order of the parameters is random. > > For example: > First run: `with to Default Frame, bounce, 1x1, SrcOver, ident, !extraalpha, !xormode, !clip, Default, from transvolimg translucent, !touchsrc, Nearest neighbor` > Next run: `with SrcOver, bounce, Nearest neighbor, ident, !touchsrc, to CompatImage(Opaque), Default, 1x1, !xormode, !clip, from bmcompatimg bitmask, !extraalpha > ` > The root cause is that the options are stored in the Hashtable and printed in the "random" order. > > The fix replaces the usage of Hashtable by the LinkedHashMap. The code is tested on jdk1.7 and -source/-target 1.4 Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/9008 From asemenov at openjdk.java.net Fri Jun 3 21:32:45 2022 From: asemenov at openjdk.java.net (Artem Semenov) Date: Fri, 3 Jun 2022 21:32:45 GMT Subject: Integrated: 8287740 NSAccessibilityShowMenuAction not working for text editors In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 16:07:37 GMT, Artem Semenov wrote: > The NSAccessibilityShouMinuAction action does not show the menu for the text element. > Steps to reproduce: > 1. redefine the accessible context with the addition of the toggle popup action; > 2. run on macOS with VoiceOver enabled; > 3. try to call the context menu in the editor by pressing vo+shift+m. > > @azuev-java please review. This pull request has now been integrated. Changeset: b6cdfd68 Author: Artem Semenov URL: https://git.openjdk.java.net/jdk/commit/b6cdfd685d0cea308b15558e2dc607a680c89dc0 Stats: 107 lines in 2 files changed: 98 ins; 6 del; 3 mod 8287740: NSAccessibilityShowMenuAction not working for text editors Reviewed-by: kizune, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8997 From smandalika at openjdk.java.net Fri Jun 3 21:32:54 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Fri, 3 Jun 2022 21:32:54 GMT Subject: Integrated: 8285305: Create an automated test for JDK-4495286 In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 10:51:18 GMT, Srinivas Mandalika wrote: > Create an automated test for [JDK-4495286](https://bugs.openjdk.java.net/browse/JDK-4495286) > > AccessibleJTable.setAccessibleSelction should select rows/cols when cell selection. > When cell selection is not enabled, there is no way, using > accessibility, to select rows or columns. It seems logical that selecting a cell > using accessibility should have the same effect as clicking on a cell with the > mouse. That is, if row or column selection is enabled, then selecting a cell > should instead cause the row or column to be selected. > The proposed test verifies that the above behavior is fixed. > > This review is for migrating tests from a closed test suite to open. > > Testing: > The test ran successfully on Mach5 with multiple runs (40) on windows-x64, linux-x64 and macos-x64. This pull request has now been integrated. Changeset: 25e9901a Author: Srinivas Mandalika Committer: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/25e9901aeacd45f8baec6d1e52a6823e7f087fa3 Stats: 173 lines in 1 file changed: 173 ins; 0 del; 0 mod 8285305: Create an automated test for JDK-4495286 Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8333 From serb at openjdk.java.net Fri Jun 3 21:48:37 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 3 Jun 2022 21:48:37 GMT Subject: RFR: 8282526: Default icon is not painted properly [v4] In-Reply-To: References: <3Dse5Mi4Lsodr2ytpTSGqNaRLiUcp4928refltpwCGw=.d3c9d1e7-8954-4356-badf-dcd2f8209fbf@github.com> <14w5H3NqVoh17cITByBhbUSlXUvf1o6C5_te0W0KSig=.0e13f718-4ad2-4194-875b-3d8cc4f0f950@github.com> Message-ID: On Fri, 3 Jun 2022 05:13:25 GMT, Alexander Zuev wrote: >>> I still do not see a reason why we cannot request the exact size of the image from the windows, so if the small icon and the screen scale is 1.25 we can try to extract 20x20 >> >> Because for some files - and we can not predict which files these are - function will always return set of 16x16 and 32x32 icons - no matter what we request. For the icons that return proper sizes we do request exact sizes and use them. > >> But can we use it as a backup if the system does not return the expected size on the initial/current call? > > No, because in case when current implementation returns bad results this function also returns incorrect results so it is hardly a backup. > Because for some files - and we can not predict which files these are - function will always return set of 16x16 and 32x32 icons - no matter what we request. For the icons that return proper sizes we do request exact sizes and use them. How do we request the proper size for the example above when the scale is 1.25 and the "small" image? The requested size should be 20x20 but we will request 16x16 or 32x32 and then upscale/downscale, no? ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From serb at openjdk.java.net Fri Jun 3 21:52:53 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 3 Jun 2022 21:52:53 GMT Subject: RFR: 8282526: Default icon is not painted properly [v4] In-Reply-To: References: <3Dse5Mi4Lsodr2ytpTSGqNaRLiUcp4928refltpwCGw=.d3c9d1e7-8954-4356-badf-dcd2f8209fbf@github.com> <14w5H3NqVoh17cITByBhbUSlXUvf1o6C5_te0W0KSig=.0e13f718-4ad2-4194-875b-3d8cc4f0f950@github.com> Message-ID: On Fri, 3 Jun 2022 21:46:29 GMT, Sergey Bylokhov wrote: >>> But can we use it as a backup if the system does not return the expected size on the initial/current call? >> >> No, because in case when current implementation returns bad results this function also returns incorrect results so it is hardly a backup. > >> Because for some files - and we can not predict which files these are - function will always return set of 16x16 and 32x32 icons - no matter what we request. For the icons that return proper sizes we do request exact sizes and use them. > > How do we request the proper size for the example above when the scale is 1.25 and the "small" image? The requested size should be 20x20 but we will request 16x16 or 32x32 and then upscale/downscale, no? > No, because in case when current implementation returns bad results this function also returns incorrect results so it is hardly a backup. Are you sure? That article said the opposite and suggest to use SHDefExtractIcon if the simple extract fails. Probably we should recheck why it does not work for your old testing it seems this should be even faster since it read only one image instead of small+large. ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From prr at openjdk.java.net Fri Jun 3 22:00:39 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 3 Jun 2022 22:00:39 GMT Subject: RFR: 8287148: Avoid redundant HashMap.containsKey calls in ExtendedKeyCodes.getExtendedKeyCodeForChar In-Reply-To: References: Message-ID: On Sat, 30 Apr 2022 18:58:56 GMT, Andrey Turbanov wrote: > `sun.awt.ExtendedKeyCodes#regularKeyCodesMap` contains only non-null values. It means we can replace containsKey+get with get+null check. > It's clearer and a bit faster. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8489 From prr at openjdk.java.net Fri Jun 3 22:06:32 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 3 Jun 2022 22:06:32 GMT Subject: RFR: 8286772: java/awt/dnd/DropTargetInInternalFrameTest/DropTargetInInternalFrameTest.html times out and fails in Windows [v2] In-Reply-To: References: Message-ID: <5txou_r0ig3IY-bl5q_HQF5GNW1dHgCvIiY3hSKs_PE=.ac80ac5e-a2c9-498c-aa96-a2a69102cd09@github.com> On Thu, 2 Jun 2022 08:14:23 GMT, Manukumar V S wrote: >> This test verifies that dragging from one InternalFrame and a drop target in another InternalFrame functions properly. >> This fix moves an unstable closed applet based test to open regression based java test, but updated to be more comprehensive with some stabilisation improvements. The closed test was creating noise in CI as it often fails in Windows platform, especially in Windows 11. >> >> Testing: >> 1. Tested using mach5 20 times per platform and got all Pass. >> 2. Tested using mach5 5 times specifically on Windows 11 and got all Pass. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Following the process to convert a closed test to open, created a PR in closed space and got it reviewed, now updating this open PR Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8753 From jiefu at openjdk.java.net Sat Jun 4 00:53:08 2022 From: jiefu at openjdk.java.net (Jie Fu) Date: Sat, 4 Jun 2022 00:53:08 GMT Subject: RFR: 8287826: javax/accessibility/4702233/AccessiblePropertiesTest.java fails to compile Message-ID: <43SoscLYHfNSo1xai-v8SGp-ue-IQ94yYp8HNsbhkNU=.309cdd6c-d9bc-492f-bd90-215e5eb9ea0a@github.com> Hi all, Please review this trivial change which fixes the compile failure of AccessiblePropertiesTest.java . Thanks. Best regards, Jie ------------- Commit messages: - 8287826: javax/accessibility/4702233/AccessiblePropertiesTest.java fails to compile Changes: https://git.openjdk.java.net/jdk/pull/9027/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=9027&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8287826 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/9027.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/9027/head:pull/9027 PR: https://git.openjdk.java.net/jdk/pull/9027 From dcubed at openjdk.java.net Sat Jun 4 02:45:35 2022 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sat, 4 Jun 2022 02:45:35 GMT Subject: RFR: 8287826: javax/accessibility/4702233/AccessiblePropertiesTest.java fails to compile In-Reply-To: <43SoscLYHfNSo1xai-v8SGp-ue-IQ94yYp8HNsbhkNU=.309cdd6c-d9bc-492f-bd90-215e5eb9ea0a@github.com> References: <43SoscLYHfNSo1xai-v8SGp-ue-IQ94yYp8HNsbhkNU=.309cdd6c-d9bc-492f-bd90-215e5eb9ea0a@github.com> Message-ID: On Sat, 4 Jun 2022 00:40:19 GMT, Jie Fu wrote: > Hi all, > > Please review this trivial change which fixes the compile failure of AccessiblePropertiesTest.java . > Thanks. > > Best regards, > Jie Thumbs up. This is a trivial fix. ------------- Marked as reviewed by dcubed (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/9027 From jiefu at openjdk.java.net Sat Jun 4 02:54:25 2022 From: jiefu at openjdk.java.net (Jie Fu) Date: Sat, 4 Jun 2022 02:54:25 GMT Subject: RFR: 8287826: javax/accessibility/4702233/AccessiblePropertiesTest.java fails to compile In-Reply-To: References: <43SoscLYHfNSo1xai-v8SGp-ue-IQ94yYp8HNsbhkNU=.309cdd6c-d9bc-492f-bd90-215e5eb9ea0a@github.com> Message-ID: On Sat, 4 Jun 2022 02:42:37 GMT, Daniel D. Daugherty wrote: > Thumbs up. This is a trivial fix. Thanks @dcubed-ojdk for your review. ------------- PR: https://git.openjdk.java.net/jdk/pull/9027 From jiefu at openjdk.java.net Sat Jun 4 02:54:26 2022 From: jiefu at openjdk.java.net (Jie Fu) Date: Sat, 4 Jun 2022 02:54:26 GMT Subject: Integrated: 8287826: javax/accessibility/4702233/AccessiblePropertiesTest.java fails to compile In-Reply-To: <43SoscLYHfNSo1xai-v8SGp-ue-IQ94yYp8HNsbhkNU=.309cdd6c-d9bc-492f-bd90-215e5eb9ea0a@github.com> References: <43SoscLYHfNSo1xai-v8SGp-ue-IQ94yYp8HNsbhkNU=.309cdd6c-d9bc-492f-bd90-215e5eb9ea0a@github.com> Message-ID: On Sat, 4 Jun 2022 00:40:19 GMT, Jie Fu wrote: > Hi all, > > Please review this trivial change which fixes the compile failure of AccessiblePropertiesTest.java . > Thanks. > > Best regards, > Jie This pull request has now been integrated. Changeset: 005a3303 Author: Jie Fu URL: https://git.openjdk.java.net/jdk/commit/005a330387b8ee1179d1be31b53ea2c5d49c32f8 Stats: 2 lines in 1 file changed: 0 ins; 2 del; 0 mod 8287826: javax/accessibility/4702233/AccessiblePropertiesTest.java fails to compile Reviewed-by: dcubed ------------- PR: https://git.openjdk.java.net/jdk/pull/9027 From mvs at openjdk.java.net Sat Jun 4 03:04:33 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Sat, 4 Jun 2022 03:04:33 GMT Subject: Integrated: 8286772: java/awt/dnd/DropTargetInInternalFrameTest/DropTargetInInternalFrameTest.html times out and fails in Windows In-Reply-To: References: Message-ID: On Tue, 17 May 2022 15:52:03 GMT, Manukumar V S wrote: > This test verifies that dragging from one InternalFrame and a drop target in another InternalFrame functions properly. > This fix moves an unstable closed applet based test to open regression based java test, but updated to be more comprehensive with some stabilisation improvements. The closed test was creating noise in CI as it often fails in Windows platform, especially in Windows 11. > > Testing: > 1. Tested using mach5 20 times per platform and got all Pass. > 2. Tested using mach5 5 times specifically on Windows 11 and got all Pass. This pull request has now been integrated. Changeset: d76c1089 Author: Manukumar V S Committer: Abdul Kolarkunnu URL: https://git.openjdk.java.net/jdk/commit/d76c1089efc8816c6f804b78371e62e697fc62c5 Stats: 380 lines in 1 file changed: 380 ins; 0 del; 0 mod 8286772: java/awt/dnd/DropTargetInInternalFrameTest/DropTargetInInternalFrameTest.html times out and fails in Windows Reviewed-by: prr ------------- PR: https://git.openjdk.java.net/jdk/pull/8753 From kizune at openjdk.java.net Sat Jun 4 13:49:31 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Sat, 4 Jun 2022 13:49:31 GMT Subject: RFR: 8282578: AIOOBE in javax.sound.sampled.Clip In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 21:15:21 GMT, Sergey Bylokhov wrote: > Probably it is better to check the data length for each sys message and discard it if the data is too small? Ignoring all possible AIOOBE from this large method which calls many other large methods from SoftVoice/SoftTuning may hide some other bugs. No, because determining the correct length of the message will require basically to parse it all, the correct length could be a 2 bytes or hundreds of bytes - in order to determine we have to process the message completely. ------------- PR: https://git.openjdk.java.net/jdk/pull/9016 From serb at openjdk.java.net Sat Jun 4 20:54:52 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 4 Jun 2022 20:54:52 GMT Subject: RFR: 8287824: The MTPerLineTransformValidation tests has a typo in the @run tag Message-ID: The typo in the `@run` tag is fixed. ------------- Commit messages: - 8287824: The MTPerLineTransformValidation tests has a typo in the @run tag Changes: https://git.openjdk.java.net/jdk/pull/9030/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=9030&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8287824 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/9030.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/9030/head:pull/9030 PR: https://git.openjdk.java.net/jdk/pull/9030 From serb at openjdk.java.net Sat Jun 4 21:02:25 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 4 Jun 2022 21:02:25 GMT Subject: RFR: 8282578: AIOOBE in javax.sound.sampled.Clip In-Reply-To: References: Message-ID: On Sat, 4 Jun 2022 13:46:10 GMT, Alexander Zuev wrote: > No, because determining the correct length of the message will require basically to parse it all, the correct length could be a 2 bytes or hundreds of bytes - in order to determine we have to process the message completely. There are 64 usages of `data` in that method most of them use constants like 1/2/3 and other usages are in the loops, both can be easily checked. There is also code like ` int[] destinations = new int[(data.length - 7) / 2];` which could cause the NegativeArrayException, or probably some others. It s better to check the out of bands access before access than to have a try/catch block for 300 lines of code. ------------- PR: https://git.openjdk.java.net/jdk/pull/9016 From serb at openjdk.java.net Sat Jun 4 21:06:35 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 4 Jun 2022 21:06:35 GMT Subject: RFR: 8287743: javax/swing/text/CSSBorder/6796710/bug6796710.java failed In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 09:46:11 GMT, Prasanta Sadhukhan wrote: > Test is failing in iMac CI systems owing to color difference of 1 > > `x 0 y 0 rgb1: fff0f0f0 rgb2: fff0eff0` > > Added minor color tolerance check. CI testing is green This test does not check the resulted color against the golden value. It validates the same area of the window which is captured twice, so even monitor color profile cannot affect it. Why do we have a difference of 1? Is it an issue in the rendering or robot? ------------- PR: https://git.openjdk.java.net/jdk/pull/9011 From jsensene at gmail.com Sun Jun 5 00:10:56 2022 From: jsensene at gmail.com (Justin Senseney) Date: Sat, 4 Jun 2022 20:10:56 -0400 Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v7] In-Reply-To: <5X_sWM6JdbzBhbh1jHzg-03IgrQ6_A3VpudPIPdmW28=.dca81bba-fa38-4e30-bd07-860ef793155c@github.com> References: <5X_sWM6JdbzBhbh1jHzg-03IgrQ6_A3VpudPIPdmW28=.dca81bba-fa38-4e30-bd07-860ef793155c@github.com> Message-ID: Please unsubscribe me from your mailing list On Sat, Jun 4, 2022, 20:01 Tejesh R wrote: > > Added test for checking setMargin() of JRadioButton. > > Tejesh R has updated the pull request incrementally with one additional > commit since the last revision: > > Removed whitespaces > > ------------- > > Changes: > - all: https://git.openjdk.java.net/jdk/pull/8721/files > - new: > https://git.openjdk.java.net/jdk/pull/8721/files/97aaa1b2..79dd0e14 > > Webrevs: > - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=06 > - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=05-06 > > Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod > Patch: https://git.openjdk.java.net/jdk/pull/8721.diff > Fetch: git fetch https://git.openjdk.java.net/jdk > pull/8721/head:pull/8721 > > PR: https://git.openjdk.java.net/jdk/pull/8721 > From iris at openjdk.java.net Sun Jun 5 03:14:14 2022 From: iris at openjdk.java.net (Iris Clark) Date: Sun, 5 Jun 2022 03:14:14 GMT Subject: RFR: 8287824: The MTPerLineTransformValidation tests has a typo in the @run tag In-Reply-To: References: Message-ID: On Sat, 4 Jun 2022 07:59:59 GMT, Sergey Bylokhov wrote: > The typo in the `@run` tag is fixed. Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/9030 From duke at openjdk.java.net Sun Jun 5 06:38:36 2022 From: duke at openjdk.java.net (Nikita Gubarkov) Date: Sun, 5 Jun 2022 06:38:36 GMT Subject: RFR: 8287609: macOS: SIGSEGV at [CoreFoundation] CFArrayGetCount / sun.font.CFont.getTableBytesNative In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 20:48:28 GMT, Phil Race wrote: >> `CTFontCopyAvailableTables` can return null, which causes subsequent call to `CFArrayGetCount` to crash with SEGFAULT, just added a null-check. > > oh my gosh .. it is a font designed for PRE-macOSX . meaning mac. so it is an ATM font with a resource fork and current macOS > still lets you install it which is a real surprise to me. That's why there are no tables. > OK I can see why this fix is needed @prrace could you sponsor this, please? And also I believe this should be backported, but I don't know what the process is, where can I read about it? ------------- PR: https://git.openjdk.java.net/jdk/pull/8962 From duke at openjdk.java.net Sun Jun 5 15:38:33 2022 From: duke at openjdk.java.net (Nikita Gubarkov) Date: Sun, 5 Jun 2022 15:38:33 GMT Subject: Integrated: 8287609: macOS: SIGSEGV at [CoreFoundation] CFArrayGetCount / sun.font.CFont.getTableBytesNative In-Reply-To: References: Message-ID: On Tue, 31 May 2022 23:39:09 GMT, Nikita Gubarkov wrote: > `CTFontCopyAvailableTables` can return null, which causes subsequent call to `CFArrayGetCount` to crash with SEGFAULT, just added a null-check. This pull request has now been integrated. Changeset: 8c460b04 Author: Nikita Gubarkov Committer: Phil Race URL: https://git.openjdk.java.net/jdk/commit/8c460b043e1cbaf1f2d74958033bb24dea66a390 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod 8287609: macOS: SIGSEGV at [CoreFoundation] CFArrayGetCount / sun.font.CFont.getTableBytesNative Reviewed-by: prr ------------- PR: https://git.openjdk.java.net/jdk/pull/8962 From prr at openjdk.java.net Sun Jun 5 15:41:35 2022 From: prr at openjdk.java.net (Phil Race) Date: Sun, 5 Jun 2022 15:41:35 GMT Subject: RFR: 8287609: macOS: SIGSEGV at [CoreFoundation] CFArrayGetCount / sun.font.CFont.getTableBytesNative In-Reply-To: References: Message-ID: On Tue, 31 May 2022 23:39:09 GMT, Nikita Gubarkov wrote: > `CTFontCopyAvailableTables` can return null, which causes subsequent call to `CFArrayGetCount` to crash with SEGFAULT, just added a null-check. how do to backports is documented here : https://wiki.openjdk.java.net/display/SKARA/Backports but the wiki is down for maintenance so you'll need to wait for it to be back up to read it. ------------- PR: https://git.openjdk.java.net/jdk/pull/8962 From prr at openjdk.java.net Sun Jun 5 15:49:20 2022 From: prr at openjdk.java.net (Phil Race) Date: Sun, 5 Jun 2022 15:49:20 GMT Subject: RFR: 8287824: The MTPerLineTransformValidation tests has a typo in the @run tag In-Reply-To: References: Message-ID: <7V5dFpgfAZmP8pPh0olobyGcgL4GqRNHQwshr6TgyOM=.9ee613cb-7f48-490e-8aba-1c43f1a94172@github.com> On Sat, 4 Jun 2022 07:59:59 GMT, Sergey Bylokhov wrote: > The typo in the `@run` tag is fixed. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/9030 From jsensene at gmail.com Mon Jun 6 02:01:22 2022 From: jsensene at gmail.com (Justin Senseney) Date: Sun, 5 Jun 2022 22:01:22 -0400 Subject: RFR: 8287609: Add null-check for tagsArray returned from CTFontCopyAvailableTables In-Reply-To: References: Message-ID: Please remove me from your database On Sat, Jun 4, 2022, 20:20 Nikita Gubarkov wrote: > `CTFontCopyAvailableTables` can return null, which causes subsequent call > to `CFArrayGetCount` to crash with SEGFAULT, just added a null-check. > > ------------- > > Commit messages: > - 8287609: Add null-check for tagsArray returned from > CTFontCopyAvailableTables > > Changes: https://git.openjdk.java.net/jdk/pull/8962/files > Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8962&range=00 > Issue: https://bugs.openjdk.java.net/browse/JDK-8287609 > Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod > Patch: https://git.openjdk.java.net/jdk/pull/8962.diff > Fetch: git fetch https://git.openjdk.java.net/jdk > pull/8962/head:pull/8962 > > PR: https://git.openjdk.java.net/jdk/pull/8962 > From jsensene at gmail.com Mon Jun 6 02:01:44 2022 From: jsensene at gmail.com (Justin Senseney) Date: Sun, 5 Jun 2022 22:01:44 -0400 Subject: RFR: 8287609: Add null-check for tagsArray returned from CTFontCopyAvailableTables In-Reply-To: References: Message-ID: Please remove me from your mailing list On Sat, Jun 4, 2022, 20:12 Phil Race wrote: > On Tue, 31 May 2022 23:39:09 GMT, Nikita Gubarkov > wrote: > > > `CTFontCopyAvailableTables` can return null, which causes subsequent > call to `CFArrayGetCount` to crash with SEGFAULT, just added a null-check. > > Where do you read it can return null ? > > > https://developer.apple.com/documentation/coretext/1510774-ctfontcopyavailabletables?language=objc > > says nothing .. > > ------------- > > PR: https://git.openjdk.java.net/jdk/pull/8962 > From tr at openjdk.java.net Mon Jun 6 05:39:27 2022 From: tr at openjdk.java.net (Tejesh R) Date: Mon, 6 Jun 2022 05:39:27 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v8] In-Reply-To: References: Message-ID: > Added test for checking setMargin() of JRadioButton. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on review comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8721/files - new: https://git.openjdk.java.net/jdk/pull/8721/files/79dd0e14..4440a7b2 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=07 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=06-07 Stats: 10 lines in 1 file changed: 0 ins; 0 del; 10 mod Patch: https://git.openjdk.java.net/jdk/pull/8721.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8721/head:pull/8721 PR: https://git.openjdk.java.net/jdk/pull/8721 From tr at openjdk.java.net Mon Jun 6 06:08:38 2022 From: tr at openjdk.java.net (Tejesh R) Date: Mon, 6 Jun 2022 06:08:38 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v9] In-Reply-To: References: Message-ID: <4OOBCQ6QrnCUrQk6yn6Jf1fPkLzskJb8YplgqjBowi0=.89377ce9-a82f-43d4-84a4-748b7b694602@github.com> > Added test for checking setMargin() of JRadioButton. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on review comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8721/files - new: https://git.openjdk.java.net/jdk/pull/8721/files/4440a7b2..73e5a4b8 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=08 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=07-08 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8721.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8721/head:pull/8721 PR: https://git.openjdk.java.net/jdk/pull/8721 From tr at openjdk.java.net Mon Jun 6 06:08:42 2022 From: tr at openjdk.java.net (Tejesh R) Date: Mon, 6 Jun 2022 06:08:42 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v7] In-Reply-To: References: <5X_sWM6JdbzBhbh1jHzg-03IgrQ6_A3VpudPIPdmW28=.dca81bba-fa38-4e30-bd07-860ef793155c@github.com> Message-ID: <47_izVz7v9Tvg7E6rEKpRF5T3ZMpEyr9ohdhBvcEm7s=.faf270f9-6cf0-4712-81e9-0f7793f2ed27@github.com> On Fri, 3 Jun 2022 18:48:51 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Removed whitespaces > > test/jdk/javax/swing/JRadioButton/bug4380543.java line 59: > >> 57: Verify only with those L&F where Margin is Visible. >> 58: 3. If Left insets(margins) appear Empty, press Fail, >> 59: else press Pass. > > Suggestion: > > 1. Check if the Left inset(margin) is set visually > similar to other three sides around Radio Button > and CheckBox (insets set to 20 on all 4 sides). > 2. Rendering depends on OS and supported Look and Feels. > Verify only with those L&F where margins are visible. > 3. If Left inset(margin) appears too small, press Fail, > else press Pass. > > > I think _left inset_ or _margin_ is better ? it's one instance. > > You may want to add an additional space to all the lines without numbers to visually align the text to the start of the text after the number. I assume this is why you have an extra space before ?and?. Done. > test/jdk/javax/swing/JRadioButton/bug4380543.java line 83: > >> 81: >> 82: class testFrame extends JFrame implements ActionListener { >> 83: public testFrame() { > > Class names should start with a capital letter. Done. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From tr at openjdk.java.net Mon Jun 6 06:16:16 2022 From: tr at openjdk.java.net (Tejesh R) Date: Mon, 6 Jun 2022 06:16:16 GMT Subject: RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v7] In-Reply-To: References: Message-ID: > _Header_ object not initialized/set when paint() method of `WindowTableHeaderUI` class is executed. The paint() event is executed through explicit call of `JTable.updateUI()` in the regression test. In order to set the _header_ to the _called_ JTable, it is set in the `getTableCellRendererComponent()` method, which in turn makes the _header_ object available during paint event without causing NPE. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on review comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8830/files - new: https://git.openjdk.java.net/jdk/pull/8830/files/391e49f1..ee0a1dca Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8830&range=06 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8830&range=05-06 Stats: 26 lines in 1 file changed: 6 ins; 6 del; 14 mod Patch: https://git.openjdk.java.net/jdk/pull/8830.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8830/head:pull/8830 PR: https://git.openjdk.java.net/jdk/pull/8830 From psadhukhan at openjdk.java.net Mon Jun 6 06:21:46 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 6 Jun 2022 06:21:46 GMT Subject: RFR: JDK-8287261: [macos] JList Focus Ring color doesn't follow Accent color changes on macOS [v2] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 19:40:34 GMT, Harshitha Onkar wrote: >> With the proposed fix, JList's focus ring color follows accent color changes. Previously the focus ring for JList was not prominently visible and did not follow accent color changes. >> >> While investing a similar issue related to JTable (https://github.com/openjdk/jdk/pull/7768#discussion_r839813517), it was observed that List.focusCellHighlightBorder was using the cellFocusRing color as well. This PR extends the focus ring accent color changes to JLists. >> >> Related issues: [JDK-7124282](https://bugs.openjdk.java.net/browse/JDK-7124282) , [JDK-8261243](https://bugs.openjdk.java.net/browse/JDK-8261243) >> >> #### Summary of changes >> >> - focusCellHighlightBorder in `AquaLookAndFeel` changed which is used for cell border for lists and tables >> - code related to on-the-fly focus ring color refactored into a separate method (`changeFocusRingColor()`) for re-usability >> - `changeFocusRingColor()` called when PropertyChangeEvent == FRAME_ACTIVE_PROPERTY and the frame gains focus, instead of calling in individual `swapSelectionColors` in `AquaFocusHandler.java` >> - Common test added - `CellFocusRingTest`, which tests for both cases - Tables & Lists. >> >> **Before and After screenshots of JList** _(Screenshots from SwingSet2 demo)_ >> >> ![Screen Shot 2022-05-25 at 3 55 49 PM](https://user-images.githubusercontent.com/95945681/170382727-54ed155b-6f08-4c75-8657-89c15764e1cd.png) > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > removed redundant null checks in test In "Finder" lists, it is always gray whereas in "Desktop and screensaver", "Extensions", "Network" lists, it follows accent color I dont see anywhere prominent focus ring is drawn encircling the list cell in native app so probably we can just have our JList focused cell follow the accent color in JDK as well without any prominent ring.. ------------- PR: https://git.openjdk.java.net/jdk/pull/8896 From psadhukhan at openjdk.java.net Mon Jun 6 09:50:50 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 6 Jun 2022 09:50:50 GMT Subject: RFR: 8190907: Windows 10 default Korean Font Malgun Gothic available not used by GUI elements even though available without Korean Language Pack [v6] In-Reply-To: References: <_cAab99k8SxU4y3G_FwRT3fg8t39fYQUDTdEwOZYZmc=.5d71beab-25a0-4c29-b194-d4680961b530@github.com> Message-ID: On Sat, 28 May 2022 03:41:29 GMT, Prasanta Sadhukhan wrote: >> Malgun_Gothic(https://en.wikipedia.org/wiki/Malgun_Gothic) had replaced Gulim korean font so it needs to be updated to show korean fonts > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Added UTF-8 korean fallback I see even `Gulimche `and `Batang `are not visible without -Dfile.encoding=ko so maybe it's what is expected. ------------- PR: https://git.openjdk.java.net/jdk/pull/7643 From psadhukhan at openjdk.java.net Mon Jun 6 15:44:34 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 6 Jun 2022 15:44:34 GMT Subject: RFR: 8287743: javax/swing/text/CSSBorder/6796710/bug6796710.java failed [v2] In-Reply-To: References: Message-ID: > Test is failing in iMac CI systems owing to color difference of 1 > > `x 0 y 0 rgb1: fff0f0f0 rgb2: fff0eff0` > > Added minor color tolerance check. CI testing is green Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Use RObot.createMultiResoutionCapture ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/9011/files - new: https://git.openjdk.java.net/jdk/pull/9011/files/37b97a3d..dcc0858f Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=9011&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=9011&range=00-01 Stats: 41 lines in 1 file changed: 3 ins; 36 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/9011.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/9011/head:pull/9011 PR: https://git.openjdk.java.net/jdk/pull/9011 From psadhukhan at openjdk.java.net Mon Jun 6 15:44:37 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 6 Jun 2022 15:44:37 GMT Subject: RFR: 8287743: javax/swing/text/CSSBorder/6796710/bug6796710.java failed In-Reply-To: References: Message-ID: <6J2ZOKG-b7AMmOGiTjA8evnWaVoPMKajJviXjqWFab8=.22d7eb73-77a7-41b8-bed9-c010d188a777@github.com> On Fri, 3 Jun 2022 09:46:11 GMT, Prasanta Sadhukhan wrote: > Test is failing in iMac CI systems owing to color difference of 1 > > `x 0 y 0 rgb1: fff0f0f0 rgb2: fff0eff0` > > Added minor color tolerance check. CI testing is green Used `Robot.createMultiResolutionScreenCapture` instead of `Robot.createScreenCapture` to get proper image variant for the iMac system. Several iterations of the test in intended system is ok. ------------- PR: https://git.openjdk.java.net/jdk/pull/9011 From azvegint at openjdk.java.net Mon Jun 6 20:36:53 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Mon, 6 Jun 2022 20:36:53 GMT Subject: RFR: 8273573: [macos12] ActionListenerCalledTwiceTest.java fails on macOS 12 In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 03:47:14 GMT, Prasanta Sadhukhan wrote: >> This test was failing consistently on same machines and at the same time as #8532. >> >> Test failure is also no longer reproducible after #8320 fix. >> >> This is macOS only test, so corresponding `@requires os.family` tag was added. Testing is green. > > However, there are some observations in the JBS by @prrace regarding the test which have not been handled > > > Also I noticed that the test doesn't exit. It appears that the call to > > Desktop.getDesktop().setDefaultMenuBar(bar); > > is effectively creating another visible window so the AWT thread doesn't exit. > > Adding this line below allows the test to exit and should be added to the test > SwingUtilities.invokeAndWait(() -> Desktop.getDesktop().setDefaultMenuBar(null)); @prsadhuk do you have any other comments to resolve? ------------- PR: https://git.openjdk.java.net/jdk/pull/9003 From dnguyen at openjdk.java.net Mon Jun 6 20:45:46 2022 From: dnguyen at openjdk.java.net (Damon Nguyen) Date: Mon, 6 Jun 2022 20:45:46 GMT Subject: RFR: 8012675: Javadoc for javax.swing.text.html.parser.Parser.handleComment() needs to be updated [v8] In-Reply-To: References: Message-ID: <23EzklXwXRVg1eW3r87i1NFJHvwJFxUFMujEH7N3CQw=.97ed5f39-3f0b-419d-a787-a380c95ead13@github.com> > Updated Parser class doc by appending to the doc regarding lack of support for HTML script tags. Adding this information to the "parse" function did not seem as consistent for formatting as adding it to the Parser class doc. Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: Changed doc text. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7446/files - new: https://git.openjdk.java.net/jdk/pull/7446/files/852a93f3..d2000f6a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7446&range=07 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7446&range=06-07 Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/7446.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7446/head:pull/7446 PR: https://git.openjdk.java.net/jdk/pull/7446 From dnguyen at openjdk.java.net Mon Jun 6 20:45:47 2022 From: dnguyen at openjdk.java.net (Damon Nguyen) Date: Mon, 6 Jun 2022 20:45:47 GMT Subject: RFR: 8012675: Javadoc for javax.swing.text.html.parser.Parser.handleComment() needs to be updated [v4] In-Reply-To: References: Message-ID: On Wed, 1 Jun 2022 18:32:09 GMT, Phil Race wrote: >> Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: >> >> Removed print statements. > > src/java.desktop/share/classes/javax/swing/text/html/HTMLEditorKit.java line 1123: > >> 1121: */ >> 1122: public void handleComment(char[] data, int pos) { >> 1123: System.out.println("HTMLEditorKit"); > > And this one ? Fixed. Had some branching issues that I recently resolved. I lost track of when this was committed and had to revert back to an older commit to see this change. > src/java.desktop/share/classes/javax/swing/text/html/parser/DocumentParser.java line 34: > >> 32: import javax.swing.text.SimpleAttributeSet; >> 33: import javax.swing.text.html.HTML; >> 34: import javax.swing.text.html.HTMLEditorKit; > > Then there's these changes. OK .. too much .. let's just revert all the files that are import only changes. Reverted all import changes. > test/jdk/javax/swing/text/html/parser/HtmlTagParserTest.java line 1: > >> 1: import java.awt.Dimension; > > where's the GPL header on this test ? Added the header and moved the test to the HTML folder instead since I believe the process involves classes beyond just the Parser. For example, I found that the tags and unknown tags are located in the HTML class. I can move it back if it seems more appropriate since the issue requests changes to the Parser's doc only. ------------- PR: https://git.openjdk.java.net/jdk/pull/7446 From dnguyen at openjdk.java.net Mon Jun 6 20:45:48 2022 From: dnguyen at openjdk.java.net (Damon Nguyen) Date: Mon, 6 Jun 2022 20:45:48 GMT Subject: RFR: 8012675: Javadoc for javax.swing.text.html.parser.Parser.handleComment() needs to be updated [v3] In-Reply-To: References: Message-ID: On Tue, 31 May 2022 22:53:25 GMT, Damon Nguyen wrote: >> src/java.desktop/share/classes/javax/swing/text/html/parser/Parser.java line 73: >> >>> 71: *

>>> 72: * Unsupported tags, such as script tags, will be handled by HiddenTagView. The >>> 73: * tags and its contents will be displayed as editable JTextFields and JTextAreas. >> >> HiddenTagView is a JDK internal class. >> It doesn't appear anywhere in the specification of Java SE. >> So, whatever it is you need to say, can't be written like this. >> >> Also I am not sure that the PARSER has any say in the display does it ? It just hands it off to something else to decide what to do .. doesn't it ? So can it be correct to mention JTextField here ? >> >> Furthermore, the mention of "editable" is pertinent. >> I think (haven't verified) that if you are viewing a document then comments etc are hidden, but when editing it, they are visible, and that is when handleComment() matters. >> >> >> Perhaps you want >> Unsupported tags, such as script tags, will be treated similarly to comments and so will be handled in the same way as these by the editor. For example it might be invisible when reviewing the document, and raw editable text when editing it. >> >> You need to fact check my assumptions .. > > I see your points and agree that your points are valid. Parser has no part in the display and is fact handled elsewhere. > > I initially had to look through and learn what each class for HTML parsing is responsible for, and Parser is meant to handle reading chars and adding the chars to a buffer to be processed elsewhere. In this case, I found the HTML contents were routed to DocumentParser. And from there, I had to trace the stack and add debugging statements to find that hidden tags were responsible for the specialized text fields and text areas that appeared. > > I'll definitely iterate on the documentation to increase clarity and remove mention of HiddenTagView. The editor kit is responsible for delegating which tags will be displayed this way. The list of tags supported can be located in the HTML class, and it's worth noting that script tag is among the tags listed here. But, there is another list of tags in the editor kit's code which are the tags that do not have full support. Script tags are one of these tags; another example being title tags. These tags that are not fully supported, alongside unknown tags, are being passed into HiddenTagView and being displayed as such. So, I tried simplifying the doc description to state the behavior as relevant to the Parser class only. Maybe additional documentation is required in HTMLEditorKit as well? ------------- PR: https://git.openjdk.java.net/jdk/pull/7446 From achung at openjdk.java.net Mon Jun 6 20:46:03 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Mon, 6 Jun 2022 20:46:03 GMT Subject: RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v21] In-Reply-To: References: Message-ID: > Changed the drawing area to be increased by 0.5 on the left side to prevent clipping Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: skip transform is m01 or m10 is nonzero ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7449/files - new: https://git.openjdk.java.net/jdk/pull/7449/files/1d6ac075..8f71abac Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7449&range=20 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7449&range=19-20 Stats: 24 lines in 1 file changed: 16 ins; 2 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/7449.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7449/head:pull/7449 PR: https://git.openjdk.java.net/jdk/pull/7449 From serb at openjdk.java.net Mon Jun 6 21:14:28 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 6 Jun 2022 21:14:28 GMT Subject: RFR: 8287743: javax/swing/text/CSSBorder/6796710/bug6796710.java failed [v2] In-Reply-To: References: Message-ID: On Mon, 6 Jun 2022 15:44:34 GMT, Prasanta Sadhukhan wrote: >> Test is failing in iMac CI systems owing to color difference of 1 >> >> `x 0 y 0 rgb1: fff0f0f0 rgb2: fff0eff0` >> >> Added minor color tolerance check. CI testing is green > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Use RObot.createMultiResoutionCapture test/jdk/javax/swing/text/CSSBorder/6796710/bug6796710.java line 147: > 145: MultiResolutionImage img = robot.createMultiResolutionScreenCapture(rect); > 146: return (BufferedImage)img.getResolutionVariant(rect.width, rect.height); > 147: //return robot.createScreenCapture(rect); Isn't the old and new code should get the same result? The old createScreenCapture always creates an image of the low dpi quality. The createMultiResolutionScreenCapture creates two images low/hi dpi, but since you request the same size "rect" the low dpi image is returned, no? ------------- PR: https://git.openjdk.java.net/jdk/pull/9011 From achung at openjdk.java.net Mon Jun 6 21:25:45 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Mon, 6 Jun 2022 21:25:45 GMT Subject: Integrated: 8286481: Exception printed to stdout on Windows when storing transparent image in clipboard In-Reply-To: References: Message-ID: On Tue, 24 May 2022 16:54:55 GMT, Alisen Chung wrote: > Removed stacktrace from WClipboard This pull request has now been integrated. Changeset: 5264881a Author: Alisen Chung Committer: Phil Race URL: https://git.openjdk.java.net/jdk/commit/5264881a1528444dfefbabec6f42596810f0ce07 Stats: 7 lines in 1 file changed: 0 ins; 6 del; 1 mod 8286481: Exception printed to stdout on Windows when storing transparent image in clipboard Reviewed-by: prr, dnguyen ------------- PR: https://git.openjdk.java.net/jdk/pull/8871 From serb at openjdk.java.net Mon Jun 6 21:28:00 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 6 Jun 2022 21:28:00 GMT Subject: Integrated: 8287761: Make the logging of J2DBench stable In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 05:30:10 GMT, Sergey Bylokhov wrote: > Currently, the logging of the J2DBench differs from run to run. Each time the order of the parameters is random. > > For example: > First run: `with to Default Frame, bounce, 1x1, SrcOver, ident, !extraalpha, !xormode, !clip, Default, from transvolimg translucent, !touchsrc, Nearest neighbor` > Next run: `with SrcOver, bounce, Nearest neighbor, ident, !touchsrc, to CompatImage(Opaque), Default, 1x1, !xormode, !clip, from bmcompatimg bitmask, !extraalpha > ` > The root cause is that the options are stored in the Hashtable and printed in the "random" order. > > The fix replaces the usage of Hashtable by the LinkedHashMap. The code is tested on jdk1.7 and -source/-target 1.4 This pull request has now been integrated. Changeset: a277590c Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/a277590c89b173fd9bc028c715564f18fe62f722 Stats: 28 lines in 2 files changed: 5 ins; 5 del; 18 mod 8287761: Make the logging of J2DBench stable Reviewed-by: aghaisas, prr ------------- PR: https://git.openjdk.java.net/jdk/pull/9008 From kizune at openjdk.java.net Mon Jun 6 22:23:34 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Mon, 6 Jun 2022 22:23:34 GMT Subject: RFR: 8283383: [macos] a11y : Screen magnifier shows extra characters (0) at the end JButton accessibility name Message-ID: Add the accessibilityValue implementation to the affected classes to return NULL value Reverse the default initialization of MenuItemAccessibility if no parent is specified ------------- Commit messages: - 8283383: [macos] a11y : Screen magnifier shows extra characters (0) at the end JButton accessibility name Changes: https://git.openjdk.java.net/jdk/pull/9044/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=9044&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8283383 Stats: 29 lines in 5 files changed: 22 ins; 0 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/9044.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/9044/head:pull/9044 PR: https://git.openjdk.java.net/jdk/pull/9044 From serb at openjdk.java.net Mon Jun 6 22:29:15 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 6 Jun 2022 22:29:15 GMT Subject: RFR: 8283383: [macos] a11y : Screen magnifier shows extra characters (0) at the end JButton accessibility name In-Reply-To: References: Message-ID: On Mon, 6 Jun 2022 22:14:40 GMT, Alexander Zuev wrote: > Add the accessibilityValue implementation to the affected classes to return NULL value > Reverse the default initialization of MenuItemAccessibility if no parent is specified Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/9044 From kizune at openjdk.java.net Mon Jun 6 22:53:29 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Mon, 6 Jun 2022 22:53:29 GMT Subject: RFR: 8282526: Default icon is not painted properly [v5] In-Reply-To: References: Message-ID: > Detect the situation where we do need to perform interpolation during ImageIcon > painting and set a hint to the rendering to perform bicubic approximation so > image details are preserved during transition. Alexander Zuev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains six additional commits since the last revision: - - ImageIcon changes reversed - Removed the old test - Added a new windows-specific test - Fixed the small icon retrieval - If there is no exact match for requested variant create a new one from the closest match by scaling it with bicubic interploation - The new variand is cached so no real performance hit there - Merge remote-tracking branch 'origin/master' into JDK-8282526 - Use small icon pointer for icons less than 24 pixels wide - this way we get the 16x16 icon which is better for scaling purposes. - Take into account scale factor; Create a new Graphics2D object instead of juggle the rendering hints; - Merge pull request #35 from azuev-java/master Merge - 8282526: Default icon is not painted properly Detect the situation when icon image painting requires interpolation and set the interpolation to bicubic to preserve the icon details as much as possible. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7805/files - new: https://git.openjdk.java.net/jdk/pull/7805/files/b6e099b8..bbe20e44 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7805&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7805&range=03-04 Stats: 203856 lines in 3383 files changed: 143945 ins; 15520 del; 44391 mod Patch: https://git.openjdk.java.net/jdk/pull/7805.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7805/head:pull/7805 PR: https://git.openjdk.java.net/jdk/pull/7805 From kizune at openjdk.java.net Mon Jun 6 22:55:40 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Mon, 6 Jun 2022 22:55:40 GMT Subject: RFR: 8282526: Default icon is not painted properly [v4] In-Reply-To: References: Message-ID: <5TQwHRdWYkstuTYOtDyzJsbFLIAl0WNppp6COIVUSKI=.8869e869-fbe6-46ae-bb55-e6c0aa6b5db9@github.com> On Fri, 27 May 2022 18:02:51 GMT, Alexander Zuev wrote: >> Detect the situation where we do need to perform interpolation during ImageIcon >> painting and set a hint to the rendering to perform bicubic approximation so >> image details are preserved during transition. > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Use small icon pointer for icons less than 24 pixels wide - this way we > get the 16x16 icon which is better for scaling purposes. Here, in the name of resolving this issue finally i have reverted the ImageIcon changes, instead i added some code that creates the properly scaled version of icon when requested variant is not available. Plus i have fixed the small icon retrieval so it is not an issue anymore. I am not going trough all the experiments with the SHDefExtractIcon again - at least not in this pull request. I checked and there is no performance impact at all from the latest changes on the 100% scaled screens due to the extracting an additional icon - looks like Windows extracts it anyways even if we specify null as a icon information reference - it just does not pass it down. ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From serb at openjdk.java.net Mon Jun 6 23:21:59 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 6 Jun 2022 23:21:59 GMT Subject: Integrated: 8287824: The MTPerLineTransformValidation tests has a typo in the @run tag In-Reply-To: References: Message-ID: <-jGH1Kq8DZ3AJsu66ZiWvFTyGhLuiW-DKgHeHh6qNoI=.cd134fef-7408-4105-8580-52d5d20402b2@github.com> On Sat, 4 Jun 2022 07:59:59 GMT, Sergey Bylokhov wrote: > The typo in the `@run` tag is fixed. This pull request has now been integrated. Changeset: 645be42f Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/645be42f76b8983a9096ed90caa70b5c59dd822c Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8287824: The MTPerLineTransformValidation tests has a typo in the @run tag Reviewed-by: iris, prr ------------- PR: https://git.openjdk.java.net/jdk/pull/9030 From kizune at openjdk.java.net Mon Jun 6 23:47:15 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Mon, 6 Jun 2022 23:47:15 GMT Subject: RFR: 8282526: Default icon is not painted properly [v6] In-Reply-To: References: Message-ID: > Detect the situation where we do need to perform interpolation during ImageIcon > painting and set a hint to the rendering to perform bicubic approximation so > image details are preserved during transition. Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: Fix the line ends ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7805/files - new: https://git.openjdk.java.net/jdk/pull/7805/files/bbe20e44..3d177fea Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7805&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7805&range=04-05 Stats: 63 lines in 1 file changed: 0 ins; 0 del; 63 mod Patch: https://git.openjdk.java.net/jdk/pull/7805.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7805/head:pull/7805 PR: https://git.openjdk.java.net/jdk/pull/7805 From serb at openjdk.java.net Tue Jun 7 05:19:39 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 7 Jun 2022 05:19:39 GMT Subject: RFR: 8287876: The recently de-problemlisted TestTitledBorderLeak test is unstable Message-ID: This is an update of the test which was de-problemlisted [here](https://github.com/openjdk/jdk/pull/8450). Looks like the initial root cause of the issue was related to the last disposed frame which for some reason was not deleted from the memory, for that issue, the [next](https://bugs.openjdk.org/browse/JDK-8287707) bug was reported. But that change also replaced the usage of weak references by the Runtime.getRuntime().freeMemory() which is not stable enough to verify the leak - its return values vary a lot. This change returns the usage of weak references and tests only one instance of TitledBorder which is enough to verify the old [bug](https://bugs.openjdk.org/browse/JDK-8204963). ------------- Commit messages: - Update TestTitledBorderLeak.java - 8287876: The recently de-problemlisted TestTitledBorderLeak test is unstable Changes: https://git.openjdk.java.net/jdk/pull/9051/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=9051&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8287876 Stats: 37 lines in 1 file changed: 7 ins; 6 del; 24 mod Patch: https://git.openjdk.java.net/jdk/pull/9051.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/9051/head:pull/9051 PR: https://git.openjdk.java.net/jdk/pull/9051 From psadhukhan at openjdk.java.net Tue Jun 7 07:45:10 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 7 Jun 2022 07:45:10 GMT Subject: RFR: 8273573: [macos12] ActionListenerCalledTwiceTest.java fails on macOS 12 [v2] In-Reply-To: References: Message-ID: On Fri, 3 Jun 2022 10:06:21 GMT, Alexander Zvegintsev wrote: >> This test was failing consistently on same machines and at the same time as #8532. >> >> Test failure is also no longer reproducible after #8320 fix. >> >> This is macOS only test, so corresponding `@requires os.family` tag was added. Testing is green. > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > clean up I thought I already approved.. ------------- Marked as reviewed by psadhukhan (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/9003 From psadhukhan at openjdk.java.net Tue Jun 7 07:49:14 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 7 Jun 2022 07:49:14 GMT Subject: RFR: 8287876: The recently de-problemlisted TestTitledBorderLeak test is unstable In-Reply-To: References: Message-ID: <8D-1Utwpuzg037hn3MkQBlD2JNQdDBNfNSjMRD93jtk=.cac32941-edad-4664-a5d3-69f6db9cb9e0@github.com> On Tue, 7 Jun 2022 04:15:49 GMT, Sergey Bylokhov wrote: > This is an update of the test which was de-problemlisted [here](https://github.com/openjdk/jdk/pull/8450). > > Looks like the initial root cause of the issue was related to the last disposed frame which for some reason was not deleted from the memory, for that issue, the [next](https://bugs.openjdk.org/browse/JDK-8287707) bug was reported. > But that change also replaced the usage of weak references by the Runtime.getRuntime().freeMemory() which is not stable enough to verify the leak - its return values vary a lot. > > This change returns the usage of weak references and tests only one instance of TitledBorder which is enough to verify the old [bug](https://bugs.openjdk.org/browse/JDK-8204963). Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/9051 From psadhukhan at openjdk.java.net Tue Jun 7 09:04:06 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 7 Jun 2022 09:04:06 GMT Subject: RFR: 8287743: javax/swing/text/CSSBorder/6796710/bug6796710.java failed [v2] In-Reply-To: References: Message-ID: On Mon, 6 Jun 2022 21:11:03 GMT, Sergey Bylokhov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Use RObot.createMultiResoutionCapture > > test/jdk/javax/swing/text/CSSBorder/6796710/bug6796710.java line 147: > >> 145: MultiResolutionImage img = robot.createMultiResolutionScreenCapture(rect); >> 146: return (BufferedImage)img.getResolutionVariant(rect.width, rect.height); >> 147: //return robot.createScreenCapture(rect); > > Isn't the old and new code should get the same result? The old createScreenCapture always creates an image of the low dpi quality. The createMultiResolutionScreenCapture creates two images low/hi dpi, but since you request the same size "rect" the low dpi image is returned, no? Maybe it's different in iMac systems..I dont have access to this system to analyse further nor do I have much knowledge on this 2D/awt multiresolution image side of things.. ------------- PR: https://git.openjdk.java.net/jdk/pull/9011 From alexey.ivanov at oracle.com Tue Jun 7 10:41:47 2022 From: alexey.ivanov at oracle.com (Aleksei Ivanov) Date: Tue, 7 Jun 2022 11:41:47 +0100 Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v7] In-Reply-To: References: <5X_sWM6JdbzBhbh1jHzg-03IgrQ6_A3VpudPIPdmW28=.dca81bba-fa38-4e30-bd07-860ef793155c@github.com> Message-ID: <64d22e74-9627-07b1-7bf5-39b12d22cc19@oracle.com> Hi Justin, To unsubscribe from any OpenJDK mailing lists, go to its page; for client-libs-dev, go to: https://mail.openjdk.java.net/mailman/listinfo/client-libs-dev Scroll to the bottom of the page, enter your email address in the section "To unsubscribe from client-libs-dev?" and click "Unsubscribe or edit options". Follow the instructions in the message you receive. On 05/06/2022 01:10, Justin Senseney wrote: > Please unsubscribe me from your mailing list -- Regards, Alexey From aivanov at openjdk.java.net Tue Jun 7 10:50:23 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 7 Jun 2022 10:50:23 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v9] In-Reply-To: <4OOBCQ6QrnCUrQk6yn6Jf1fPkLzskJb8YplgqjBowi0=.89377ce9-a82f-43d4-84a4-748b7b694602@github.com> References: <4OOBCQ6QrnCUrQk6yn6Jf1fPkLzskJb8YplgqjBowi0=.89377ce9-a82f-43d4-84a4-748b7b694602@github.com> Message-ID: On Mon, 6 Jun 2022 06:08:38 GMT, Tejesh R wrote: >> Added test for checking setMargin() of JRadioButton. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on review comments Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JRadioButton/bug4380543.java line 58: > 56: 2. Rendering depends on OS and supported Look and Feels. > 57: Verify only with those L&F where margins are visible. > 58: 3. If Left inset(margin) appear too small, press Fail, Suggestion: 3. If Left inset(margin) appears too small, press Fail, test/jdk/javax/swing/JRadioButton/bug4380543.java line 72: > 70: //Adding the Test Frame to handle dispose > 71: passFailJFrame.addTestFrame(testObj); > 72: passFailJFrame.positionTestFrame(testObj, PassFailJFrame.Position.HORIZONTAL); This was correct: you're calling static methods; such methods should not be called _via an instance variable_ but via the class name. Alternatively, you can static-import these methods. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From tr at openjdk.java.net Tue Jun 7 11:09:54 2022 From: tr at openjdk.java.net (Tejesh R) Date: Tue, 7 Jun 2022 11:09:54 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v9] In-Reply-To: References: <4OOBCQ6QrnCUrQk6yn6Jf1fPkLzskJb8YplgqjBowi0=.89377ce9-a82f-43d4-84a4-748b7b694602@github.com> Message-ID: On Tue, 7 Jun 2022 10:47:25 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated based on review comments > > test/jdk/javax/swing/JRadioButton/bug4380543.java line 72: > >> 70: //Adding the Test Frame to handle dispose >> 71: passFailJFrame.addTestFrame(testObj); >> 72: passFailJFrame.positionTestFrame(testObj, PassFailJFrame.Position.HORIZONTAL); > > This was correct: you're calling static methods; such methods should not be called _via an instance variable_ but via the class name. Alternatively, you can static-import these methods. I think it wouldn't make any difference calling static methods via an instance variable or directly with class name. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From tr at openjdk.java.net Tue Jun 7 11:19:10 2022 From: tr at openjdk.java.net (Tejesh R) Date: Tue, 7 Jun 2022 11:19:10 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v10] In-Reply-To: References: Message-ID: > Added test for checking setMargin() of JRadioButton. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on review comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8721/files - new: https://git.openjdk.java.net/jdk/pull/8721/files/73e5a4b8..96cb967a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=09 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=08-09 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/8721.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8721/head:pull/8721 PR: https://git.openjdk.java.net/jdk/pull/8721 From tr at openjdk.java.net Tue Jun 7 11:19:14 2022 From: tr at openjdk.java.net (Tejesh R) Date: Tue, 7 Jun 2022 11:19:14 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v9] In-Reply-To: References: <4OOBCQ6QrnCUrQk6yn6Jf1fPkLzskJb8YplgqjBowi0=.89377ce9-a82f-43d4-84a4-748b7b694602@github.com> Message-ID: On Tue, 7 Jun 2022 10:46:15 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated based on review comments > > test/jdk/javax/swing/JRadioButton/bug4380543.java line 58: > >> 56: 2. Rendering depends on OS and supported Look and Feels. >> 57: Verify only with those L&F where margins are visible. >> 58: 3. If Left inset(margin) appear too small, press Fail, > > Suggestion: > > 3. If Left inset(margin) appears too small, press Fail, Updated. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From aivanov at openjdk.java.net Tue Jun 7 11:19:16 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 7 Jun 2022 11:19:16 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v9] In-Reply-To: References: <4OOBCQ6QrnCUrQk6yn6Jf1fPkLzskJb8YplgqjBowi0=.89377ce9-a82f-43d4-84a4-748b7b694602@github.com> Message-ID: <9CE5QA5NON4uk4Gl-vI2h6h2Al5BQAxaCgKcnhlcTSw=.e930f390-54bb-4f98-9ed7-911a27cd271c@github.com> On Tue, 7 Jun 2022 11:06:06 GMT, Tejesh R wrote: >> test/jdk/javax/swing/JRadioButton/bug4380543.java line 72: >> >>> 70: //Adding the Test Frame to handle dispose >>> 71: passFailJFrame.addTestFrame(testObj); >>> 72: passFailJFrame.positionTestFrame(testObj, PassFailJFrame.Position.HORIZONTAL); >> >> This was correct: you're calling static methods; such methods should not be called _via an instance variable_ but via the class name. Alternatively, you can static-import these methods. > > I think it wouldn't make any difference calling static methods via an instance variable or directly with class name. Yes, the same method would be called. Yet the difference is in the semantics: the instance variable isn't used when calling a static method, it can be null and it doesn't throw NullPointerException in this case. The IDE raises a warning for such a usage. _You should use class name when calling static methods._ It's just cleaner: the reader would see right away it's a static method (without relying on the IDE syntax highlighting) rather than an instance method. Please revert these two lines to using the class name to call the static methods. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From tr at openjdk.java.net Tue Jun 7 11:19:16 2022 From: tr at openjdk.java.net (Tejesh R) Date: Tue, 7 Jun 2022 11:19:16 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v9] In-Reply-To: <9CE5QA5NON4uk4Gl-vI2h6h2Al5BQAxaCgKcnhlcTSw=.e930f390-54bb-4f98-9ed7-911a27cd271c@github.com> References: <4OOBCQ6QrnCUrQk6yn6Jf1fPkLzskJb8YplgqjBowi0=.89377ce9-a82f-43d4-84a4-748b7b694602@github.com> <9CE5QA5NON4uk4Gl-vI2h6h2Al5BQAxaCgKcnhlcTSw=.e930f390-54bb-4f98-9ed7-911a27cd271c@github.com> Message-ID: On Tue, 7 Jun 2022 11:11:24 GMT, Alexey Ivanov wrote: >> I think it wouldn't make any difference calling static methods via an instance variable or directly with class name. > > Yes, the same method would be called. Yet the difference is in the semantics: the instance variable isn't used when calling a static method, it can be null and it doesn't throw NullPointerException in this case. > > The IDE raises a warning for such a usage. _You should use class name when calling static methods._ It's just cleaner: the reader would see right away it's a static method (without relying on the IDE syntax highlighting) rather than an instance method. > > Please revert these two lines to using the class name to call the static methods. Yeah sure, updated. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From serb at openjdk.java.net Tue Jun 7 11:36:52 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 7 Jun 2022 11:36:52 GMT Subject: RFR: 8287876: The recently de-problemlisted TestTitledBorderLeak test is unstable [v2] In-Reply-To: References: Message-ID: > This is an update of the test which was de-problemlisted [here](https://github.com/openjdk/jdk/pull/8450). > > Looks like the initial root cause of the issue was related to the last disposed frame which for some reason was not deleted from the memory, for that issue, the [next](https://bugs.openjdk.org/browse/JDK-8287707) bug was reported. > But that change also replaced the usage of weak references by the Runtime.getRuntime().freeMemory() which is not stable enough to verify the leak - its return values vary a lot. > > This change returns the usage of weak references and tests only one instance of TitledBorder which is enough to verify the old [bug](https://bugs.openjdk.org/browse/JDK-8204963). Sergey Bylokhov has updated the pull request incrementally with one additional commit since the last revision: Smaller version ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/9051/files - new: https://git.openjdk.java.net/jdk/pull/9051/files/da1a82c9..125bf43d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=9051&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=9051&range=00-01 Stats: 14 lines in 1 file changed: 0 ins; 14 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/9051.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/9051/head:pull/9051 PR: https://git.openjdk.java.net/jdk/pull/9051 From serb at openjdk.java.net Tue Jun 7 11:40:11 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 7 Jun 2022 11:40:11 GMT Subject: RFR: 8287876: The recently de-problemlisted TestTitledBorderLeak test is unstable In-Reply-To: References: Message-ID: On Tue, 7 Jun 2022 04:15:49 GMT, Sergey Bylokhov wrote: > This is an update of the test which was de-problemlisted [here](https://github.com/openjdk/jdk/pull/8450). > > Looks like the initial root cause of the issue was related to the last disposed frame which for some reason was not deleted from the memory, for that issue, the [next](https://bugs.openjdk.org/browse/JDK-8287707) bug was reported. > But that change also replaced the usage of weak references by the Runtime.getRuntime().freeMemory() which is not stable enough to verify the leak - its return values vary a lot. > > This change returns the usage of weak references and tests only one instance of TitledBorder which is enough to verify the old [bug](https://bugs.openjdk.org/browse/JDK-8204963). I have found that the simpler version of the test can be used to verify that old bug. the patch is updated. ------------- PR: https://git.openjdk.java.net/jdk/pull/9051 From aivanov at openjdk.java.net Tue Jun 7 11:47:27 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 7 Jun 2022 11:47:27 GMT Subject: RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v7] In-Reply-To: References: Message-ID: On Mon, 6 Jun 2022 06:16:16 GMT, Tejesh R wrote: >> _Header_ object not initialized/set when paint() method of `WindowTableHeaderUI` class is executed. The paint() event is executed through explicit call of `JTable.updateUI()` in the regression test. In order to set the _header_ to the _called_ JTable, it is set in the `getTableCellRendererComponent()` method, which in turn makes the _header_ object available during paint event without causing NPE. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on review comments Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JTableHeader/TableRendererTest.java line 31: > 29: @summary Test to check if table is printed without NPE > 30: @run main TableRendererTest > 31: */ Could you move the test tags below the imports? Most new tests follow this style and I find it more convenient when viewing the test source in the IDE, the test tags aren't collapsed this way. Please add asterisk at the beginning of each line. It should look like this: /* * @test * @bug */ To follow the common style of Java block comments and test tags in the majority of files. Please do not use `/**` as the first comment: it's not a Javadoc comment to avoid warning about the unknown javadoc tags. test/jdk/javax/swing/JTableHeader/TableRendererTest.java line 47: > 45: import javax.swing.table.TableCellRenderer; > 46: > 47: public class TableRendererTest{ I suggest making the name more specific: `TableHeaderRendererTest` or `TableHeaderRendererNPETest`. ------------- PR: https://git.openjdk.java.net/jdk/pull/8830 From tr at openjdk.java.net Tue Jun 7 11:58:01 2022 From: tr at openjdk.java.net (Tejesh R) Date: Tue, 7 Jun 2022 11:58:01 GMT Subject: RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v8] In-Reply-To: References: Message-ID: <0vsbn9QEPTr3O4e2thstKM8odT046_I55Fb9SsdbYHQ=.2077175e-36a8-4b27-8bbd-0692698f0a78@github.com> > _Header_ object not initialized/set when paint() method of `WindowTableHeaderUI` class is executed. The paint() event is executed through explicit call of `JTable.updateUI()` in the regression test. In order to set the _header_ to the _called_ JTable, it is set in the `getTableCellRendererComponent()` method, which in turn makes the _header_ object available during paint event without causing NPE. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on review comments and File name changed ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8830/files - new: https://git.openjdk.java.net/jdk/pull/8830/files/ee0a1dca..89b4cadb Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8830&range=07 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8830&range=06-07 Stats: 239 lines in 2 files changed: 108 ins; 131 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8830.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8830/head:pull/8830 PR: https://git.openjdk.java.net/jdk/pull/8830 From tr at openjdk.java.net Tue Jun 7 12:01:06 2022 From: tr at openjdk.java.net (Tejesh R) Date: Tue, 7 Jun 2022 12:01:06 GMT Subject: RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v7] In-Reply-To: References: Message-ID: <42hBfmtBK9lnQia_cNqCyeHx_rJPhZwtcSqVzEtXHOg=.944be4ff-08da-4928-80cf-742c99746750@github.com> On Tue, 7 Jun 2022 11:42:38 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated based on review comments > > test/jdk/javax/swing/JTableHeader/TableRendererTest.java line 31: > >> 29: @summary Test to check if table is printed without NPE >> 30: @run main TableRendererTest >> 31: */ > > Could you move the test tags below the imports? > > Most new tests follow this style and I find it more convenient when viewing the test source in the IDE, the test tags aren't collapsed this way. > > Please add asterisk at the beginning of each line. It should look like this: > > > /* > * @test > * @bug > */ > > > To follow the common style of Java block comments and test tags in the majority of files. > > Please do not use `/**` as the first comment: it's not a Javadoc comment to avoid warning about the unknown javadoc tags. Updated. > test/jdk/javax/swing/JTableHeader/TableRendererTest.java line 47: > >> 45: import javax.swing.table.TableCellRenderer; >> 46: >> 47: public class TableRendererTest{ > > I suggest making the name more specific: `TableHeaderRendererTest` or `TableHeaderRendererNPETest`. Updated. ------------- PR: https://git.openjdk.java.net/jdk/pull/8830 From aivanov at openjdk.java.net Tue Jun 7 12:31:16 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 7 Jun 2022 12:31:16 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v10] In-Reply-To: References: Message-ID: On Tue, 7 Jun 2022 11:19:10 GMT, Tejesh R wrote: >> Added test for checking setMargin() of JRadioButton. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on review comments Marked as reviewed by aivanov (Reviewer). test/jdk/javax/swing/JRadioButton/bug4380543.java line 58: > 56: 2. Rendering depends on OS and supported Look and Feels. > 57: Verify only with those L&F where margins are visible. > 58: 3. If Left inset(margin) appears too small, press Fail, Suggestion: 3. If the Left inset(margin) appears too small, press Fail, I guess the article is missing here. It may be missing in the first item too: ??around *the* Radio Button?? test/jdk/javax/swing/JRadioButton/bug4380543.java line 94: > 92: JRadioButton rb = new JRadioButton("JRadioButton"); > 93: rb.setMargin(new Insets(20, 20, 20, 20)); > 94: rb.setBackground(Color.green); In the new code, we should use uppercase color constants, I guess. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From aivanov at openjdk.java.net Tue Jun 7 12:48:08 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 7 Jun 2022 12:48:08 GMT Subject: RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v8] In-Reply-To: <0vsbn9QEPTr3O4e2thstKM8odT046_I55Fb9SsdbYHQ=.2077175e-36a8-4b27-8bbd-0692698f0a78@github.com> References: <0vsbn9QEPTr3O4e2thstKM8odT046_I55Fb9SsdbYHQ=.2077175e-36a8-4b27-8bbd-0692698f0a78@github.com> Message-ID: On Tue, 7 Jun 2022 11:58:01 GMT, Tejesh R wrote: >> _Header_ object not initialized/set when paint() method of `WindowTableHeaderUI` class is executed. The paint() event is executed through explicit call of `JTable.updateUI()` in the regression test. In order to set the _header_ to the _called_ JTable, it is set in the `getTableCellRendererComponent()` method, which in turn makes the _header_ object available during paint event without causing NPE. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on review comments and File name changed It looks good now. What's left is to ensure it passes when run headless. It should just work on Windows. Can we address @mrserb's concern and extend the test be run on other platforms and with all L&Fs? test/jdk/javax/swing/JTableHeader/TableHeaderRendererTest.java line 40: > 38: * @bug 6429812 > 39: * @requires (os.family == "windows") > 40: * @summary Test to check if table is printed without NPE Suggestion: * @summary Test to check if table header is painted without NPE Nothing is printed in this test case. ------------- PR: https://git.openjdk.java.net/jdk/pull/8830 From tr at openjdk.java.net Tue Jun 7 13:34:21 2022 From: tr at openjdk.java.net (Tejesh R) Date: Tue, 7 Jun 2022 13:34:21 GMT Subject: RFR: 6429812: NPE after calling JTable.updateUI() when using a header renderer + XP L&F [v8] In-Reply-To: References: <0vsbn9QEPTr3O4e2thstKM8odT046_I55Fb9SsdbYHQ=.2077175e-36a8-4b27-8bbd-0692698f0a78@github.com> Message-ID: On Tue, 7 Jun 2022 12:44:43 GMT, Alexey Ivanov wrote: > It looks good now. > > What's left is to ensure it passes when run headless. It should just work on Windows. > > Can we address @mrserb's concern and extend the test be run on other platforms and with all L&Fs? Yeah sure. ------------- PR: https://git.openjdk.java.net/jdk/pull/8830 From tr at openjdk.java.net Tue Jun 7 13:40:57 2022 From: tr at openjdk.java.net (Tejesh R) Date: Tue, 7 Jun 2022 13:40:57 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v11] In-Reply-To: References: Message-ID: > Added test for checking setMargin() of JRadioButton. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on review comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8721/files - new: https://git.openjdk.java.net/jdk/pull/8721/files/96cb967a..631e6e2a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=10 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8721&range=09-10 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/8721.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8721/head:pull/8721 PR: https://git.openjdk.java.net/jdk/pull/8721 From tr at openjdk.java.net Tue Jun 7 13:40:58 2022 From: tr at openjdk.java.net (Tejesh R) Date: Tue, 7 Jun 2022 13:40:58 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v10] In-Reply-To: References: Message-ID: On Tue, 7 Jun 2022 12:27:51 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated based on review comments > > test/jdk/javax/swing/JRadioButton/bug4380543.java line 94: > >> 92: JRadioButton rb = new JRadioButton("JRadioButton"); >> 93: rb.setMargin(new Insets(20, 20, 20, 20)); >> 94: rb.setBackground(Color.green); > > In the new code, we should use uppercase color constants, I guess. Updated. ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From azvegint at openjdk.java.net Tue Jun 7 13:57:52 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Tue, 7 Jun 2022 13:57:52 GMT Subject: RFR: 8273573: [macos12] ActionListenerCalledTwiceTest.java fails on macOS 12 [v2] In-Reply-To: References: Message-ID: On Tue, 7 Jun 2022 07:41:20 GMT, Prasanta Sadhukhan wrote: > I thought I already approved.. Sure, it was, but it differs significantly from the approved version. Thanks. ------------- PR: https://git.openjdk.java.net/jdk/pull/9003 From azvegint at openjdk.java.net Tue Jun 7 14:01:04 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Tue, 7 Jun 2022 14:01:04 GMT Subject: Integrated: 8273573: [macos12] ActionListenerCalledTwiceTest.java fails on macOS 12 In-Reply-To: References: Message-ID: On Thu, 2 Jun 2022 20:12:01 GMT, Alexander Zvegintsev wrote: > This test was failing consistently on same machines and at the same time as #8532. > > Test failure is also no longer reproducible after #8320 fix. > > This is macOS only test, so corresponding `@requires os.family` tag was added. Testing is green. This pull request has now been integrated. Changeset: 1499e5ea Author: Alexander Zvegintsev URL: https://git.openjdk.java.net/jdk/commit/1499e5eac0cad3745495baeda7b5f9157647ebe9 Stats: 30 lines in 2 files changed: 9 ins; 4 del; 17 mod 8273573: [macos12] ActionListenerCalledTwiceTest.java fails on macOS 12 Reviewed-by: psadhukhan, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/9003 From psadhukhan at openjdk.java.net Tue Jun 7 14:57:06 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 7 Jun 2022 14:57:06 GMT Subject: RFR: 8190907: Windows 10 default Korean Font Malgun Gothic available not used by GUI elements even though available without Korean Language Pack [v6] In-Reply-To: References: <_cAab99k8SxU4y3G_FwRT3fg8t39fYQUDTdEwOZYZmc=.5d71beab-25a0-4c29-b194-d4680961b530@github.com> Message-ID: On Mon, 6 Jun 2022 09:48:47 GMT, Prasanta Sadhukhan wrote: > I see even `Gulimche `and `Batang `are not visible without -Dfile.encoding=ko so maybe it's what is expected. Malgun Gothic is visible without user.language=ko and user.country=KR in command line (of course without -Dfile.encoding=ko) OTOH, if we specify user.language=ja and user.country=JP, `MS Mincho` `MS Gothic` japanese font does not appear so maybe it is expected and not weird. ------------- PR: https://git.openjdk.java.net/jdk/pull/7643 From aivanov at openjdk.java.net Tue Jun 7 15:33:10 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 7 Jun 2022 15:33:10 GMT Subject: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton [v11] In-Reply-To: References: Message-ID: On Tue, 7 Jun 2022 13:40:57 GMT, Tejesh R wrote: >> Added test for checking setMargin() of JRadioButton. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on review comments Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From aivanov at openjdk.java.net Tue Jun 7 15:44:13 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 7 Jun 2022 15:44:13 GMT Subject: RFR: 8276849: Refresh the window icon on graphics configuration changes [v4] In-Reply-To: References: <0oxxlnAHynu4eIJIE8cMzXJlpU7I_CF1kBk4IYSN3YY=.e8b93bca-4b06-4a70-82db-aa608d6bb350@github.com> Message-ID: On Wed, 23 Feb 2022 21:34:29 GMT, Emmanuel Bourg wrote: >> Emmanuel Bourg has updated the pull request incrementally with two additional commits since the last revision: >> >> - Test case for the window icon update on DPI change (Java generic font names are usually capitalized) >> - Test case for the window icon update on DPI change (dispose the frame after a timeout on the EDT) > > Just tested on macOS 12 with a non Retina screen and OpenJDK 8: the icon displayed in the dock when the test frame is minimized is the 32x32 one. If I add more icons to the list, it picks the biggest one, up to 128x128. Bigger icons are ignored. > > The issue observed on Windows doesn't really transpose to macOS, I think I'll revert the change to `LWWindowPeer`. This is a good change, especially for Windows. It's a pity @ebourg hasn't integrated it. ------------- PR: https://git.openjdk.java.net/jdk/pull/6180 From duke at openjdk.java.net Tue Jun 7 15:44:15 2022 From: duke at openjdk.java.net (duke) Date: Tue, 7 Jun 2022 15:44:15 GMT Subject: Withdrawn: 8276849: Refresh the window icon on graphics configuration changes In-Reply-To: References: Message-ID: On Sun, 31 Oct 2021 08:21:58 GMT, Emmanuel Bourg wrote: > When a list of icons is set on a window, the most appropiate icon is selected depending on the graphics configuration. But if the graphics configuration changes (because the window is moved to a different screen, or because the DPI settings of the screen is changed), the frame icon isn't updated. > > Here is an example illustrating the issue: > > public static void main(String[] args) throws Exception { > SwingUtilities.invokeLater(() -> { > JFrame frame = new JFrame("Window Icon Test"); > frame.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); > frame.setSize(400, 300); > frame.setVisible(true); > > List images = new ArrayList<>(); > for (int size = 16; size <= 32; size++) { > // create an image displaying the size used > BufferedImage image = new BufferedImage(size, size, BufferedImage.TYPE_INT_ARGB); > Graphics2D g = image.createGraphics(); > g.setFont(new Font("dialog", Font.BOLD, 12)); > g.setColor(Color.BLACK); > g.drawString(String.valueOf(size), 0, size - (size - g.getFont().getSize()) / 2); > images.add(image); > } > > frame.setIconImages(images); > }); > } > > On Windows if the screen scaling is set to 100% the 16x16 icon is picked from the list. If the scaling of the screen is set to 150% while the application is running, the 16x16 icon is upscaled and looks blurry. > > A way to work around this issue is to listen for graphics configuration changes with: > > frame.addPropertyChangeListener("graphicsConfiguration", event -> frame.setIconImages(frame.getIconImages())); > > > Ideally this should be done automatically by the JDK. Maybe the `WindowPeer` could call `updateIconImages()` when `updateGraphicsData()` or `displayChanged()` is invoked? This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/6180 From tr at openjdk.java.net Tue Jun 7 15:53:08 2022 From: tr at openjdk.java.net (Tejesh R) Date: Tue, 7 Jun 2022 15:53:08 GMT Subject: Integrated: 8286620: Create regression test for verifying setMargin() of JRadioButton In-Reply-To: References: Message-ID: On Mon, 16 May 2022 06:45:04 GMT, Tejesh R wrote: > Added test for checking setMargin() of JRadioButton. This pull request has now been integrated. Changeset: 67f1bd7f Author: Tejesh R Committer: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/67f1bd7ff1bb218fd6de9ef1e957f729013e133c Stats: 135 lines in 1 file changed: 135 ins; 0 del; 0 mod 8286620: Create regression test for verifying setMargin() of JRadioButton Reviewed-by: jdv, honkar, aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/8721 From aivanov at openjdk.java.net Tue Jun 7 19:19:38 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 7 Jun 2022 19:19:38 GMT Subject: RFR: 8012675: Javadoc for javax.swing.text.html.parser.Parser.handleComment() needs to be updated In-Reply-To: References: Message-ID: On Fri, 11 Mar 2022 23:19:19 GMT, Damon Nguyen wrote: > So I wrote a test with a JEditorPane loading HTML from a file, but couldn't get HTML buttons to render properly in JEditorPane. I wanted HTML buttons to test a foo function encased in script tags in my HTML file to see if script tags are parsed or just ignored via a proper test. Swing does not support plain `button` type, only `submit` and `reset`. https://github.com/openjdk/jdk/blob/ec4fb47b90c9737dfdc285ebe98367a221c90c79/src/java.desktop/share/classes/javax/swing/text/html/FormView.java#L257-L257 This is why the button isn't rendered. It may be due to the fact that there's no way to associate a handler for button click because scripts aren't supported. ------------- PR: https://git.openjdk.java.net/jdk/pull/7446 From aivanov at openjdk.java.net Tue Jun 7 19:19:40 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 7 Jun 2022 19:19:40 GMT Subject: RFR: 8012675: Javadoc for javax.swing.text.html.parser.Parser.handleComment() needs to be updated [v3] In-Reply-To: References: Message-ID: On Mon, 6 Jun 2022 16:28:22 GMT, Damon Nguyen wrote: >> I see your points and agree that your points are valid. Parser has no part in the display and is fact handled elsewhere. >> >> I initially had to look through and learn what each class for HTML parsing is responsible for, and Parser is meant to handle reading chars and adding the chars to a buffer to be processed elsewhere. In this case, I found the HTML contents were routed to DocumentParser. And from there, I had to trace the stack and add debugging statements to find that hidden tags were responsible for the specialized text fields and text areas that appeared. >> >> I'll definitely iterate on the documentation to increase clarity and remove mention of HiddenTagView. > > The editor kit is responsible for delegating which tags will be displayed this way. The list of tags supported can be located in the HTML class, and it's worth noting that script tag is among the tags listed here. But, there is another list of tags in the editor kit's code which are the tags that do not have full support. Script tags are one of these tags; another example being title tags. These tags that are not fully supported, alongside unknown tags, are being passed into HiddenTagView and being displayed as such. So, I tried simplifying the doc description to state the behavior as relevant to the Parser class only. Maybe additional documentation is required in HTMLEditorKit as well? Do we want to say anything about them being hidden when editable is set to false? If I add the following line to the test: jep.setEditable(false); Then the script tags are hidden from view. ------------- PR: https://git.openjdk.java.net/jdk/pull/7446 From aivanov at openjdk.java.net Tue Jun 7 19:19:45 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 7 Jun 2022 19:19:45 GMT Subject: RFR: 8012675: Javadoc for javax.swing.text.html.parser.Parser.handleComment() needs to be updated [v8] In-Reply-To: <23EzklXwXRVg1eW3r87i1NFJHvwJFxUFMujEH7N3CQw=.97ed5f39-3f0b-419d-a787-a380c95ead13@github.com> References: <23EzklXwXRVg1eW3r87i1NFJHvwJFxUFMujEH7N3CQw=.97ed5f39-3f0b-419d-a787-a380c95ead13@github.com> Message-ID: On Mon, 6 Jun 2022 20:45:46 GMT, Damon Nguyen wrote: >> Updated Parser class doc by appending to the doc regarding lack of support for HTML script tags. Adding this information to the "parse" function did not seem as consistent for formatting as adding it to the Parser class doc. > > Damon Nguyen has updated the pull request incrementally with one additional commit since the last revision: > > Changed doc text. test/jdk/javax/swing/text/html/HtmlTagParserTest.java line 65: > 63: InvocationTargetException { > 64: SwingUtilities.invokeAndWait(() -> { > 65: jep = new JEditorPane(); Suggestion: jep = new JEditorPane("text/html", htmlText); It produces the same result as loading the HTML from a temporary file. test/jdk/javax/swing/text/html/HtmlTagParserTest.java line 83: > 81: } > 82: > 83: public static void main(String args[]) throws InterruptedException, Suggestion: public static void main(String[] args) throws InterruptedException, Please use Java-style array declaration. ------------- PR: https://git.openjdk.java.net/jdk/pull/7446 From aivanov at openjdk.java.net Tue Jun 7 19:23:34 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 7 Jun 2022 19:23:34 GMT Subject: RFR: 8012675: Javadoc for javax.swing.text.html.parser.Parser.handleComment() needs to be updated [v4] In-Reply-To: References: Message-ID: On Mon, 6 Jun 2022 16:19:18 GMT, Damon Nguyen wrote: >> test/jdk/javax/swing/text/html/parser/HtmlTagParserTest.java line 1: >> >>> 1: import java.awt.Dimension; >> >> where's the GPL header on this test ? > > Added the header and moved the test to the HTML folder instead since I believe the process involves classes beyond just the Parser. For example, I found that the tags and unknown tags are located in the HTML class. I can move it back if it seems more appropriate since the issue requests changes to the Parser's doc only. Shall the test name be `HtmlScriptTagParserTest.java`? The test is for testing handling the `