From serb at openjdk.java.net Wed Dec 1 04:30:28 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 1 Dec 2021 04:30:28 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy In-Reply-To: References: Message-ID: On Tue, 30 Nov 2021 01:31:24 GMT, Liam Miller-Cushon wrote: > This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). As of the usefulness of the serializations tests in Swing - it is a good coverage of the cleaning code in the L&fs. Each L&F should clean all its data when the app switch one LF to another, but if old L&F forget to cleanup then the app will get a memory leak. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From serb at openjdk.java.net Wed Dec 1 04:44:26 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 1 Dec 2021 04:44:26 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy In-Reply-To: References: Message-ID: On Tue, 30 Nov 2021 20:46:34 GMT, Liam Miller-Cushon wrote: > I regenerated it by following the instructions to compile and run the test class as a standalone tool on `x86_64 GNU/Linux`, which updated all of the existing files. I verified it fixes the test on that platform, I don't have a great way to test it on the other platforms right now. As far as I remember the previous fix regenerated the binary files only, for a specific reason - before that a couple of commits fixed a memory leak which prevents the Aqua L&F deletes all its delegates during cleanup step. This cleanup step is executed in two cases, when we serialize the component or when we switch one L&F to another. Since the fix for JDK-8276665 exposed another bug you will need: 1. Regenerate the data on macOS 2. If the test will fail while use the new regenerated data, then you will need to fix the Aqua to properly delete the references to the Aqua specific objects. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From serb at openjdk.java.net Wed Dec 1 04:47:32 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 1 Dec 2021 04:47:32 GMT Subject: RFR: 8264666: Reuse Math.multiplyExact/addExact in the LCMSImageLayout class In-Reply-To: <3iYQc9duUeEGRqm3146n4XhLQ_LY6YzXv-f-WgDu9sE=.a0a36297-4ce8-489c-9b50-43aede408e3b@github.com> References: <3iYQc9duUeEGRqm3146n4XhLQ_LY6YzXv-f-WgDu9sE=.a0a36297-4ce8-489c-9b50-43aede408e3b@github.com> Message-ID: <96-wh0UfZ8HmfbhrPDzh1dZkpUF76GikHRPkGMMW9Mk=.6b38168f-2617-4b6d-9027-a169fff5dd9e@github.com> On Fri, 2 Apr 2021 23:02:50 GMT, Sergey Bylokhov wrote: > - The hand-crafted methods for addition and multiplication are replaced by the "Math" versions. > - Cleanup: the usage of do/while(false) is removed not now ------------- PR: https://git.openjdk.java.net/jdk/pull/3333 From serb at openjdk.java.net Wed Dec 1 04:48:28 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 1 Dec 2021 04:48:28 GMT Subject: RFR: 8274939: Incorrect size of the pixel storage is used by the robot on macOS In-Reply-To: References: Message-ID: On Fri, 8 Oct 2021 10:23:13 GMT, Sergey Bylokhov wrote: > In JDK 9 the native code for the robot class was reworked to get an access to the HiDPI quality screenshots. So we allocate the data storage for the HiDPI quality and then request the best quality from the macOS. > > It works fine if the user request the screenshot of some area, since we properly scale this area. Unfortunately it does not work well if the user request only one pixel, in this case we allocate the array of one element and does not multiply the size by the scale, so if the system scale is 2 then the macOS returns the 2x2 pixels, which does not fit properly to the array of one element. This can be checked by the Xcheck:jni option which produce fatal error in this case. > > Solution is to allocate the storage of the proper size 1 * scale * 1 * scale Any volunteers? ------------- PR: https://git.openjdk.java.net/jdk/pull/5864 From serb at openjdk.java.net Wed Dec 1 04:48:29 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 1 Dec 2021 04:48:29 GMT Subject: RFR: 8225122: Test AncestorResized.java fails when Windows desktop is scaled. In-Reply-To: References: Message-ID: On Mon, 27 Sep 2021 03:33:52 GMT, Sergey Bylokhov wrote: > This test depends on the next windows UI performance option: > ?Show window contents while dragging?, see https://answers.microsoft.com/en-us/windows/forum/all/in-windows-7-how-do-i-show-window-contents-while/18e3aee2-bcc7-4005-a45d-c5613cf6eb3c > > In the default configuration, the windows may decide that the system is slow and this option should be disabled. I have found that this usually happens in the virtual environment. > > When that option is disabled the resize events have come when the user completes the resize, before that the only border "rectangle" is moved. > > This fix changes the test to release the mouse and complete the resize, and only after that checks the result. > > Also, some old machinery is removed. Any volunteers? ------------- PR: https://git.openjdk.java.net/jdk/pull/5711 From jdv at openjdk.java.net Wed Dec 1 06:15:27 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Wed, 1 Dec 2021 06:15:27 GMT Subject: RFR: 8266435: WBMPImageReader.read() should not truncate the input stream In-Reply-To: References: Message-ID: On Thu, 25 Nov 2021 03:56:32 GMT, Sergey Bylokhov wrote: >> If we use a custom stream and specify limit on stream.read() length, WBMPImageReader.read() doesnt verify whether we are decoded complete data or not. We can check the length of data decoded and rerun the stream.read() or use readFully(). In case of other decoders like BMP we are using readFully(), so i have updated WBMPImageReader.read() to use readFully(). > > test/jdk/javax/imageio/plugins/wbmp/WBMPStreamTruncateTest.java line 61: > >> 59: File imageFile = File. >> 60: createTempFile("test", ".wbmp", new File(filePath)); >> 61: imageFile.deleteOnExit(); > > In one another review I saw the deleteOnExit() usage, I remember that in case of full testrun via makefile, such files were not deleted, can you please confirm that it is work fine? probably that it was fixed already. Note that the full test run uses custom tmp folder inside the result dir. @mrserb I ran the test using "make test" and i dont see any .wbmp file after test run in results directory. Also i verified that it doesn't leave any image in test directory of CI machines. ------------- PR: https://git.openjdk.java.net/jdk/pull/6518 From myano at openjdk.java.net Wed Dec 1 06:21:36 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Wed, 1 Dec 2021 06:21:36 GMT Subject: Integrated: 8262297: ImageIO.write() method will throw IndexOutOfBoundsException In-Reply-To: References: Message-ID: On Thu, 28 Oct 2021 09:29:13 GMT, Masanori Yano wrote: > Could you please review the 8262297 bug fixes? > > In this case, ImageIO.write() should throw java.io.IOException rather than java.lang.IndexOutOfBoundsException. IndexOutOfBoundsException is caught and wrapped in IIOException in ImageIO.write() with this fix. In addition, IndexOutOfBoundsException is not expected to throw by RandomAccessFile#write() according to its API specification. So it should be fixed. This pull request has now been integrated. Changeset: c7331935 Author: Masanori Yano Committer: Jayathirth D V URL: https://git.openjdk.java.net/jdk/commit/c73319354399596ab2b9aab0a7f62e8fa0ab9365 Stats: 86 lines in 2 files changed: 84 ins; 0 del; 2 mod 8262297: ImageIO.write() method will throw IndexOutOfBoundsException Reviewed-by: serb, jdv ------------- PR: https://git.openjdk.java.net/jdk/pull/6151 From jdv at openjdk.java.net Wed Dec 1 07:00:30 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Wed, 1 Dec 2021 07:00:30 GMT Subject: RFR: 8272392 Lanai: SwingSet2. Black background on expanding tree node [v2] In-Reply-To: References: Message-ID: On Fri, 26 Nov 2021 09:02:37 GMT, Alexey Ushakov wrote: >> Removed creation of the separate encoder depending on destination properties as we don't use this info to customize the encoder properties > > Alexey Ushakov has updated the pull request incrementally with one additional commit since the last revision: > > 8272392 Lanai: SwingSet2. Black background on expanding tree node > > Fixed incorrect addition of the values into pipeline state cache. Refactored index initialization. Removed unused flags from MTLClip. src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/EncoderManager.m line 44: > 42: > 43: - (void)reset:(id)destination > 44: isAA:(jboolean)isAA I think by mistake isText argument is also removed. It is not matching reset() implementation. ------------- PR: https://git.openjdk.java.net/jdk/pull/6529 From jdv at openjdk.java.net Wed Dec 1 07:11:29 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Wed, 1 Dec 2021 07:11:29 GMT Subject: RFR: 8272392 Lanai: SwingSet2. Black background on expanding tree node [v2] In-Reply-To: References: Message-ID: On Fri, 26 Nov 2021 09:02:37 GMT, Alexey Ushakov wrote: >> Removed creation of the separate encoder depending on destination properties as we don't use this info to customize the encoder properties > > Alexey Ushakov has updated the pull request incrementally with one additional commit since the last revision: > > 8272392 Lanai: SwingSet2. Black background on expanding tree node > > Fixed incorrect addition of the values into pipeline state cache. Refactored index initialization. Removed unused flags from MTLClip. src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLClip.m line 61: > 59: BOOL _stencilMaskGenerationInProgress; > 60: BOOL _stencilMaskGenerationStarted; > 61: BOOL _clipReady; This looks like cleanup and not related to this change. Sometime back i also had question on why this was needed. Thanks. ------------- PR: https://git.openjdk.java.net/jdk/pull/6529 From psadhukhan at openjdk.java.net Wed Dec 1 07:37:29 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 1 Dec 2021 07:37:29 GMT Subject: RFR: 8274939: Incorrect size of the pixel storage is used by the robot on macOS In-Reply-To: References: Message-ID: On Fri, 8 Oct 2021 10:23:13 GMT, Sergey Bylokhov wrote: > In JDK 9 the native code for the robot class was reworked to get an access to the HiDPI quality screenshots. So we allocate the data storage for the HiDPI quality and then request the best quality from the macOS. > > It works fine if the user request the screenshot of some area, since we properly scale this area. Unfortunately it does not work well if the user request only one pixel, in this case we allocate the array of one element and does not multiply the size by the scale, so if the system scale is 2 then the macOS returns the 2x2 pixels, which does not fit properly to the array of one element. This can be checked by the Xcheck:jni option which produce fatal error in this case. > > Solution is to allocate the storage of the proper size 1 * scale * 1 * scale It seems CheckCommonColors still fails intermittently even with this fix in macos aarch64 along with others open/test/jdk/java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java, open/test/jdk/java/awt/ColorClass/AlphaColorTest.java, open/test/jdk/java/awt/AlphaComposite/WindowAlphaCompositeTest.java CheckCommonColors fails with this log ---------System.out:(3/175)---------- color = java.awt.Color[r=255,g=255,b=255], useRect = true color = java.awt.Color[r=255,g=255,b=255], useRect = false color = java.awt.Color[r=192,g=192,b=192], useRect = true ----------System.err:(17/897)---------- Expected: java.awt.Color[r=192,g=192,b=192] Actual: java.awt.Color[r=199,g=199,b=199] Point: java.awt.Point[x=960,y=600] Dump screen to: ScreenCapture.png ------------- PR: https://git.openjdk.java.net/jdk/pull/5864 From jdv at openjdk.java.net Wed Dec 1 07:58:28 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Wed, 1 Dec 2021 07:58:28 GMT Subject: RFR: 8272392 Lanai: SwingSet2. Black background on expanding tree node [v2] In-Reply-To: References: Message-ID: On Fri, 26 Nov 2021 09:02:37 GMT, Alexey Ushakov wrote: >> Removed creation of the separate encoder depending on destination properties as we don't use this info to customize the encoder properties > > Alexey Ushakov has updated the pull request incrementally with one additional commit since the last revision: > > 8272392 Lanai: SwingSet2. Black background on expanding tree node > > Fixed incorrect addition of the values into pipeline state cache. Refactored index initialization. Removed unused flags from MTLClip. I used test case present in https://bugs.openjdk.java.net/browse/JDK-8267963 to check how it behaves with this PR and noticed that it is causes regresssion related to how ruler text looks and also if we move Ruler between monitors it doesnt draw. Thought this may be because of state's not getting reset since there is mismatch in EncoderManager.reset() arguments. Updated code to add isText argument over this PR, but i continue to see the regressions. ------------- PR: https://git.openjdk.java.net/jdk/pull/6529 From jdv at openjdk.java.net Wed Dec 1 10:08:37 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Wed, 1 Dec 2021 10:08:37 GMT Subject: RFR: 8262297: ImageIO.write() method will throw IndexOutOfBoundsException [v5] In-Reply-To: References: Message-ID: On Wed, 24 Nov 2021 11:09:42 GMT, Masanori Yano wrote: >> Could you please review the 8262297 bug fixes? >> >> In this case, ImageIO.write() should throw java.io.IOException rather than java.lang.IndexOutOfBoundsException. IndexOutOfBoundsException is caught and wrapped in IIOException in ImageIO.write() with this fix. In addition, IndexOutOfBoundsException is not expected to throw by RandomAccessFile#write() according to its API specification. So it should be fixed. > > Masanori Yano has updated the pull request incrementally with one additional commit since the last revision: > > 8262297: ImageIO.write() method will throw IndexOutOfBoundsException This change has caused regression : https://bugs.openjdk.java.net/browse/JDK-8278047 So this change will be reverted for further analysis. ------------- PR: https://git.openjdk.java.net/jdk/pull/6151 From jdv at openjdk.java.net Wed Dec 1 10:14:49 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Wed, 1 Dec 2021 10:14:49 GMT Subject: RFR: 8278047: Few javax/imageio test regressed after JDK-8262297 fix Message-ID: Looks like we have 8 test cases where we are trying to write 15bpp BMP images and after JDK-8262297 all of them are failing. We need to update these test cases to not encode 15bpp BMP images or supporting 15bpp BMP images is valid use case. This needs more investigation. I am backing out changes done under JDK-8262297 for further analysis. ------------- Commit messages: - 8278047: Few javax/imageio test regressed after JDK-8262297 fix Changes: https://git.openjdk.java.net/jdk/pull/6631/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6631&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278047 Stats: 86 lines in 2 files changed: 0 ins; 84 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/6631.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6631/head:pull/6631 PR: https://git.openjdk.java.net/jdk/pull/6631 From tschatzl at openjdk.java.net Wed Dec 1 10:25:31 2021 From: tschatzl at openjdk.java.net (Thomas Schatzl) Date: Wed, 1 Dec 2021 10:25:31 GMT Subject: RFR: 8278047: Few javax/imageio test regressed after JDK-8262297 fix In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 10:07:30 GMT, Jayathirth D V wrote: > Looks like we have 8 test cases where we are trying to write 15bpp BMP images and after JDK-8262297 all of them are failing. > We need to update these test cases to not encode 15bpp BMP images or supporting 15bpp BMP images is valid use case. This needs more investigation. I am backing out changes done under JDK-8262297 for further analysis. Lgtm, is a clean backout. It would be nice to link the old changes directly for easier comparison in the PR text next time. ------------- Marked as reviewed by tschatzl (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/6631 From jdv at openjdk.java.net Wed Dec 1 10:25:31 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Wed, 1 Dec 2021 10:25:31 GMT Subject: RFR: 8278047: Few javax/imageio test regressed after JDK-8262297 fix In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 10:19:24 GMT, Thomas Schatzl wrote: > Lgtm, is a clean backout. It would be nice to link the old changes directly for easier comparison in the PR text next time. Thanks Thomas. Sure will do. ------------- PR: https://git.openjdk.java.net/jdk/pull/6631 From jdv at openjdk.java.net Wed Dec 1 10:25:31 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Wed, 1 Dec 2021 10:25:31 GMT Subject: Integrated: 8278047: Few javax/imageio test regressed after JDK-8262297 fix In-Reply-To: References: Message-ID: <8khf9PfDbdEvM0CPb5RJn0P-uijRj-SSKeyiZBnVCJE=.66b503a7-d91d-4d31-a6d0-dd72f96b2ad9@github.com> On Wed, 1 Dec 2021 10:07:30 GMT, Jayathirth D V wrote: > Looks like we have 8 test cases where we are trying to write 15bpp BMP images and after JDK-8262297 all of them are failing. > We need to update these test cases to not encode 15bpp BMP images or supporting 15bpp BMP images is valid use case. This needs more investigation. I am backing out changes done under JDK-8262297 for further analysis. This pull request has now been integrated. Changeset: 84aa0a19 Author: Jayathirth D V URL: https://git.openjdk.java.net/jdk/commit/84aa0a191b085a3d7cb338fd5e67281d0e4b57be Stats: 86 lines in 2 files changed: 0 ins; 84 del; 2 mod 8278047: Few javax/imageio test regressed after JDK-8262297 fix Reviewed-by: tschatzl ------------- PR: https://git.openjdk.java.net/jdk/pull/6631 From dbatrak at openjdk.java.net Wed Dec 1 10:58:40 2021 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Wed, 1 Dec 2021 10:58:40 GMT Subject: RFR: 8278050: Armenian text isn't rendered on macOS if text layout is performed Message-ID: The problem is related to the implementation of font fallback on macOS, specifically to the path used when text layout is performed, i.e. the one using `FontSubstitution` and cascade lists. `CTFontCopyDefaultCascadeListForLanguages`'s output contains an entry for the font, able to render Armenian text ('NotoSansArmenian-Regular'), but `CFont.createCompositeFont` cannot find this font amongst registered fonts, and the entry is skipped, resulting in broken rendering. System font loading (performed by `CFontManager.loadNativeFonts`) relies on `[NSFontManager availableFontFamilies]`, but its output doesn't contain 'Noto Sans Armenian' (which is a family for 'NotoSansArmenian-Regular' font). 'Noto Sans Armenian' is recognized by `[NSFontManager availableMembersOfFontFamily:]` though, 'NotoSansArmenian-Regular' is contained in `[NSFontManager availableFonts]` output, and the font can be created and used normally, just like any other system font. Not sure why its family is 'hidden', maybe macOS developers wanted to limit the number of options displayed in font selection drop-downs. For reference, another cascade list item, ignored in similar way is 'NotoSansZawgyi-Regular'. Proposed fix is to create `CFont` objects for cascade list items explicitly, if corresponding fonts are not registered. These objects are re-used between different fonts as their fallback components (to enable caching of char-to-glyph mapping), but are not made available to public font APIs. I've considered an alternative solution - using `[NSFontManager availableFonts]` instead of `[NSFontManager availableFontFamilies]` to load system fonts. Two factors complicate it though - `loadNativeFonts` will take more time (on my machine about 170 additional fonts will be loaded) and the order of font loading will change (which impacts the selection of 'preferred' plain/bold/italic/bolditalic components in `FontFamily` class). Both factors can be dealt with, but they make the solution more complicated and prone to regressions. For now, it seems not worth it. I've not created a test, as it would rely on macOS providing a fallback font for Armenian script, which is not guaranteed. Existing tests pass fine with the fix. ------------- Commit messages: - ensure all fallback components are used Changes: https://git.openjdk.java.net/jdk/pull/6633/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6633&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278050 Stats: 18 lines in 2 files changed: 16 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/6633.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6633/head:pull/6633 PR: https://git.openjdk.java.net/jdk/pull/6633 From asemenov at openjdk.java.net Wed Dec 1 12:25:56 2021 From: asemenov at openjdk.java.net (Artem Semenov) Date: Wed, 1 Dec 2021 12:25:56 GMT Subject: RFR: 8277497 Last column cell in the JTAble row is read as empty cell [v5] In-Reply-To: <4U4YMD6EbbtbUdEXp7fLovboOhmYXUmug-7I-2EIwDU=.b46b4469-d651-4799-a2cf-120383139cb6@github.com> References: <4U4YMD6EbbtbUdEXp7fLovboOhmYXUmug-7I-2EIwDU=.b46b4469-d651-4799-a2cf-120383139cb6@github.com> Message-ID: > Testing https://bugs.openjdk.java.net/browse/JDK-8271071 > Step to reproduce > 1) Run SwingSet2 in JDK 18 ( I used b24 ) > 2) Enable Voiceover. > 3) Select JTable demo > 4) Click any row in the table or select the first row . Observe that row is selected & VoiceOver reads the column values or navigate the columns one by one by pressing tab key. When the focus reaches the last column ( Favourite Food ) Observe that column value is read as null. If you hear the same then the bug is reproduced. Artem Semenov 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: 8277497: Last column cell in the JTAble row is read as empty cell ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6538/files - new: https://git.openjdk.java.net/jdk/pull/6538/files/2199bd53..22dfb014 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6538&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6538&range=03-04 Stats: 22 lines in 1 file changed: 21 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/6538.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6538/head:pull/6538 PR: https://git.openjdk.java.net/jdk/pull/6538 From asemenov at openjdk.java.net Wed Dec 1 12:29:27 2021 From: asemenov at openjdk.java.net (Artem Semenov) Date: Wed, 1 Dec 2021 12:29:27 GMT Subject: RFR: 8277497 Last column cell in the JTAble row is read as empty cell [v3] In-Reply-To: References: <4U4YMD6EbbtbUdEXp7fLovboOhmYXUmug-7I-2EIwDU=.b46b4469-d651-4799-a2cf-120383139cb6@github.com> Message-ID: <96BzzDB31C1RtKlS5NjrVRyA8lRvR5k3ugBbPu2XYYg=.05fdca6d-ec05-4a9f-9228-88977d89ffa0@github.com> On Fri, 26 Nov 2021 01:54:47 GMT, Sergey Bylokhov wrote: >> Done. thank you very much. > > I few questions to thinking about: > - If the label and icon is not accessible then should we say something? Or we should ignore it like we do for any other non-accessible components? > - Why the image text is used, don't we need to use the "javax.accessibility.AccessibleRole#ICON" role for such label/icon and allow the reader to say something standard for the icon. Does the voiceover has some default text for the icon/image when the alt text is not set? Thank you very much. We've made a change. A comparison of the behavior before and after the changes is below. ### On MAcOS. #### State before our changes .: - in a standalone label with an icon without text, VO says Image; - in a standalone label with an icon with text VO speaks the text of the label; - If a label without text with an icon is in the table VO says "Empty cell". #### If you add just a role change: - in a standalone label with an icon without text, VO says Image; - in a standalone label with an icon with text VO speaks the text of the label; - In the table for a label with an icon without text, when navigating horizontally, VO does not say anything; - In the table for a label with an icon without text for vertical navigation, VO says "image cell". Unacceptable option. #### With a complete fix: - in a standalone label with an icon without text, VO says Image; - in a standalone label with an icon with text VO speaks the text of the label; - In the table for a label with an icon without text, for any navigation, VO says "image". ### ON Windows. #### State before our changes: - in a standalone label with an icon and text, the label text is spoken; - in a standalone label with an icon without text, the label is skipped; - In the table, a label with an icon without text is not spoken, the column heading is spoken. #### With full patch: - in a standalone label with an icon and text, the label text is spoken; - in a standalone label with an icon without text the "Image icon" is spoken; - In the table, a label with an icon without text is pronounced as "Image". ------------- PR: https://git.openjdk.java.net/jdk/pull/6538 From cushon at openjdk.java.net Wed Dec 1 16:42:57 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Wed, 1 Dec 2021 16:42:57 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v2] In-Reply-To: References: Message-ID: > This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). Liam Miller-Cushon 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: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6603/files - new: https://git.openjdk.java.net/jdk/pull/6603/files/ad9665ff..8b68c150 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6603&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6603&range=00-01 Stats: 0 lines in 6 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/6603.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6603/head:pull/6603 PR: https://git.openjdk.java.net/jdk/pull/6603 From serb at openjdk.java.net Wed Dec 1 16:50:23 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 1 Dec 2021 16:50:23 GMT Subject: RFR: 8274939: Incorrect size of the pixel storage is used by the robot on macOS In-Reply-To: References: Message-ID: <3hifIGaT4Skr3LNoFLelBjwk-Klkf1Sj2xl2K9KHPoQ=.791262e7-e7ae-4672-ae6c-158a44908582@github.com> On Wed, 1 Dec 2021 07:34:07 GMT, Prasanta Sadhukhan wrote: > It seems CheckCommonColors still fails intermittently even with this fix in macos aarch64 along with others open/test/jdk/java/awt/Robot/HiDPIScreenCapture/ScreenCaptureTest.java, open/test/jdk/java/awt/ColorClass/AlphaColorTest.java, open/test/jdk/java/awt/AlphaComposite/WindowAlphaCompositeTest.java They could fail because of cursor location, or some other bug in our code or in the macOS. It will be good to debug it on that system where it fail. ------------- PR: https://git.openjdk.java.net/jdk/pull/5864 From prr at openjdk.java.net Wed Dec 1 17:37:28 2021 From: prr at openjdk.java.net (Phil Race) Date: Wed, 1 Dec 2021 17:37:28 GMT Subject: RFR: 8278050: Armenian text isn't rendered on macOS if text layout is performed In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 10:52:38 GMT, Dmitry Batrak wrote: > The problem is related to the implementation of font fallback on macOS, specifically to the path used when text layout > is performed, i.e. the one using `FontSubstitution` and cascade lists. `CTFontCopyDefaultCascadeListForLanguages`'s output contains an entry for the font, able to render Armenian text ('NotoSansArmenian-Regular'), but `CFont.createCompositeFont` cannot find this font amongst registered fonts, and the entry is skipped, resulting in broken rendering. > System font loading (performed by `CFontManager.loadNativeFonts`) relies on `[NSFontManager availableFontFamilies]`, but its output doesn't contain 'Noto Sans Armenian' (which is a family for 'NotoSansArmenian-Regular' font). 'Noto Sans Armenian' is recognized by `[NSFontManager availableMembersOfFontFamily:]` though, 'NotoSansArmenian-Regular' is contained in `[NSFontManager availableFonts]` output, and the font can be created and used normally, just like any other system font. Not sure why its family is 'hidden', maybe macOS developers wanted to limit the number of options > displayed in font selection drop-downs. > For reference, another cascade list item, ignored in similar way is 'NotoSansZawgyi-Regular'. > > Proposed fix is to create `CFont` objects for cascade list items explicitly, if corresponding fonts are not registered. These objects are re-used between different fonts as their fallback components (to enable caching of char-to-glyph mapping), but are not made available to public font APIs. > I've considered an alternative solution - using `[NSFontManager availableFonts]` instead of > `[NSFontManager availableFontFamilies]` to load system fonts. Two factors complicate it though - `loadNativeFonts` will > take more time (on my machine about 170 additional fonts will be loaded) and the order of font loading will change (which > impacts the selection of 'preferred' plain/bold/italic/bolditalic components in `FontFamily` class). Both factors can be > dealt with, but they make the solution more complicated and prone to regressions. For now, it seems not worth it. > > I've not created a test, as it would rely on macOS providing a fallback font for Armenian script, which is not guaranteed. > Existing tests pass fine with the fix. Looks reasonable. FWIW the rendering being present in the non-layout case is likely due to the magic JRS fall back code .. some day we need to unify this so that at least we are consistent. ------------- Marked as reviewed by prr (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/6633 From cushon at openjdk.java.net Wed Dec 1 18:12:51 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Wed, 1 Dec 2021 18:12:51 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v3] In-Reply-To: References: Message-ID: > This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). Liam Miller-Cushon 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: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6603/files - new: https://git.openjdk.java.net/jdk/pull/6603/files/8b68c150..6c858cd8 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6603&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6603&range=01-02 Stats: 4 lines in 7 files changed: 4 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/6603.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6603/head:pull/6603 PR: https://git.openjdk.java.net/jdk/pull/6603 From cushon at openjdk.java.net Wed Dec 1 18:18:27 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Wed, 1 Dec 2021 18:18:27 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 04:41:39 GMT, Sergey Bylokhov wrote: >> I couldn't find the review either. >> >> I regenerated it by following the instructions to compile and run the test class as a standalone tool on `x86_64 GNU/Linux`, which updated all of the existing files. I verified it fixes the test on that platform, I don't have a great way to test it on the other platforms right now. >> >> * https://github.com/openjdk/jdk/blob/5a4a9bb9d55134deac0e02cf37f31d1dd2223024/test/jdk/java/awt/dnd/BadSerializationTest/BadSerializationTest.java#L64-L65 >> >> * https://github.com/openjdk/jdk/blob/5a4a9bb9d55134deac0e02cf37f31d1dd2223024/test/jdk/java/awt/dnd/BadSerializationTest/BadSerializationTest.java#L95-L96 >> >> I started investigating this when I thought it was related to [JDK-8271623](https://bugs.openjdk.java.net/browse/JDK-8271623), if anyone wants to take this over (especially now that it's problem-listed) please feel free :) > >> I regenerated it by following the instructions to compile and run the test class as a standalone tool on `x86_64 GNU/Linux`, which updated all of the existing files. I verified it fixes the test on that platform, I don't have a great way to test it on the other platforms right now. > > As far as I remember the previous fix regenerated the binary files only, for a specific reason - before that a couple of commits fixed a memory leak which prevents the Aqua L&F deletes all its delegates during cleanup step. This cleanup step is executed in two cases, when we serialize the component or when we switch one L&F to another. > > Since the fix for JDK-8276665 exposed another bug you will need: > 1. Regenerate the data on macOS > 2. If the test will fail while use the new regenerated data, then you will need to fix the Aqua to properly delete the references to the Aqua specific objects. Thanks @mrserb! I regenerated the binary files on macOS, and that caused the test to fail on linux. I don't have a lot of context here, but as far as I can tell `BasicPanelUI` was installing (but not uninstalling) a reference to the color `Panel.background`, which for Aqua is an instance of `com.apple.laf.AquaImageFactory$SystemColorProxy`. * https://github.com/openjdk/jdk/blob/a363b7b9217cbb9a7580a87b812da8d5a4215326/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPanelUI.java#L81-L83 * https://github.com/openjdk/jdk/blob/4efcd2006f00a6347987ecdacd6e09d59a0006f4/src/java.desktop/macosx/classes/com/apple/laf/AquaLookAndFeel.java#L391-L392 * https://github.com/openjdk/jdk/blob/4efcd2006f00a6347987ecdacd6e09d59a0006f4/src/java.desktop/macosx/classes/com/apple/laf/AquaImageFactory.java#L469-L471 I included a fix to `BasicPanelUI`, but the test now fails with a different issue: Caused by: java.lang.ClassNotFoundException: com.apple.laf.AquaFonts$DerivedUIResourceFont at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From bchristi at openjdk.java.net Wed Dec 1 18:21:04 2021 From: bchristi at openjdk.java.net (Brent Christian) Date: Wed, 1 Dec 2021 18:21:04 GMT Subject: RFR: JDK-8276447 Deprecate finalization-related methods for removal [v2] In-Reply-To: References: Message-ID: > Here are the code changes for the "Deprecate finalizers in the standard Java API" portion of JEP 421 ("Deprecate Finalization for Removal") for code review. > > This change makes the indicated deprecations, and updates the API spec for JEP 421. It also updates the relevant @SuppressWarning annotations. > > The CSR has been approved. > An automated test build+test run passes cleanly (FWIW :D ). Brent Christian has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 32 commits: - Merge branch 'master' into 8276447 - merge - @SuppressWarnings(removal) in Windows CKey.java - Add jls tag to runFinalization methods - Update wording of Object.finalize, new paragraph is now bold - update Object.finalize javadoc - update Object.finalize JavaDoc and @deprecated tag - Update Object.finalize deprecation message - Indicate that runFinalizers does nothing if finalization is disabled or removed - Fix @since on @Deprecated for java.lang.Enum - ... and 22 more: https://git.openjdk.java.net/jdk/compare/a363b7b9...e4986a48 ------------- Changes: https://git.openjdk.java.net/jdk/pull/6465/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6465&range=01 Stats: 194 lines in 62 files changed: 54 ins; 38 del; 102 mod Patch: https://git.openjdk.java.net/jdk/pull/6465.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6465/head:pull/6465 PR: https://git.openjdk.java.net/jdk/pull/6465 From cushon at openjdk.java.net Wed Dec 1 18:34:56 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Wed, 1 Dec 2021 18:34:56 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v4] In-Reply-To: References: Message-ID: > This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). Liam Miller-Cushon 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 one additional commit since the last revision: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6603/files - new: https://git.openjdk.java.net/jdk/pull/6603/files/6c858cd8..4166dfd0 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6603&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6603&range=02-03 Stats: 3103 lines in 138 files changed: 1948 ins; 675 del; 480 mod Patch: https://git.openjdk.java.net/jdk/pull/6603.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6603/head:pull/6603 PR: https://git.openjdk.java.net/jdk/pull/6603 From prr at openjdk.java.net Wed Dec 1 18:34:57 2021 From: prr at openjdk.java.net (Phil Race) Date: Wed, 1 Dec 2021 18:34:57 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 04:27:03 GMT, Sergey Bylokhov wrote: > As of the usefulness of the serializations tests in Swing - it is a good coverage of the cleaning code in the L&fs. Each L&F should clean all its data when the app switch one LF to another, but if old L&F forget to cleanup then the app will get a memory leak. This test doesn't switch L&Fs .. if it wasn't for mac defaulting to Aqua they'd all be using Metal. So this is an accidental by-product, not the goal of the test. And that goal be met by the test writing out the serialized objects and reading them back all at "test time", can't it ? Seems to me right now we are stumbling over cases where what is serialized is inappropriate for persistent serialization. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From cushon at openjdk.java.net Wed Dec 1 18:35:03 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Wed, 1 Dec 2021 18:35:03 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v3] In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 18:12:51 GMT, Liam Miller-Cushon wrote: >> This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). > > Liam Miller-Cushon 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. Ok the other issue was another instance of the same problem with `BasicPanelUI`. I now have the test passing on both linux and mac, after regenerating the binary files on mac. I'm still not sure if this is the best approach, does this fix belong in `BasicPanelUI`? You mentioned fixing 'Aqua to properly delete the references to the Aqua specific objects', does it make sense to handle this in aqua specific code instead? ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From bchristi at openjdk.java.net Wed Dec 1 19:23:59 2021 From: bchristi at openjdk.java.net (Brent Christian) Date: Wed, 1 Dec 2021 19:23:59 GMT Subject: RFR: JDK-8276447 Deprecate finalization-related methods for removal [v3] In-Reply-To: References: Message-ID: > Here are the code changes for the "Deprecate finalizers in the standard Java API" portion of JEP 421 ("Deprecate Finalization for Removal") for code review. > > This change makes the indicated deprecations, and updates the API spec for JEP 421. It also updates the relevant @SuppressWarning annotations. > > The CSR has been approved. > An automated test build+test run passes cleanly (FWIW :D ). Brent Christian has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 33 commits: - Merge branch 'master' into 8276447 - Merge branch 'master' into 8276447 - merge - @SuppressWarnings(removal) in Windows CKey.java - Add jls tag to runFinalization methods - Update wording of Object.finalize, new paragraph is now bold - update Object.finalize javadoc - update Object.finalize JavaDoc and @deprecated tag - Update Object.finalize deprecation message - Indicate that runFinalizers does nothing if finalization is disabled or removed - ... and 23 more: https://git.openjdk.java.net/jdk/compare/0dfb3a70...8cde0674 ------------- Changes: https://git.openjdk.java.net/jdk/pull/6465/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6465&range=02 Stats: 194 lines in 62 files changed: 54 ins; 38 del; 102 mod Patch: https://git.openjdk.java.net/jdk/pull/6465.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6465/head:pull/6465 PR: https://git.openjdk.java.net/jdk/pull/6465 From serb at openjdk.java.net Wed Dec 1 22:18:28 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 1 Dec 2021 22:18:28 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v3] In-Reply-To: References: Message-ID: <_vz3JjOjXjatc2N63LFHgHSzMz2e8i26nbjEQ6FAVyo=.abef7fb9-34fa-49b7-86d1-b3f4a5fb21b2@github.com> On Wed, 1 Dec 2021 18:28:43 GMT, Liam Miller-Cushon wrote: > Ok the other issue was another instance of the same problem with `BasicPanelUI`. > > I now have the test passing on both linux and mac, after regenerating the binary files on mac. > I'm still not sure if this is the best approach, does this fix belong in `BasicPanelUI`? You mentioned fixing 'Aqua to properly delete the references to the Aqua specific objects', does it make sense to handle this in aqua specific code instead? Usually the delegate which install some properties/listeners/etc is responsible for cleanup. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From serb at openjdk.java.net Wed Dec 1 22:18:28 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 1 Dec 2021 22:18:28 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 18:28:13 GMT, Phil Race wrote: > This test doesn't switch L&Fs .. if it wasn't for mac defaulting to Aqua they'd all be using Metal. It does not change the L&F but it will trigger the same cleanup step. > So this is an accidental by-product, not the goal of the test. yes we found one additional product bug. > And that goal be met by the test writing out the serialized objects and reading them back all at "test time", can't it ? No it cannot write and read it back in during test execution, the binary files should be created on the "patched" version of JDK. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From serb at openjdk.java.net Wed Dec 1 22:45:24 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 1 Dec 2021 22:45:24 GMT Subject: RFR: 8277497 Last column cell in the JTAble row is read as empty cell [v5] In-Reply-To: References: <4U4YMD6EbbtbUdEXp7fLovboOhmYXUmug-7I-2EIwDU=.b46b4469-d651-4799-a2cf-120383139cb6@github.com> Message-ID: On Wed, 1 Dec 2021 12:25:56 GMT, Artem Semenov wrote: >> Testing https://bugs.openjdk.java.net/browse/JDK-8271071 >> Step to reproduce >> 1) Run SwingSet2 in JDK 18 ( I used b24 ) >> 2) Enable Voiceover. >> 3) Select JTable demo >> 4) Click any row in the table or select the first row . Observe that row is selected & VoiceOver reads the column values or navigate the columns one by one by pressing tab key. When the focus reaches the last column ( Favourite Food ) Observe that column value is read as null. If you hear the same then the bug is reproduced. > > Artem Semenov 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. src/java.desktop/share/classes/javax/swing/JLabel.java line 1110: > 1108: } > 1109: } > 1110: if ((name == null) || name.isEmpty()) { I continue our discussion from code line above. Why for the empty label and non-accessible image we should say "image", and not for example the "empty label" or just ignore it? I mean that if the icon used by the label does not have an "accessible" icon, or any other accessible component why we will try to mention it to the user? If non-accessible component should not be mentioned to user then you do not need to add a new code here, we already have the "getAccessibleIcon" method which can be called for example from the "CAccessibility" every time we request name/description/text and it empty while the icon is not null and accessible - this will cover all accesible components not only JLabel. BTW it could be a SwingSet/App bug that the provided image does not have a description (similar to the common bug in html when the image tag does not have an alt). ------------- PR: https://git.openjdk.java.net/jdk/pull/6538 From cushon at openjdk.java.net Wed Dec 1 22:56:28 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Wed, 1 Dec 2021 22:56:28 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v3] In-Reply-To: <_vz3JjOjXjatc2N63LFHgHSzMz2e8i26nbjEQ6FAVyo=.abef7fb9-34fa-49b7-86d1-b3f4a5fb21b2@github.com> References: <_vz3JjOjXjatc2N63LFHgHSzMz2e8i26nbjEQ6FAVyo=.abef7fb9-34fa-49b7-86d1-b3f4a5fb21b2@github.com> Message-ID: On Wed, 1 Dec 2021 22:14:58 GMT, Sergey Bylokhov wrote: > Usually the delegate which install some properties/listeners/etc is responsible for cleanup. I'm not sure I understand, aren't these being installed in `BasicPanelUI`? https://github.com/openjdk/jdk/blob/4166dfd004d16769f8ea1d3441d3d19dedfd6867/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicPanelUI.java#L81-L85 Would it make sense to create a corresponding `LookAndFeel.installColorsAndFont` method that would be called from `BasicPanelUI. uninstallDefaults`? (Sorry for the naive questions here--as I mentioned I started investigating this when I thought it was related to JDK-8271623, and am not familiar with this code.) ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From serb at openjdk.java.net Thu Dec 2 00:03:31 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Dec 2021 00:03:31 GMT Subject: RFR: 8277497 Last column cell in the JTAble row is read as empty cell [v5] In-Reply-To: References: <4U4YMD6EbbtbUdEXp7fLovboOhmYXUmug-7I-2EIwDU=.b46b4469-d651-4799-a2cf-120383139cb6@github.com> Message-ID: On Wed, 1 Dec 2021 22:41:55 GMT, Sergey Bylokhov wrote: >> Artem Semenov 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: >> >> 8277497: Last column cell in the JTAble row is read as empty cell > > src/java.desktop/share/classes/javax/swing/JLabel.java line 1110: > >> 1108: } >> 1109: } >> 1110: if ((name == null) || name.isEmpty()) { > > I continue our discussion from code line above. > > Why for the empty label and non-accessible image we should say "image", and not for example the "empty label" or just ignore it? > > I mean that if the icon used by the label does not have an "accessible" icon, or any other accessible component why we will try to mention it to the user? > > If non-accessible component should not be mentioned to user then you do not need to add a new code here, we already have the "getAccessibleIcon" method which can be called for example from the "CAccessibility" every time we request name/description/text and it empty while the icon is not null and accessible - this will cover all accesible components not only JLabel. > > BTW it could be a SwingSet/App bug that the provided image does not have a description (similar to the common bug in html when the image tag does not have an alt). Looks like If the change will be done in the "CAccessibility" it will cover the custom components as well. ------------- PR: https://git.openjdk.java.net/jdk/pull/6538 From serb at openjdk.java.net Thu Dec 2 00:13:27 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Dec 2021 00:13:27 GMT Subject: RFR: 8266435: WBMPImageReader.read() should not truncate the input stream In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 06:12:29 GMT, Jayathirth D V wrote: >> test/jdk/javax/imageio/plugins/wbmp/WBMPStreamTruncateTest.java line 61: >> >>> 59: File imageFile = File. >>> 60: createTempFile("test", ".wbmp", new File(filePath)); >>> 61: imageFile.deleteOnExit(); >> >> In one another review I saw the deleteOnExit() usage, I remember that in case of full testrun via makefile, such files were not deleted, can you please confirm that it is work fine? probably that it was fixed already. Note that the full test run uses custom tmp folder inside the result dir. > > @mrserb I ran the test using "make test" and i dont see any .wbmp file after test run in results directory. > Also i verified that it doesn't leave any image in test directory of CI machines. Ok, thank you for confirmation. ------------- PR: https://git.openjdk.java.net/jdk/pull/6518 From serb at openjdk.java.net Thu Dec 2 00:29:27 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Dec 2021 00:29:27 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v3] In-Reply-To: References: <_vz3JjOjXjatc2N63LFHgHSzMz2e8i26nbjEQ6FAVyo=.abef7fb9-34fa-49b7-86d1-b3f4a5fb21b2@github.com> Message-ID: On Wed, 1 Dec 2021 22:53:47 GMT, Liam Miller-Cushon wrote: > I'm not sure I understand, aren't these being installed in `BasicPanelUI`? If it is installs in the BasicListUI only then yes the fix belongs to this class. These properties changing also in some other classes as well, but some other classes cleanup it properly for example see BasicListUI.uninstallDefaults(), but I am not sure that all of them do this. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From serb at openjdk.java.net Thu Dec 2 00:53:27 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 2 Dec 2021 00:53:27 GMT Subject: RFR: JDK-8276809: java/awt/font/JNICheck/FreeTypeScalerJNICheck.java shows JNI warning on Windows [v3] In-Reply-To: References: <88pzPWHZU5dZbSXBuIwFqKeQPEiYxOrlZAU-xqGGVMg=.126a0ae6-4382-4986-89d0-250cc2c71081@github.com> Message-ID: On Fri, 26 Nov 2021 11:50:41 GMT, Matthias Baesken wrote: > The error occurs when starting the tests from the Windows Task scheduler; however when running from the task scheduler the error occurs with the fastdebug-JVM not when running the opt/product JVM. Probably in that case we try to log something and that logging include jni upcall? ------------- PR: https://git.openjdk.java.net/jdk/pull/6306 From smarks at openjdk.java.net Thu Dec 2 01:26:30 2021 From: smarks at openjdk.java.net (Stuart Marks) Date: Thu, 2 Dec 2021 01:26:30 GMT Subject: RFR: JDK-8276447 Deprecate finalization-related methods for removal [v3] In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 19:23:59 GMT, Brent Christian wrote: >> Here are the code changes for the "Deprecate finalizers in the standard Java API" portion of JEP 421 ("Deprecate Finalization for Removal") for code review. >> >> This change makes the indicated deprecations, and updates the API spec for JEP 421. It also updates the relevant @SuppressWarning annotations. >> >> The CSR has been approved. >> An automated test build+test run passes cleanly (FWIW :D ). > > Brent Christian has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 33 commits: > > - Merge branch 'master' into 8276447 > - Merge branch 'master' into 8276447 > - merge > - @SuppressWarnings(removal) in Windows CKey.java > - Add jls tag to runFinalization methods > - Update wording of Object.finalize, new paragraph is now bold > - update Object.finalize javadoc > - update Object.finalize JavaDoc and @deprecated tag > - Update Object.finalize deprecation message > - Indicate that runFinalizers does nothing if finalization is disabled or removed > - ... and 23 more: https://git.openjdk.java.net/jdk/compare/0dfb3a70...8cde0674 Marked as reviewed by smarks (Reviewer). src/jdk.jconsole/share/classes/sun/tools/jconsole/SummaryTab.java line 116: > 114: StringBuilder buf; > 115: > 116: @SuppressWarnings("deprecation") Item for future cleanup: refactor the call to `getObjectPendingFinalizationCount()` at line 219 (!) into a local variable declaration, and then move the warnings suppression to that declaration. This reduces the scope of warnings suppression. ------------- PR: https://git.openjdk.java.net/jdk/pull/6465 From jdv at openjdk.java.net Thu Dec 2 05:04:31 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Thu, 2 Dec 2021 05:04:31 GMT Subject: Integrated: 8266435: WBMPImageReader.read() should not truncate the input stream In-Reply-To: References: Message-ID: On Tue, 23 Nov 2021 11:05:27 GMT, Jayathirth D V wrote: > If we use a custom stream and specify limit on stream.read() length, WBMPImageReader.read() doesnt verify whether we are decoded complete data or not. We can check the length of data decoded and rerun the stream.read() or use readFully(). In case of other decoders like BMP we are using readFully(), so i have updated WBMPImageReader.read() to use readFully(). This pull request has now been integrated. Changeset: 8198807b Author: Jayathirth D V URL: https://git.openjdk.java.net/jdk/commit/8198807b4a811040c7d9f65fb98494fc7d840814 Stats: 122 lines in 2 files changed: 118 ins; 0 del; 4 mod 8266435: WBMPImageReader.read() should not truncate the input stream Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/6518 From jdv at openjdk.java.net Thu Dec 2 05:42:27 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Thu, 2 Dec 2021 05:42:27 GMT Subject: RFR: 8272392 Lanai: SwingSet2. Black background on expanding tree node [v2] In-Reply-To: References: Message-ID: <4YShRQ35kVnGeZrS_HwO6ki-M2WZOYifQgL6kyECNPk=.f27fc2c0-8647-43b6-bbe0-5c7530636c18@github.com> On Fri, 26 Nov 2021 09:02:37 GMT, Alexey Ushakov wrote: >> Removed creation of the separate encoder depending on destination properties as we don't use this info to customize the encoder properties > > Alexey Ushakov has updated the pull request incrementally with one additional commit since the last revision: > > 8272392 Lanai: SwingSet2. Black background on expanding tree node > > Fixed incorrect addition of the values into pipeline state cache. Refactored index initialization. Removed unused flags from MTLClip. jtreg & JCK tests are not showing any major failures in our CI with this patch. ------------- PR: https://git.openjdk.java.net/jdk/pull/6529 From cushon at openjdk.java.net Thu Dec 2 06:27:01 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Thu, 2 Dec 2021 06:27:01 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v5] In-Reply-To: References: Message-ID: > This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision: Add uninstallColorsAndFont ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6603/files - new: https://git.openjdk.java.net/jdk/pull/6603/files/4166dfd0..de2e597e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6603&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6603&range=03-04 Stats: 70 lines in 21 files changed: 57 ins; 10 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/6603.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6603/head:pull/6603 PR: https://git.openjdk.java.net/jdk/pull/6603 From cushon at openjdk.java.net Thu Dec 2 06:27:02 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Thu, 2 Dec 2021 06:27:02 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v3] In-Reply-To: References: <_vz3JjOjXjatc2N63LFHgHSzMz2e8i26nbjEQ6FAVyo=.abef7fb9-34fa-49b7-86d1-b3f4a5fb21b2@github.com> Message-ID: On Thu, 2 Dec 2021 00:26:16 GMT, Sergey Bylokhov wrote: > These properties changing also in some other classes as well, but some other classes cleanup it properly for example see BasicListUI.uninstallDefaults(), but I am not sure that all of them do this. I looked through other uses of `installColorsAndFont`, and most of them don't seem to be uninstalling the properties. I updated the ones I found, and added a `uninstallColorsAndFont` method to avoid copying the logic around. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From psadhukhan at openjdk.java.net Thu Dec 2 08:19:41 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 2 Dec 2021 08:19:41 GMT Subject: RFR: 8172065: javax/swing/JTree/4908142/bug4908142.java The selected index should be aad Message-ID: <1bFLgdrkpH1rWjwpQS16m87kA1E4Z35C2STeYWyDCrA=.73d51aaf-ad43-4470-a1aa-aa8d026ce7d8@github.com> Test is failing in macosx-12 in aarch64 system. Added stability fixes of delay after frame is visible, making frame to center of screen to make the test stable in macos12-aarch64 system too. Modified test passes in all CI platforms including osx-aarch64 system in osx11 and osx12. ------------- Commit messages: - 8172065: javax/swing/JTree/4908142/bug4908142.java The selected index should be aad Changes: https://git.openjdk.java.net/jdk/pull/6661/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6661&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8172065 Stats: 4 lines in 1 file changed: 2 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/6661.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6661/head:pull/6661 PR: https://git.openjdk.java.net/jdk/pull/6661 From psadhukhan at openjdk.java.net Thu Dec 2 08:37:36 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 2 Dec 2021 08:37:36 GMT Subject: RFR: 8278119: ProblemList few headful test failing in macosx12-aarch64 system Message-ID: Few tests are failing on macos12-aarch64 systems due to mismatch in color value obtained from robot.getPixelColor and expected color. More details on the failures can be seen in JDK-8277816. Till the root cause is investigated, it is better to problemlist it as it causing failures in CI run. ------------- Commit messages: - 8278119: ProblemList few headful test failing in macosx12-aarch64 system - 8278119: ProblemList few headful test failing in macosx12-aarch64 system Changes: https://git.openjdk.java.net/jdk/pull/6663/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6663&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278119 Stats: 10 lines in 1 file changed: 9 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/6663.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6663/head:pull/6663 PR: https://git.openjdk.java.net/jdk/pull/6663 From lbourges at openjdk.java.net Thu Dec 2 08:50:30 2021 From: lbourges at openjdk.java.net (Laurent =?UTF-8?B?Qm91cmfDqHM=?=) Date: Thu, 2 Dec 2021 08:50:30 GMT Subject: RFR: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box [v10] In-Reply-To: References: Message-ID: <3uufgOtPTZSkBTdD-OZNpoFkhB10u74Ir66bQ1-5uP4=.8acd2a40-bb4c-4fb3-8be2-fc0110f51171@github.com> On Fri, 19 Nov 2021 19:09:54 GMT, Jeremy wrote: >> This removes code that relied on consulting the Bezier control points to calculate the Rectangle2D bounding box. Instead it's pretty straight-forward to convert the Bezier control points into the x & y parametric equations. At their most complex these equations are cubic polynomials, so calculating their extrema is just a matter of applying the quadratic formula to calculate their extrema. (Or in path segments that are quadratic/linear/constant: we do even less work.) >> >> The bug writeup indicated they wanted Path2D#getBounds2D() to be more accurate/concise. They didn't explicitly say they wanted CubicCurve2D and QuadCurve2D to become more accurate too. But a preexisting unit test failed when Path2D#getBounds2D() was updated and those other classes weren't. At this point I considered either: >> A. Updating CubicCurve2D and QuadCurve2D to use the new more accurate getBounds2D() or >> B. Updating the unit test to forgive the discrepancy. >> >> I chose A. Which might technically be seen as scope creep, but it feels like a more holistic/better approach. >> >> Other shapes in java.awt.geom should not require updating, because they already identify concise bounds. >> >> This also includes a new unit test (in Path2D/UnitTest.java) that fails without the changes in this commit. > > Jeremy has updated the pull request incrementally with one additional commit since the last revision: > > 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box > > Addressing code review feedback: "Use BigDecomal.setScale(40) to ascertain precision." > > The geom.* unit tests passed before & after this change. > > https://github.com/openjdk/jdk/pull/6227#discussion_r752908494 @jddarcy could you have a look on FP Math precision ? ------------- PR: https://git.openjdk.java.net/jdk/pull/6227 From dbatrak at openjdk.java.net Thu Dec 2 09:43:24 2021 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Thu, 2 Dec 2021 09:43:24 GMT Subject: RFR: 8278050: Armenian text isn't rendered on macOS if text layout is performed In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 17:34:58 GMT, Phil Race wrote: > FWIW the rendering being present in the non-layout case is likely due to the magic JRS fall back code .. some day we need to unify this so that at least we are consistent. That's what I'm working on now - getting rid of `JRSFontCreateFallbackFontForCharacters` and replace it with cascade list approach. The plan is to have it tested with JetBrains Runtime first (both internally and with external users). If all goes well, I'll submit corresponding PR in several months, after our IDEs' next public release. ------------- PR: https://git.openjdk.java.net/jdk/pull/6633 From achung at openjdk.java.net Thu Dec 2 19:57:54 2021 From: achung at openjdk.java.net (Alisen Chung) Date: Thu, 2 Dec 2021 19:57:54 GMT Subject: RFR: 8190264: JScrollBar ignores its border when using macOS Mac OS X Aqua look and feel [v7] In-Reply-To: References: Message-ID: <29otHmFYbrgY0zuOeXw2NFz5V2Q0YZIKu18THN1yGPQ=.3ca8bf18-8c44-402c-a971-eece3da26c4c@github.com> > Adjusted the AquaLF scrollbar to account for border inset settings when dragging the thumb and clicking on the track. Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: removed robot mouse moves, use pixel colors to check ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6374/files - new: https://git.openjdk.java.net/jdk/pull/6374/files/02ae001c..52edbf4e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6374&range=06 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6374&range=05-06 Stats: 29 lines in 1 file changed: 6 ins; 20 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/6374.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6374/head:pull/6374 PR: https://git.openjdk.java.net/jdk/pull/6374 From achung at openjdk.java.net Thu Dec 2 20:22:16 2021 From: achung at openjdk.java.net (Alisen Chung) Date: Thu, 2 Dec 2021 20:22:16 GMT Subject: RFR: 8190264: JScrollBar ignores its border when using macOS Mac OS X Aqua look and feel [v4] In-Reply-To: References: Message-ID: On Wed, 24 Nov 2021 06:07:31 GMT, Sergey Bylokhov wrote: >> Just updated the automation. I added a robot to try to move the thumb into the red zone, then had the robot click again to see if the thumb is under the cursor. If the behavior is correct, the thumb should have stopped before entering the red zone and scrollbar mouseListener should only detect 1 click. Otherwise it will detect 2 clicks (thumb is under cursor) and test fails. Is my logic correct? > > But it is not necessary to use the robot at all? Can you try to set the scollbar thumb position/move it programmatically w/o a robot? If it is possible then it will be rendered on top of the red area -> it will be possible to render it to the buffered image and just check the pixel in the right position(is it red or not). Is using robot to get the pixel color alright? ------------- PR: https://git.openjdk.java.net/jdk/pull/6374 From duke at openjdk.java.net Thu Dec 2 21:02:40 2021 From: duke at openjdk.java.net (Tim Prinzing) Date: Thu, 2 Dec 2021 21:02:40 GMT Subject: RFR: JDK-8276681: Malformed Javadoc inline tags in JDK source jdk/internal/net/http/ResponseSubscribers.java Message-ID: JDK-8276681: Malformed Javadoc inline tags in JDK source jdk/internal/net/http/ResponseSubscribers.java ------------- Commit messages: - Merge branch 'master' into JDK-8276681 - Fix missing '@' in javadoc for JDK-8276681 Changes: https://git.openjdk.java.net/jdk/pull/6486/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6486&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8276681 Stats: 13 lines in 10 files changed: 0 ins; 0 del; 13 mod Patch: https://git.openjdk.java.net/jdk/pull/6486.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6486/head:pull/6486 PR: https://git.openjdk.java.net/jdk/pull/6486 From aivanov at openjdk.java.net Thu Dec 2 21:02:23 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 2 Dec 2021 21:02:23 GMT Subject: Integrated: JDK-8277396: [TESTBUG] In DefaultButtonModelCrashTest.java, frame is accessed from main thread In-Reply-To: References: Message-ID: On Thu, 18 Nov 2021 13:17:16 GMT, Alexey Ivanov wrote: > It's a little cleanup: make sure `frame` is accessed from EDT only, remove unused variables and imports. This pull request has now been integrated. Changeset: b310f301 Author: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/b310f301efd5390408fb56b62cc09eb9a1604413 Stats: 23 lines in 1 file changed: 9 ins; 8 del; 6 mod 8277396: [TESTBUG] In DefaultButtonModelCrashTest.java, frame is accessed from main thread Reviewed-by: serb, psadhukhan ------------- PR: https://git.openjdk.java.net/jdk/pull/6455 From lancea at openjdk.java.net Thu Dec 2 21:08:17 2021 From: lancea at openjdk.java.net (Lance Andersen) Date: Thu, 2 Dec 2021 21:08:17 GMT Subject: RFR: JDK-8276681: Malformed Javadoc inline tags in JDK source jdk/internal/net/http/ResponseSubscribers.java In-Reply-To: References: Message-ID: On Sat, 20 Nov 2021 04:09:51 GMT, Tim Prinzing wrote: > JDK-8276681: Malformed Javadoc inline tags in JDK source jdk/internal/net/http/ResponseSubscribers.java Marked as reviewed by lancea (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6486 From duke at openjdk.java.net Thu Dec 2 21:25:53 2021 From: duke at openjdk.java.net (Tim Prinzing) Date: Thu, 2 Dec 2021 21:25:53 GMT Subject: RFR: JDK-8276681: Additional malformed Javadoc inline tags in JDK source [v2] In-Reply-To: References: Message-ID: > JDK-8276681: Additional malformed Javadoc inline tags in JDK source Tim Prinzing 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 three additional commits since the last revision: - Merge branch 'master' into JDK-8276681 - Merge branch 'master' into JDK-8276681 - Fix missing '@' in javadoc for JDK-8276681 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6486/files - new: https://git.openjdk.java.net/jdk/pull/6486/files/e8071197..8eaf05bc Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6486&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6486&range=00-01 Stats: 29529 lines in 653 files changed: 17761 ins; 7341 del; 4427 mod Patch: https://git.openjdk.java.net/jdk/pull/6486.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6486/head:pull/6486 PR: https://git.openjdk.java.net/jdk/pull/6486 From duke at openjdk.java.net Thu Dec 2 21:25:54 2021 From: duke at openjdk.java.net (Tim Prinzing) Date: Thu, 2 Dec 2021 21:25:54 GMT Subject: Integrated: JDK-8276681: Additional malformed Javadoc inline tags in JDK source In-Reply-To: References: Message-ID: On Sat, 20 Nov 2021 04:09:51 GMT, Tim Prinzing wrote: > JDK-8276681: Additional malformed Javadoc inline tags in JDK source This pull request has now been integrated. Changeset: b8ac0d20 Author: Tim Prinzing Committer: Lance Andersen URL: https://git.openjdk.java.net/jdk/commit/b8ac0d20ceec26b3a1dd0b9577817fa6320ea9ef Stats: 11 lines in 9 files changed: 0 ins; 0 del; 11 mod 8276681: Additional malformed Javadoc inline tags in JDK source Reviewed-by: lancea ------------- PR: https://git.openjdk.java.net/jdk/pull/6486 From kizune at openjdk.java.net Thu Dec 2 22:05:00 2021 From: kizune at openjdk.java.net (Alexander Zuev) Date: Thu, 2 Dec 2021 22:05:00 GMT Subject: RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits [v3] In-Reply-To: References: Message-ID: > Made colorBits and maskBits arrays dynamic so they are allocated on heap instead of stack. > Added regression test. Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: Eliminate potential resource leak. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6473/files - new: https://git.openjdk.java.net/jdk/pull/6473/files/16d3eadc..c8d8ee23 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6473&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6473&range=01-02 Stats: 49 lines in 1 file changed: 16 ins; 3 del; 30 mod Patch: https://git.openjdk.java.net/jdk/pull/6473.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6473/head:pull/6473 PR: https://git.openjdk.java.net/jdk/pull/6473 From kizune at openjdk.java.net Thu Dec 2 22:05:05 2021 From: kizune at openjdk.java.net (Alexander Zuev) Date: Thu, 2 Dec 2021 22:05:05 GMT Subject: RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits [v2] In-Reply-To: References: Message-ID: <0rffkwaE4OTR6mh-HQ3dYMZa0eCv8BtCZxi3Xva63Jw=.240921f3-f3b9-4dbd-b9cf-7f7e4c076d08@github.com> On Mon, 22 Nov 2021 19:13:11 GMT, Alexey Ivanov wrote: >> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: >> >> Added bad_malloc handling >> Fixed insets >> Declaration and assignment are now joined > > src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp line 1097: > >> 1095: free(colorBits); >> 1096: >> 1097: CATCH_BAD_ALLOC_RET(NULL); > > I believe we leak `dc` as well as `iconInfo.hbmColor` and `iconInfo.hbmMask` if `std::bad_alloc` is thrown. Fixed. Now we will release these resources on exit in case of bad_alloc. ------------- PR: https://git.openjdk.java.net/jdk/pull/6473 From darcy at openjdk.java.net Fri Dec 3 01:25:33 2021 From: darcy at openjdk.java.net (Joe Darcy) Date: Fri, 3 Dec 2021 01:25:33 GMT Subject: RFR: JDK-8278175: Enable all doclint warnings for build of java.desktop Message-ID: In JDK 18, JDK-8189591 added the ability to suppress doclint warnings. Therefore, it is now possible to enable the full doclint checks for the java.desktop module if the instances of warnings are suppressed. This patch does this; it would be preferable to address the doc warnings directly, but that is beyond what I'm attempting to do here. ------------- Commit messages: - JDK-8278175: Enable all doclint warnings for build of java.desktop Changes: https://git.openjdk.java.net/jdk/pull/6687/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6687&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278175 Stats: 35 lines in 20 files changed: 16 ins; 0 del; 19 mod Patch: https://git.openjdk.java.net/jdk/pull/6687.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6687/head:pull/6687 PR: https://git.openjdk.java.net/jdk/pull/6687 From jjg at openjdk.java.net Fri Dec 3 01:41:15 2021 From: jjg at openjdk.java.net (Jonathan Gibbons) Date: Fri, 3 Dec 2021 01:41:15 GMT Subject: RFR: JDK-8278175: Enable all doclint warnings for build of java.desktop In-Reply-To: References: Message-ID: On Fri, 3 Dec 2021 01:18:20 GMT, Joe Darcy wrote: > In JDK 18, JDK-8189591 added the ability to suppress doclint warnings. Therefore, it is now possible to enable the full doclint checks for the java.desktop module if the instances of warnings are suppressed. This patch does this; it would be preferable to address the doc warnings directly, but that is beyond what I'm attempting to do here. Looks OK to me, although I don't consider myself a Reviewer for this code. ------------- PR: https://git.openjdk.java.net/jdk/pull/6687 From duke at openjdk.java.net Fri Dec 3 05:14:19 2021 From: duke at openjdk.java.net (duke) Date: Fri, 3 Dec 2021 05:14:19 GMT Subject: Withdrawn: 8274304: Update or Problem List tests which may fail with uiScale=2 on macOS In-Reply-To: References: Message-ID: <6aPAeqyJ3aFe-x8ykt9LrDUcKkBbjWqbj9YKkrN2tyE=.5b61da18-2a56-4f1b-a1ad-3d4c262b0f08@github.com> On Thu, 30 Sep 2021 04:43:19 GMT, Sergey Bylokhov wrote: > The fix for 8274296 added uiScale=1 to some of the tests to fix the problem of incorrect pixel color capture by the robot. > In both cases uiScale=1 or uiScale=2 the same call should be made to the macOS. But if uiScale=1 is set we just read one pixel on the screen, but if uiScale=2 is set we prepare the data in some clumsy way(at the end we should also read just one pixel). > > Since uiScale=1 affects the test case execution means that we probably have some bugs in the coordinate/size calculation of the area. Note that none of these tests have dependencies on the precise rendering, so it is quite a common use-case and may affect any external applications. > > This is a request to update the https://github.com/openjdk/jdk/pull/5687/files > and move all tests to the problem list. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/5766 From psadhukhan at openjdk.java.net Fri Dec 3 06:18:43 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 3 Dec 2021 06:18:43 GMT Subject: RFR: 8172065: javax/swing/JTree/4908142/bug4908142.java The selected index should be "aad" [v2] In-Reply-To: <1bFLgdrkpH1rWjwpQS16m87kA1E4Z35C2STeYWyDCrA=.73d51aaf-ad43-4470-a1aa-aa8d026ce7d8@github.com> References: <1bFLgdrkpH1rWjwpQS16m87kA1E4Z35C2STeYWyDCrA=.73d51aaf-ad43-4470-a1aa-aa8d026ce7d8@github.com> Message-ID: > Test is failing in macosx-12 in aarch64 system. Added stability fixes of delay after frame is visible, making frame to center of screen to make the test stable in macos12-aarch64 system too. > Modified test passes in all CI platforms including osx-aarch64 system in osx11 and osx12. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Add waitForIdle ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6661/files - new: https://git.openjdk.java.net/jdk/pull/6661/files/4f267d7f..6d561fa0 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6661&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6661&range=00-01 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/6661.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6661/head:pull/6661 PR: https://git.openjdk.java.net/jdk/pull/6661 From duke at openjdk.java.net Fri Dec 3 06:41:43 2021 From: duke at openjdk.java.net (ANUPAM DEV) Date: Fri, 3 Dec 2021 06:41:43 GMT Subject: RFR: 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList Message-ID: Updated sun.awt.util.IdentityArrayList and sun.awt.util.IdentityLinkedList ------------- Commit messages: - Javadoc incorrect for IdentityArrayList, IdentityLinkedList - Merge pull request #1 from anupamdev20/JDK-8255675 - 8255675: Typo in java.net.HttpURLConnection Changes: https://git.openjdk.java.net/jdk/pull/6691/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6691&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8247973 Stats: 19 lines in 3 files changed: 8 ins; 0 del; 11 mod Patch: https://git.openjdk.java.net/jdk/pull/6691.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6691/head:pull/6691 PR: https://git.openjdk.java.net/jdk/pull/6691 From duke at openjdk.java.net Fri Dec 3 06:55:23 2021 From: duke at openjdk.java.net (ANUPAM DEV) Date: Fri, 3 Dec 2021 06:55:23 GMT Subject: Withdrawn: 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList In-Reply-To: References: Message-ID: On Fri, 3 Dec 2021 06:33:45 GMT, ANUPAM DEV wrote: > The following methods were having improper improper as they mentioned 'equals()' while comparing two objects. The comments have been changed to reflect the comparison of two objects using == operator. > > sun.awt.util.IdentityLinkedList#contains > sun.awt.util.IdentityArrayList#contains > sun.awt.util.IdentityArrayList#indexOf > sun.awt.util.IdentityArrayList#lastIndexOf > sun.awt.util.IdentityArrayList#remove(java.lang.Object) > > Please review the changes. > Thanks! This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/6691 From duke at openjdk.java.net Fri Dec 3 07:41:31 2021 From: duke at openjdk.java.net (ANUPAM DEV) Date: Fri, 3 Dec 2021 07:41:31 GMT Subject: RFR: 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList Message-ID: The documentation for following methods used equals() for object equality: sun.awt.util.IdentityLinkedList#contains sun.awt.util.IdentityArrayList#contains sun.awt.util.IdentityArrayList#indexOf sun.awt.util.IdentityArrayList#lastIndexOf sun.awt.util.IdentityArrayList#remove(java.lang.Object) I have updated the comments to use "==" operator for object equality. Kindly review the changes for the same. ------------- Commit messages: - 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList - Merge pull request #1 from anupamdev20/JDK-8255675 - 8255675: Typo in java.net.HttpURLConnection Changes: https://git.openjdk.java.net/jdk/pull/6694/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6694&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8247973 Stats: 19 lines in 3 files changed: 8 ins; 0 del; 11 mod Patch: https://git.openjdk.java.net/jdk/pull/6694.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6694/head:pull/6694 PR: https://git.openjdk.java.net/jdk/pull/6694 From asemenov at openjdk.java.net Fri Dec 3 09:18:45 2021 From: asemenov at openjdk.java.net (Artem Semenov) Date: Fri, 3 Dec 2021 09:18:45 GMT Subject: RFR: 8277497 Last column cell in the JTAble row is read as empty cell [v6] In-Reply-To: <4U4YMD6EbbtbUdEXp7fLovboOhmYXUmug-7I-2EIwDU=.b46b4469-d651-4799-a2cf-120383139cb6@github.com> References: <4U4YMD6EbbtbUdEXp7fLovboOhmYXUmug-7I-2EIwDU=.b46b4469-d651-4799-a2cf-120383139cb6@github.com> Message-ID: > Testing https://bugs.openjdk.java.net/browse/JDK-8271071 > Step to reproduce > 1) Run SwingSet2 in JDK 18 ( I used b24 ) > 2) Enable Voiceover. > 3) Select JTable demo > 4) Click any row in the table or select the first row . Observe that row is selected & VoiceOver reads the column values or navigate the columns one by one by pressing tab key. When the focus reaches the last column ( Favourite Food ) Observe that column value is read as null. If you hear the same then the bug is reproduced. Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: 8277497: Last column cell in the JTAble row is read as empty cell ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6538/files - new: https://git.openjdk.java.net/jdk/pull/6538/files/22dfb014..f5f1ac19 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6538&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6538&range=04-05 Stats: 9 lines in 2 files changed: 0 ins; 9 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/6538.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6538/head:pull/6538 PR: https://git.openjdk.java.net/jdk/pull/6538 From asemenov at openjdk.java.net Fri Dec 3 09:27:11 2021 From: asemenov at openjdk.java.net (Artem Semenov) Date: Fri, 3 Dec 2021 09:27:11 GMT Subject: RFR: 8277497 Last column cell in the JTAble row is read as empty cell [v5] In-Reply-To: References: <4U4YMD6EbbtbUdEXp7fLovboOhmYXUmug-7I-2EIwDU=.b46b4469-d651-4799-a2cf-120383139cb6@github.com> Message-ID: On Thu, 2 Dec 2021 00:00:35 GMT, Sergey Bylokhov wrote: >> src/java.desktop/share/classes/javax/swing/JLabel.java line 1110: >> >>> 1108: } >>> 1109: } >>> 1110: if ((name == null) || name.isEmpty()) { >> >> I continue our discussion from code line above. >> >> Why for the empty label and non-accessible image we should say "image", and not for example the "empty label" or just ignore it? >> >> I mean that if the icon used by the label does not have an "accessible" icon, or any other accessible component why we will try to mention it to the user? >> >> If non-accessible component should not be mentioned to user then you do not need to add a new code here, we already have the "getAccessibleIcon" method which can be called for example from the "CAccessibility" every time we request name/description/text and it empty while the icon is not null and accessible - this will cover all accesible components not only JLabel. >> >> BTW it could be a SwingSet/App bug that the provided image does not have a description (similar to the common bug in html when the image tag does not have an alt). > > Looks like If the change will be done in the "CAccessibility" it will cover the custom components as well. Thank you. We?ve considered your suggestion and found it reasonable. Indeed, it should be enough here to propagate the icon?s accessible name when it exists. Also, we will change SwingSet2 so that those icons had accessible names. ------------- PR: https://git.openjdk.java.net/jdk/pull/6538 From myano at openjdk.java.net Fri Dec 3 10:26:21 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Fri, 3 Dec 2021 10:26:21 GMT Subject: RFR: 8275715: D3D pipeline processes multiple PaintEvent at initial drawing [v2] In-Reply-To: References: Message-ID: On Thu, 28 Oct 2021 08:27:44 GMT, Masanori Yano wrote: >> Could you please review the 8275715 bug fixes? >> >> I think D3DScreenUpdateManager posts unnecessary PaintEvent during processing PaintEvent. When the validate method is called from createGraphics, repaintPeerTarget should not be called. > > Masanori Yano has updated the pull request incrementally with one additional commit since the last revision: > > 8275715: D3D pipeline processes multiple PaintEvent at initial drawing @mrserb Could you please check this pull request? ------------- PR: https://git.openjdk.java.net/jdk/pull/6064 From duke at openjdk.java.net Fri Dec 3 13:08:21 2021 From: duke at openjdk.java.net (Andrey Turbanov) Date: Fri, 3 Dec 2021 13:08:21 GMT Subject: Integrated: 8274640: Cleanup unnecessary null comparison before instanceof check in java.desktop In-Reply-To: References: Message-ID: On Sat, 11 Sep 2021 14:59:21 GMT, Andrey Turbanov wrote: > Updated code checks both non-null and instance of a class in java.desktop module classes. > The checks and explicit casts could also be replaced with pattern matching for the instanceof operator. > Similar cleanups > 1. [JDK-8273484](https://bugs.openjdk.java.net/browse/JDK-8273484) java.naming > 2. [JDK-8258422](https://bugs.openjdk.java.net/browse/JDK-8258422) java.base This pull request has now been integrated. Changeset: 18c54b4e Author: Andrey Turbanov Committer: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/18c54b4e1ade2ea5531054ed19441d5bff84fcdc Stats: 526 lines in 122 files changed: 0 ins; 115 del; 411 mod 8274640: Cleanup unnecessary null comparison before instanceof check in java.desktop Reviewed-by: aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/5482 From erikj at openjdk.java.net Fri Dec 3 13:40:22 2021 From: erikj at openjdk.java.net (Erik Joelsson) Date: Fri, 3 Dec 2021 13:40:22 GMT Subject: RFR: JDK-8278175: Enable all doclint warnings for build of java.desktop In-Reply-To: References: Message-ID: <8e0538sQHtH4cYq5PU1oDgvcfFiUsvtB1gD3UACkFzc=.72d78b9e-5b18-4f05-8fe6-57acaccf9a99@github.com> On Fri, 3 Dec 2021 01:18:20 GMT, Joe Darcy wrote: > In JDK 18, JDK-8189591 added the ability to suppress doclint warnings. Therefore, it is now possible to enable the full doclint checks for the java.desktop module if the instances of warnings are suppressed. This patch does this; it would be preferable to address the doc warnings directly, but that is beyond what I'm attempting to do here. Build change looks good. ------------- Marked as reviewed by erikj (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/6687 From aivanov at openjdk.java.net Fri Dec 3 13:46:13 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 3 Dec 2021 13:46:13 GMT Subject: RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits [v3] In-Reply-To: References: Message-ID: On Thu, 2 Dec 2021 22:05:00 GMT, Alexander Zuev wrote: >> Made colorBits and maskBits arrays dynamic so they are allocated on heap instead of stack. >> Added regression test. > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Eliminate potential resource leak. Changes requested by aivanov (Reviewer). src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp line 1068: > 1066: } > 1067: > 1068: if (colorBits != NULL) { I think this way defeats the use of exception to handle allocation error. You could use: ```c++ long *colorBits = (long*)malloc(MAX_ICON_SIZE * MAX_ICON_SIZE * sizeof(long)); if (colorBits != NULL) { to achieve the same effect, which is shorter and clearer. src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp line 1102: > 1100: } > 1101: // Release DC > 1102: ReleaseDC(NULL, dc); The DC has to be released even if `colorBits` allocation failed, so this needs to be after `if (colorBits != NULL)`. ------------- PR: https://git.openjdk.java.net/jdk/pull/6473 From avu at openjdk.java.net Fri Dec 3 15:25:51 2021 From: avu at openjdk.java.net (Alexey Ushakov) Date: Fri, 3 Dec 2021 15:25:51 GMT Subject: RFR: 8272392 Lanai: SwingSet2. Black background on expanding tree node [v3] In-Reply-To: References: Message-ID: > Removed creation of the separate encoder depending on destination properties as we don't use this info to customize the encoder properties Alexey Ushakov has updated the pull request incrementally with one additional commit since the last revision: 8272392 Lanai: SwingSet2. Black background on expanding tree node Corrected prototype of the reset method ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6529/files - new: https://git.openjdk.java.net/jdk/pull/6529/files/89138dfa..94c39ae6 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6529&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6529&range=01-02 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/6529.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6529/head:pull/6529 PR: https://git.openjdk.java.net/jdk/pull/6529 From avu at openjdk.java.net Fri Dec 3 15:39:12 2021 From: avu at openjdk.java.net (Alexey Ushakov) Date: Fri, 3 Dec 2021 15:39:12 GMT Subject: RFR: 8272392 Lanai: SwingSet2. Black background on expanding tree node [v2] In-Reply-To: References: Message-ID: <-u5hMVCfn6XtH1W65ISOYBk0p3XPsAAWgRse7Y1Xzm4=.6fce7378-d3b6-4000-9a05-763717e30a4b@github.com> On Wed, 1 Dec 2021 06:57:25 GMT, Jayathirth D V wrote: >> Alexey Ushakov has updated the pull request incrementally with one additional commit since the last revision: >> >> 8272392 Lanai: SwingSet2. Black background on expanding tree node >> >> Fixed incorrect addition of the values into pipeline state cache. Refactored index initialization. Removed unused flags from MTLClip. > > src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/EncoderManager.m line 44: > >> 42: >> 43: - (void)reset:(id)destination >> 44: isAA:(jboolean)isAA > > I think by mistake isText argument is also removed. It is not matching reset() implementation. Thanks for the findings! Fixed. ------------- PR: https://git.openjdk.java.net/jdk/pull/6529 From avu at openjdk.java.net Fri Dec 3 15:39:13 2021 From: avu at openjdk.java.net (Alexey Ushakov) Date: Fri, 3 Dec 2021 15:39:13 GMT Subject: RFR: 8272392 Lanai: SwingSet2. Black background on expanding tree node [v3] In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 07:08:39 GMT, Jayathirth D V wrote: >> Alexey Ushakov has updated the pull request incrementally with one additional commit since the last revision: >> >> 8272392 Lanai: SwingSet2. Black background on expanding tree node >> >> Corrected prototype of the reset method > > src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLClip.m line 61: > >> 59: BOOL _stencilMaskGenerationInProgress; >> 60: BOOL _stencilMaskGenerationStarted; >> 61: BOOL _clipReady; > > This looks like cleanup and not related to this change. Sometime back i also had question on why this was needed. Thanks. Yes, It's small clean-up here ------------- PR: https://git.openjdk.java.net/jdk/pull/6529 From avu at openjdk.java.net Fri Dec 3 15:42:12 2021 From: avu at openjdk.java.net (Alexey Ushakov) Date: Fri, 3 Dec 2021 15:42:12 GMT Subject: RFR: 8272392 Lanai: SwingSet2. Black background on expanding tree node [v2] In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 07:55:30 GMT, Jayathirth D V wrote: > I used test case present in https://bugs.openjdk.java.net/browse/JDK-8267963 to check how it behaves with this PR and noticed that it is causes regresssion related to how ruler text looks and also if we move Ruler between monitors it doesnt draw. > > Thought this may be because of state's not getting reset since there is mismatch in EncoderManager.reset() arguments. Updated code to add isText argument over this PR, but i continue to see the regressions. @jayathirthrao could you please provide some more info about your environment. I cannot reproduce the problems that you've reported with the test from JDK-8267963. ------------- PR: https://git.openjdk.java.net/jdk/pull/6529 From dcubed at openjdk.java.net Fri Dec 3 16:22:17 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Fri, 3 Dec 2021 16:22:17 GMT Subject: RFR: 8278119: ProblemList few headful test failing in macosx12-aarch64 system In-Reply-To: References: Message-ID: On Thu, 2 Dec 2021 08:27:37 GMT, Prasanta Sadhukhan wrote: > Few tests are failing on macos12-aarch64 systems due to mismatch in color value obtained from robot.getPixelColor and expected color. > More details on the failures can be seen in JDK-8277816. Till the root cause is investigated, it is better to problemlist it as it causing failures in CI run. javax/swing/JTree/4908142/bug4908142.java has also shown up in some of the sightings on these machines. You should add that one also. java/awt/GraphicsDevice/CheckDisplayModes.java has also been showing up recently, but it has a different failure "exit code 133". I don't know if you want to include that one. So there are 8 pretty much solid failures and 2 others that also show up, but not in every run. ------------- Changes requested by dcubed (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/6663 From psadhukhan at openjdk.java.net Fri Dec 3 16:57:11 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 3 Dec 2021 16:57:11 GMT Subject: RFR: 8278119: ProblemList few headful test failing in macosx12-aarch64 system In-Reply-To: References: Message-ID: On Thu, 2 Dec 2021 08:27:37 GMT, Prasanta Sadhukhan wrote: > Few tests are failing on macos12-aarch64 systems due to mismatch in color value obtained from robot.getPixelColor and expected color. > More details on the failures can be seen in JDK-8277816. Till the root cause is investigated, it is better to problemlist it as it causing failures in CI run. javax/swing/JTree/4908142/bug4908142.java I have a separate review going on for that https://github.com/openjdk/jdk/pull/6661..It has different issue and not color related.. java/awt/GraphicsDevice/CheckDisplayModes.java also has different root cause unlike present in JDK-8277816 so I would like it to be not here.. ------------- PR: https://git.openjdk.java.net/jdk/pull/6663 From dcubed at openjdk.java.net Fri Dec 3 17:07:18 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Fri, 3 Dec 2021 17:07:18 GMT Subject: RFR: 8278119: ProblemList few headful test failing in macosx12-aarch64 system In-Reply-To: References: Message-ID: On Thu, 2 Dec 2021 08:27:37 GMT, Prasanta Sadhukhan wrote: > Few tests are failing on macos12-aarch64 systems due to mismatch in color value obtained from robot.getPixelColor and expected color. > More details on the failures can be seen in JDK-8277816. Till the root cause is investigated, it is better to problemlist it as it causing failures in CI run. Thanks for the clarifications! ------------- Marked as reviewed by dcubed (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/6663 From psadhukhan at openjdk.java.net Fri Dec 3 17:14:18 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 3 Dec 2021 17:14:18 GMT Subject: Integrated: 8278119: ProblemList few headful test failing in macosx12-aarch64 system In-Reply-To: References: Message-ID: <1KkO7IheijnvpBOxkbi_ObDhJEbfKkFBlB9ycAMBnV0=.aab1dfdd-bbe1-4793-a3c6-dea6262c4e42@github.com> On Thu, 2 Dec 2021 08:27:37 GMT, Prasanta Sadhukhan wrote: > Few tests are failing on macos12-aarch64 systems due to mismatch in color value obtained from robot.getPixelColor and expected color. > More details on the failures can be seen in JDK-8277816. Till the root cause is investigated, it is better to problemlist it as it causing failures in CI run. This pull request has now been integrated. Changeset: 660f21a4 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/660f21a418ee4c616d0b91133fd44e74a77d4d53 Stats: 10 lines in 1 file changed: 9 ins; 0 del; 1 mod 8278119: ProblemList few headful test failing in macosx12-aarch64 system Reviewed-by: dcubed ------------- PR: https://git.openjdk.java.net/jdk/pull/6663 From serb at openjdk.java.net Fri Dec 3 18:15:21 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 3 Dec 2021 18:15:21 GMT Subject: RFR: 8275843: Random crashes while the UI code is executed In-Reply-To: References: Message-ID: On Mon, 1 Nov 2021 20:03:42 GMT, Sergey Bylokhov wrote: > Please take a look to one more wagon in this train: > [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795)->[JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931)->[JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579)->[JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392)->[Current issue](https://bugs.openjdk.java.net/browse/JDK-8275843). > > #### The short description: > > We have an inconsistent between xrender java code and the x11 window. The java code thinks that all our windows support only two types of color models: IntRgbX11 and IntArgbPreX11, but the x11 window supports more types. If such inconsistency occurs we render some garbage, or just crash since our "blits" will assume the wrong data layout. This issue was reported and fixed [before](http://hg.openjdk.java.net/jdk/jdk/rev/c53905e7dc57) but it was not realized why the rendering was wrong and that it can cause a crash. The fix is similar to the old one. > > #### The long description: > > * Once upon a time this bug was filed [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) it was about the rendering of colors to the volatile image, the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8176795?focusedCommentId=14138323&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14138323) In short: the volatile images in the xrender use intArgbPre color model, it means that the SunGraphics2D object [convert](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1753) the argb value to the argbPre before passing it to the pipeline, and the xrender pipeline [convert](http://hg.openjdk.java.net/jdk/jdk/rev/e4b03365ddbf) this value to the argbPre one more time -> double-conversion-> the bug is reproduced. The fix for that bug disabled the second conversion in the xrender. but it does not take into account that this code path is u sed for rendering to the ARGB X11 window where the shared code does not convert the color, so the next bug was filed. > * The second bug is [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931), the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8204931?focusedCommentId=14199800&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14199800). In short the bug was about rendering directly to the window and missing color conversion removed previously. The fix for that bug changed the surface type used by the window, so the shared code start to convert the color from ARGB to argbPre, but it does not take into account that we do not control the color model of the window, see how many of them we actually [support](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/unix/classes/sun/java2d/x11/X11SurfaceData.java#L501) Also note in the link above that if we do not recognize the type we do not fallback to something but throw InvalidPipeException, this is because the blits(and other primitives) may use t his type to access the data directly. So the next bug was reported: > * This is the third issue [JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579). The fix for that issue tried to roll back the previous one but does not take into account that the conversion removed by the first issue should be rollback as well, so the last bug was filed. > * The "last" issue is [JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392) rollback the previous one. So the bug reported in the third report come back. > > #### Fix description > > The fix for the current issue contains a few parts: > * Rollback of the [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931) so we will use the proper surface data for the window. > * Return conversion in the xrender pipeline removed by the [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) So we will convert it when we render to the volatile image(argbPre) and to the window(argb). We need to convert in both cases since the xrender API which we use expects the argbPre colors. > * Start to use the [eargb](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1752) value( instead of pixel) stored in the SunGraphics2D so we did not get the double conversion. > > Some tests are updated and one more is added. > > ### Note > I have checked the performance implication of this change and it looks like after this change the sequence window.setvisible(true)/window.dispose() will work 30% faster, this may affect the tests which does not wait enough time to make the window visible. Probably this is the reason why some of our tests became more stable at some point in jdk11. > > > I have tested this by the jck and jdk_desktop tests. But any additional verification/testing is welcome. Any volunteers to review? ------------- PR: https://git.openjdk.java.net/jdk/pull/6199 From lbourges at openjdk.java.net Fri Dec 3 18:30:14 2021 From: lbourges at openjdk.java.net (Laurent =?UTF-8?B?Qm91cmfDqHM=?=) Date: Fri, 3 Dec 2021 18:30:14 GMT Subject: RFR: 8275843: Random crashes while the UI code is executed In-Reply-To: References: Message-ID: On Mon, 1 Nov 2021 20:03:42 GMT, Sergey Bylokhov wrote: > Please take a look to one more wagon in this train: > [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795)->[JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931)->[JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579)->[JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392)->[Current issue](https://bugs.openjdk.java.net/browse/JDK-8275843). > > #### The short description: > > We have an inconsistent between xrender java code and the x11 window. The java code thinks that all our windows support only two types of color models: IntRgbX11 and IntArgbPreX11, but the x11 window supports more types. If such inconsistency occurs we render some garbage, or just crash since our "blits" will assume the wrong data layout. This issue was reported and fixed [before](http://hg.openjdk.java.net/jdk/jdk/rev/c53905e7dc57) but it was not realized why the rendering was wrong and that it can cause a crash. The fix is similar to the old one. > > #### The long description: > > * Once upon a time this bug was filed [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) it was about the rendering of colors to the volatile image, the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8176795?focusedCommentId=14138323&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14138323) In short: the volatile images in the xrender use intArgbPre color model, it means that the SunGraphics2D object [convert](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1753) the argb value to the argbPre before passing it to the pipeline, and the xrender pipeline [convert](http://hg.openjdk.java.net/jdk/jdk/rev/e4b03365ddbf) this value to the argbPre one more time -> double-conversion-> the bug is reproduced. The fix for that bug disabled the second conversion in the xrender. but it does not take into account that this code path is u sed for rendering to the ARGB X11 window where the shared code does not convert the color, so the next bug was filed. > * The second bug is [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931), the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8204931?focusedCommentId=14199800&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14199800). In short the bug was about rendering directly to the window and missing color conversion removed previously. The fix for that bug changed the surface type used by the window, so the shared code start to convert the color from ARGB to argbPre, but it does not take into account that we do not control the color model of the window, see how many of them we actually [support](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/unix/classes/sun/java2d/x11/X11SurfaceData.java#L501) Also note in the link above that if we do not recognize the type we do not fallback to something but throw InvalidPipeException, this is because the blits(and other primitives) may use t his type to access the data directly. So the next bug was reported: > * This is the third issue [JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579). The fix for that issue tried to roll back the previous one but does not take into account that the conversion removed by the first issue should be rollback as well, so the last bug was filed. > * The "last" issue is [JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392) rollback the previous one. So the bug reported in the third report come back. > > #### Fix description > > The fix for the current issue contains a few parts: > * Rollback of the [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931) so we will use the proper surface data for the window. > * Return conversion in the xrender pipeline removed by the [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) So we will convert it when we render to the volatile image(argbPre) and to the window(argb). We need to convert in both cases since the xrender API which we use expects the argbPre colors. > * Start to use the [eargb](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1752) value( instead of pixel) stored in the SunGraphics2D so we did not get the double conversion. > > Some tests are updated and one more is added. > > ### Note > I have checked the performance implication of this change and it looks like after this change the sequence window.setvisible(true)/window.dispose() will work 30% faster, this may affect the tests which does not wait enough time to make the window visible. Probably this is the reason why some of our tests became more stable at some point in jdk11. > > > I have tested this by the jck and jdk_desktop tests. But any additional verification/testing is welcome. Looks good to me, not an official reviewer ------------- PR: https://git.openjdk.java.net/jdk/pull/6199 From serb at openjdk.java.net Fri Dec 3 19:16:15 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 3 Dec 2021 19:16:15 GMT Subject: RFR: 8190264: JScrollBar ignores its border when using macOS Mac OS X Aqua look and feel [v4] In-Reply-To: References: Message-ID: On Thu, 2 Dec 2021 20:18:51 GMT, Alisen Chung wrote: >> But it is not necessary to use the robot at all? Can you try to set the scollbar thumb position/move it programmatically w/o a robot? If it is possible then it will be rendered on top of the red area -> it will be possible to render it to the buffered image and just check the pixel in the right position(is it red or not). > > Is using robot to get the pixel color alright? You can render directly to the BufferedImage instead of the JFrame, so in this case, it will not be necessary to use a robot, you will be able to check the pixel directly. ------------- PR: https://git.openjdk.java.net/jdk/pull/6374 From serb at openjdk.java.net Fri Dec 3 19:16:15 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 3 Dec 2021 19:16:15 GMT Subject: RFR: 8190264: JScrollBar ignores its border when using macOS Mac OS X Aqua look and feel [v4] In-Reply-To: References: Message-ID: On Fri, 3 Dec 2021 19:11:19 GMT, Sergey Bylokhov wrote: >> Is using robot to get the pixel color alright? > > You can render directly to the BufferedImage instead of the JFrame, so in this case, it will not be necessary to use a robot, you will be able to check the pixel directly. For example, you can take a look at the JButtonPaintNPE or TestBadBreak tests. ------------- PR: https://git.openjdk.java.net/jdk/pull/6374 From kizune at openjdk.java.net Fri Dec 3 20:18:18 2021 From: kizune at openjdk.java.net (Alexander Zuev) Date: Fri, 3 Dec 2021 20:18:18 GMT Subject: RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits [v3] In-Reply-To: References: Message-ID: <8No3mHp1lnZqHb2ptNIhnqk0By-nvY_ziROsgwiw5vo=.8461c16a-f88d-40de-ae2f-c3af16aad281@github.com> On Fri, 3 Dec 2021 13:26:57 GMT, Alexey Ivanov wrote: >> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: >> >> Eliminate potential resource leak. > > src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp line 1068: > >> 1066: } >> 1067: >> 1068: if (colorBits != NULL) { > > I think this way defeats the use of exception to handle allocation error. You could use: > ```c++ > long *colorBits = (long*)malloc(MAX_ICON_SIZE * MAX_ICON_SIZE * sizeof(long)); > if (colorBits != NULL) { > > to achieve the same effect, which is shorter and clearer. Yes, but then handle_bad_alloc() will not be called which will not raise the OutOfMemoryError on the java side. > src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp line 1102: > >> 1100: } >> 1101: // Release DC >> 1102: ReleaseDC(NULL, dc); > > The DC has to be released even if `colorBits` allocation failed, so this needs to be after `if (colorBits != NULL)`. Fixed. ------------- PR: https://git.openjdk.java.net/jdk/pull/6473 From aivanov at openjdk.java.net Fri Dec 3 20:24:12 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 3 Dec 2021 20:24:12 GMT Subject: RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits [v3] In-Reply-To: <8No3mHp1lnZqHb2ptNIhnqk0By-nvY_ziROsgwiw5vo=.8461c16a-f88d-40de-ae2f-c3af16aad281@github.com> References: <8No3mHp1lnZqHb2ptNIhnqk0By-nvY_ziROsgwiw5vo=.8461c16a-f88d-40de-ae2f-c3af16aad281@github.com> Message-ID: <_p_UCYxPb7a8sImvlIBHWSywpCU4fh7Vht2KJniHhFo=.2d0a9c43-b8ca-44d6-b86e-1f4f45e123d2@github.com> On Fri, 3 Dec 2021 20:14:23 GMT, Alexander Zuev wrote: > Yes, but then handle_bad_alloc() will not be called which will not raise the OutOfMemoryError on the java side. Can't we call it explicitly in the case where `colorBits == NULL`? Alternatively, since you don't use the macros for try and catch, you can re-arrange code and perform cleanup after the catch-block. Just an idea? It may not work. ------------- PR: https://git.openjdk.java.net/jdk/pull/6473 From aivanov at openjdk.java.net Fri Dec 3 21:31:17 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 3 Dec 2021 21:31:17 GMT Subject: RFR: 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList In-Reply-To: References: Message-ID: <6bFmmHOLj2bz5qLB5u1XLoJbPfe3WRST7U_QvjVZUpQ=.81aeacef-1207-424f-b8a2-f35f1ab96ac0@github.com> On Fri, 3 Dec 2021 07:30:43 GMT, ANUPAM DEV wrote: > The documentation for following methods used equals() for object equality: > > sun.awt.util.IdentityLinkedList#contains > sun.awt.util.IdentityArrayList#contains > sun.awt.util.IdentityArrayList#indexOf > sun.awt.util.IdentityArrayList#lastIndexOf > sun.awt.util.IdentityArrayList#remove(java.lang.Object) > > I have updated the comments to use "==" operator for object equality. Kindly review the changes for the same. I propose removing changes to `HttpURLConnection.java` from this PR. Both `IdentityArrayList`, `IdentityLinkedList` are in `java.desktop` module but `HttpURLConnection` is in `java.base` module. Submit a new issue to fix spelling errors in `HttpURLConnection.java`. src/java.desktop/share/classes/sun/awt/util/IdentityArrayList.java line 219: > 217: * in this list, or -1 if this list does not contain the element. > 218: * More formally, returns the lowest index {@code i} such that > 219: * {@code get(i)==o}, Shall it have spaces on either side of `==`? Suggestion: * {@code get(i) == o}, I see `IdentityLinkedList.java` doesn't have spaces around `==` in this case. Yet in this case, probably `{@code o == e}` should not have the spaces too. src/java.desktop/share/classes/sun/awt/util/IdentityArrayList.java line 399: > 397: } > 398: > 399: /** An extra space. src/java.desktop/share/classes/sun/awt/util/IdentityArrayList.java line 401: > 399: /** > 400: * Removes the first occurrence of the specified element from this list, > 401: * if it is present. If this list does not contain the element, it is Suggestion: * if it is present. If this list does not contain the element, the list is I think it adds clarification to _what_ is unchanged. ------------- Changes requested by aivanov (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/6694 From prr at openjdk.java.net Sat Dec 4 00:48:13 2021 From: prr at openjdk.java.net (Phil Race) Date: Sat, 4 Dec 2021 00:48:13 GMT Subject: RFR: JDK-8278175: Enable all doclint warnings for build of java.desktop In-Reply-To: References: Message-ID: On Fri, 3 Dec 2021 01:18:20 GMT, Joe Darcy wrote: > In JDK 18, JDK-8189591 added the ability to suppress doclint warnings. Therefore, it is now possible to enable the full doclint checks for the java.desktop module if the instances of warnings are suppressed. This patch does this; it would be preferable to address the doc warnings directly, but that is beyond what I'm attempting to do here. Looks OK. Could you file a P4 bug showing the warnings/errors that would be generated so that we know what we need to work on to later remove these the right way. ------------- Marked as reviewed by prr (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/6687 From duke at openjdk.java.net Sat Dec 4 01:59:20 2021 From: duke at openjdk.java.net (duke) Date: Sat, 4 Dec 2021 01:59:20 GMT Subject: Withdrawn: 8254841: [macos] Enter and Exit events shouldn't be sent whilst resizing In-Reply-To: References: Message-ID: <2GKuOTkaq-hN4CVVEzfbJAojquckOeYs1wDKa-L3BlQ=.1c1d2884-57cb-4081-b9b7-bfee5b9487c3@github.com> On Mon, 13 Sep 2021 18:03:39 GMT, Alisen Chung wrote: > Added a resizing flag when the window is currently being resized to block mouseEntered and mouseExited events from being posted to that window. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/5497 From darcy at openjdk.java.net Sat Dec 4 02:16:15 2021 From: darcy at openjdk.java.net (Joe Darcy) Date: Sat, 4 Dec 2021 02:16:15 GMT Subject: RFR: JDK-8278175: Enable all doclint warnings for build of java.desktop In-Reply-To: References: Message-ID: On Fri, 3 Dec 2021 01:18:20 GMT, Joe Darcy wrote: > In JDK 18, JDK-8189591 added the ability to suppress doclint warnings. Therefore, it is now possible to enable the full doclint checks for the java.desktop module if the instances of warnings are suppressed. This patch does this; it would be preferable to address the doc warnings directly, but that is beyond what I'm attempting to do here. > Sure; filed JDK-8278254 Cleanup doclint warnings in java.desktop module ------------- PR: https://git.openjdk.java.net/jdk/pull/6687 From darcy at openjdk.java.net Sat Dec 4 02:16:15 2021 From: darcy at openjdk.java.net (Joe Darcy) Date: Sat, 4 Dec 2021 02:16:15 GMT Subject: Integrated: JDK-8278175: Enable all doclint warnings for build of java.desktop In-Reply-To: References: Message-ID: On Fri, 3 Dec 2021 01:18:20 GMT, Joe Darcy wrote: > In JDK 18, JDK-8189591 added the ability to suppress doclint warnings. Therefore, it is now possible to enable the full doclint checks for the java.desktop module if the instances of warnings are suppressed. This patch does this; it would be preferable to address the doc warnings directly, but that is beyond what I'm attempting to do here. This pull request has now been integrated. Changeset: 02ee337a Author: Joe Darcy URL: https://git.openjdk.java.net/jdk/commit/02ee337ae0d163ae44b1691eb9de12c5608ba178 Stats: 34 lines in 20 files changed: 16 ins; 0 del; 18 mod 8278175: Enable all doclint warnings for build of java.desktop Reviewed-by: erikj, prr ------------- PR: https://git.openjdk.java.net/jdk/pull/6687 From duke at openjdk.java.net Sat Dec 4 02:50:20 2021 From: duke at openjdk.java.net (ANUPAM DEV) Date: Sat, 4 Dec 2021 02:50:20 GMT Subject: Withdrawn: 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList In-Reply-To: References: Message-ID: On Fri, 3 Dec 2021 07:30:43 GMT, ANUPAM DEV wrote: > The documentation for following methods used equals() for object equality: > > sun.awt.util.IdentityLinkedList#contains > sun.awt.util.IdentityArrayList#contains > sun.awt.util.IdentityArrayList#indexOf > sun.awt.util.IdentityArrayList#lastIndexOf > sun.awt.util.IdentityArrayList#remove(java.lang.Object) > > I have updated the comments to use "==" operator for object equality. Kindly review the changes for the same. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/6694 From duke at openjdk.java.net Sat Dec 4 03:13:36 2021 From: duke at openjdk.java.net (ANUPAM DEV) Date: Sat, 4 Dec 2021 03:13:36 GMT Subject: RFR: 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList Message-ID: The documentation for following methods used object equality mentioning 'equals()'. I have replaced the equals() with == operator where necessary with some formattings. sun.awt.util.IdentityLinkedList#contains sun.awt.util.IdentityArrayList#contains sun.awt.util.IdentityArrayList#indexOf sun.awt.util.IdentityArrayList#lastIndexOf sun.awt.util.IdentityArrayList#remove(java.lang.Object) Kindly review the change. ------------- Commit messages: - 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList - Merge branch 'openjdk:master' into master - Merge pull request #1 from anupamdev20/JDK-8255675 - 8255675: Typo in java.net.HttpURLConnection Changes: https://git.openjdk.java.net/jdk/pull/6710/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6710&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8247973 Stats: 19 lines in 2 files changed: 8 ins; 0 del; 11 mod Patch: https://git.openjdk.java.net/jdk/pull/6710.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6710/head:pull/6710 PR: https://git.openjdk.java.net/jdk/pull/6710 From kizune at openjdk.java.net Sat Dec 4 05:04:10 2021 From: kizune at openjdk.java.net (Alexander Zuev) Date: Sat, 4 Dec 2021 05:04:10 GMT Subject: RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits [v3] In-Reply-To: <_p_UCYxPb7a8sImvlIBHWSywpCU4fh7Vht2KJniHhFo=.2d0a9c43-b8ca-44d6-b86e-1f4f45e123d2@github.com> References: <8No3mHp1lnZqHb2ptNIhnqk0By-nvY_ziROsgwiw5vo=.8461c16a-f88d-40de-ae2f-c3af16aad281@github.com> <_p_UCYxPb7a8sImvlIBHWSywpCU4fh7Vht2KJniHhFo=.2d0a9c43-b8ca-44d6-b86e-1f4f45e123d2@github.com> Message-ID: On Fri, 3 Dec 2021 20:20:48 GMT, Alexey Ivanov wrote: > Can't we call it explicitly in the case where colorBits == NULL? I would use the default handlers for bad_alloc since they can be changed in feature and keeping code that is intended to be used in two places is usually not a good idea. > Alternatively, since you don't use the macros for try and catch, you can re-arrange code and perform cleanup after the catch-block. Just an idea? It may not work. That might require a lot of code reformatting and the benefits are unclear. ------------- PR: https://git.openjdk.java.net/jdk/pull/6473 From serb at openjdk.java.net Sat Dec 4 06:47:31 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 4 Dec 2021 06:47:31 GMT Subject: RFR: 8278251: Enable "missing-explicit-ctor" check in the jdk.unsupported.desktop module Message-ID: <4f-QfTpojcbsiww5G7DrU7daNRNW0scSjxsPOUODdTo=.c578c7b1-2f75-4734-ae75-9c1a5c3214f4@github.com> The "missing-explicit-ctor" check was disabled by the [JDK-8071961](https://bugs.openjdk.java.net/browse/JDK-8071961) and later was fixed by the [JDK-8250853](https://bugs.openjdk.java.net/browse/JDK-8250853). So we can re-enable this check again. The fix will remove the "Java.gmk" file and as a result the "jdk.unsupported.desktop" folder. All "Pre-submit tests" builds are green. ------------- Commit messages: - Delete Java.gmk Changes: https://git.openjdk.java.net/jdk/pull/6708/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6708&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278251 Stats: 26 lines in 1 file changed: 0 ins; 26 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/6708.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6708/head:pull/6708 PR: https://git.openjdk.java.net/jdk/pull/6708 From aivanov at openjdk.java.net Sat Dec 4 17:46:13 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Sat, 4 Dec 2021 17:46:13 GMT Subject: RFR: 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList In-Reply-To: References: Message-ID: On Sat, 4 Dec 2021 03:07:03 GMT, ANUPAM DEV wrote: > The documentation for following methods used object equality mentioning 'equals()'. I have replaced the equals() with == operator where necessary with some formattings. > > sun.awt.util.IdentityLinkedList#contains > sun.awt.util.IdentityArrayList#contains > sun.awt.util.IdentityArrayList#indexOf > sun.awt.util.IdentityArrayList#lastIndexOf > sun.awt.util.IdentityArrayList#remove(java.lang.Object) > > Kindly review the change. Was the previous PR #6694 not good enough? The previous PR has comments to the changes thus you should've referenced it when you created the new one. ------------- PR: https://git.openjdk.java.net/jdk/pull/6710 From aivanov at openjdk.java.net Sat Dec 4 19:36:17 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Sat, 4 Dec 2021 19:36:17 GMT Subject: RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits [v3] In-Reply-To: References: <8No3mHp1lnZqHb2ptNIhnqk0By-nvY_ziROsgwiw5vo=.8461c16a-f88d-40de-ae2f-c3af16aad281@github.com> <_p_UCYxPb7a8sImvlIBHWSywpCU4fh7Vht2KJniHhFo=.2d0a9c43-b8ca-44d6-b86e-1f4f45e123d2@github.com> Message-ID: On Sat, 4 Dec 2021 05:01:06 GMT, Alexander Zuev wrote: > > Alternatively, since you don't use the macros for try and catch, you can re-arrange code and perform cleanup after the catch-block. Just an idea? It may not work. > > That might require a lot of code reformatting and the benefits are unclear. I tried it, it doesn't, [see this diff](https://github.com/aivanov-jdk/jdk/commit/ccf7500cf0e4614b12c0882204a81d928fce0a82). It's close to your latest code, however, there's only one `catch` that handles both allocations and there are no `if`'s inside the `try`-block. ------------- PR: https://git.openjdk.java.net/jdk/pull/6473 From aivanov at openjdk.java.net Sat Dec 4 19:36:18 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Sat, 4 Dec 2021 19:36:18 GMT Subject: RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits [v3] In-Reply-To: <8No3mHp1lnZqHb2ptNIhnqk0By-nvY_ziROsgwiw5vo=.8461c16a-f88d-40de-ae2f-c3af16aad281@github.com> References: <8No3mHp1lnZqHb2ptNIhnqk0By-nvY_ziROsgwiw5vo=.8461c16a-f88d-40de-ae2f-c3af16aad281@github.com> Message-ID: On Fri, 3 Dec 2021 20:14:43 GMT, Alexander Zuev wrote: >> src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp line 1102: >> >>> 1100: } >>> 1101: // Release DC >>> 1102: ReleaseDC(NULL, dc); >> >> The DC has to be released even if `colorBits` allocation failed, so this needs to be after `if (colorBits != NULL)`. > > Fixed. Probably, you hasn't pushed the change for releasing the DC. ------------- PR: https://git.openjdk.java.net/jdk/pull/6473 From duke at openjdk.java.net Sun Dec 5 03:58:12 2021 From: duke at openjdk.java.net (ANUPAM DEV) Date: Sun, 5 Dec 2021 03:58:12 GMT Subject: RFR: 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList In-Reply-To: References: Message-ID: On Sat, 4 Dec 2021 17:42:41 GMT, Alexey Ivanov wrote: >> The documentation for following methods used object equality mentioning 'equals()'. I have replaced the equals() with == operator where necessary with some formattings. >> >> sun.awt.util.IdentityLinkedList#contains >> sun.awt.util.IdentityArrayList#contains >> sun.awt.util.IdentityArrayList#indexOf >> sun.awt.util.IdentityArrayList#lastIndexOf >> sun.awt.util.IdentityArrayList#remove(java.lang.Object) >> >> Kindly review the change. > > Was the previous PR #6694 not good enough? > The previous PR has comments to the changes thus you should've referenced it when you created the new one. @aivanov-jdk The PR #6694 included HttpURLConnection too. I therefore closed that PR (https://github.com/openjdk/jdk/pull/6694#pullrequestreview-823124988) and initiated new requested with correct files and changes. As I am slightly new to git I did not know how to update the PR, so I filed a new one. ------------- PR: https://git.openjdk.java.net/jdk/pull/6710 From psadhukhan at openjdk.java.net Mon Dec 6 07:09:11 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 6 Dec 2021 07:09:11 GMT Subject: RFR: 8172065: javax/swing/JTree/4908142/bug4908142.java The selected index should be "aad" [v2] In-Reply-To: References: <1bFLgdrkpH1rWjwpQS16m87kA1E4Z35C2STeYWyDCrA=.73d51aaf-ad43-4470-a1aa-aa8d026ce7d8@github.com> Message-ID: On Fri, 3 Dec 2021 06:18:43 GMT, Prasanta Sadhukhan wrote: >> Test is failing in macosx-12 in aarch64 system. Added stability fixes of delay after frame is visible, making frame to center of screen to make the test stable in macos12-aarch64 system too. >> Modified test passes in all CI platforms including osx-aarch64 system in osx11 and osx12. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Add waitForIdle Any reviewer please? ------------- PR: https://git.openjdk.java.net/jdk/pull/6661 From dbatrak at openjdk.java.net Mon Dec 6 08:53:07 2021 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Mon, 6 Dec 2021 08:53:07 GMT Subject: RFR: 8278050: Armenian text isn't rendered on macOS if text layout is performed In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 10:52:38 GMT, Dmitry Batrak wrote: > The problem is related to the implementation of font fallback on macOS, specifically to the path used when text layout > is performed, i.e. the one using `FontSubstitution` and cascade lists. `CTFontCopyDefaultCascadeListForLanguages`'s output contains an entry for the font, able to render Armenian text ('NotoSansArmenian-Regular'), but `CFont.createCompositeFont` cannot find this font amongst registered fonts, and the entry is skipped, resulting in broken rendering. > System font loading (performed by `CFontManager.loadNativeFonts`) relies on `[NSFontManager availableFontFamilies]`, but its output doesn't contain 'Noto Sans Armenian' (which is a family for 'NotoSansArmenian-Regular' font). 'Noto Sans Armenian' is recognized by `[NSFontManager availableMembersOfFontFamily:]` though, 'NotoSansArmenian-Regular' is contained in `[NSFontManager availableFonts]` output, and the font can be created and used normally, just like any other system font. Not sure why its family is 'hidden', maybe macOS developers wanted to limit the number of options > displayed in font selection drop-downs. > For reference, another cascade list item, ignored in similar way is 'NotoSansZawgyi-Regular'. > > Proposed fix is to create `CFont` objects for cascade list items explicitly, if corresponding fonts are not registered. These objects are re-used between different fonts as their fallback components (to enable caching of char-to-glyph mapping), but are not made available to public font APIs. > I've considered an alternative solution - using `[NSFontManager availableFonts]` instead of > `[NSFontManager availableFontFamilies]` to load system fonts. Two factors complicate it though - `loadNativeFonts` will > take more time (on my machine about 170 additional fonts will be loaded) and the order of font loading will change (which > impacts the selection of 'preferred' plain/bold/italic/bolditalic components in `FontFamily` class). Both factors can be > dealt with, but they make the solution more complicated and prone to regressions. For now, it seems not worth it. > > I've not created a test, as it would rely on macOS providing a fallback font for Armenian script, which is not guaranteed. > Existing tests pass fine with the fix. Any other volunteers to review? ------------- PR: https://git.openjdk.java.net/jdk/pull/6633 From ant at openjdk.java.net Mon Dec 6 09:14:14 2021 From: ant at openjdk.java.net (Anton Tarasov) Date: Mon, 6 Dec 2021 09:14:14 GMT Subject: RFR: 8277497 Last column cell in the JTAble row is read as empty cell [v6] In-Reply-To: References: <4U4YMD6EbbtbUdEXp7fLovboOhmYXUmug-7I-2EIwDU=.b46b4469-d651-4799-a2cf-120383139cb6@github.com> Message-ID: On Fri, 3 Dec 2021 09:18:45 GMT, Artem Semenov wrote: >> Testing https://bugs.openjdk.java.net/browse/JDK-8271071 >> Step to reproduce >> 1) Run SwingSet2 in JDK 18 ( I used b24 ) >> 2) Enable Voiceover. >> 3) Select JTable demo >> 4) Click any row in the table or select the first row . Observe that row is selected & VoiceOver reads the column values or navigate the columns one by one by pressing tab key. When the focus reaches the last column ( Favourite Food ) Observe that column value is read as null. If you hear the same then the bug is reproduced. > > Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: > > 8277497: Last column cell in the JTAble row is read as empty cell Marked as reviewed by ant (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6538 From ihse at openjdk.java.net Mon Dec 6 11:50:16 2021 From: ihse at openjdk.java.net (Magnus Ihse Bursie) Date: Mon, 6 Dec 2021 11:50:16 GMT Subject: RFR: 8278251: Enable "missing-explicit-ctor" check in the jdk.unsupported.desktop module In-Reply-To: <4f-QfTpojcbsiww5G7DrU7daNRNW0scSjxsPOUODdTo=.c578c7b1-2f75-4734-ae75-9c1a5c3214f4@github.com> References: <4f-QfTpojcbsiww5G7DrU7daNRNW0scSjxsPOUODdTo=.c578c7b1-2f75-4734-ae75-9c1a5c3214f4@github.com> Message-ID: On Fri, 3 Dec 2021 20:55:23 GMT, Sergey Bylokhov wrote: > The "missing-explicit-ctor" check was disabled by the [JDK-8071961](https://bugs.openjdk.java.net/browse/JDK-8071961) and later was fixed by the [JDK-8250853](https://bugs.openjdk.java.net/browse/JDK-8250853). So we can re-enable this check again. > > The fix will remove the "Java.gmk" file and as a result the "jdk.unsupported.desktop" folder. > > All "Pre-submit tests" builds are green. LGTM. ------------- Marked as reviewed by ihse (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/6708 From kizune at openjdk.java.net Mon Dec 6 12:49:47 2021 From: kizune at openjdk.java.net (Alexander Zuev) Date: Mon, 6 Dec 2021 12:49:47 GMT Subject: RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits [v4] In-Reply-To: References: Message-ID: > Made colorBits and maskBits arrays dynamic so they are allocated on heap instead of stack. > Added regression test. Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: elease device context even if colorBits buffer can not be allocated. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6473/files - new: https://git.openjdk.java.net/jdk/pull/6473/files/c8d8ee23..d72abd92 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6473&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6473&range=02-03 Stats: 4 lines in 1 file changed: 2 ins; 2 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/6473.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6473/head:pull/6473 PR: https://git.openjdk.java.net/jdk/pull/6473 From kizune at openjdk.java.net Mon Dec 6 12:49:48 2021 From: kizune at openjdk.java.net (Alexander Zuev) Date: Mon, 6 Dec 2021 12:49:48 GMT Subject: RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits [v3] In-Reply-To: References: <8No3mHp1lnZqHb2ptNIhnqk0By-nvY_ziROsgwiw5vo=.8461c16a-f88d-40de-ae2f-c3af16aad281@github.com> Message-ID: On Sat, 4 Dec 2021 19:32:36 GMT, Alexey Ivanov wrote: >> Fixed. > > Probably, you hasn't pushed the change for releasing the DC. Indeed. ------------- PR: https://git.openjdk.java.net/jdk/pull/6473 From aivanov at openjdk.java.net Mon Dec 6 15:21:16 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 6 Dec 2021 15:21:16 GMT Subject: RFR: 8172065: javax/swing/JTree/4908142/bug4908142.java The selected index should be "aad" [v2] In-Reply-To: References: <1bFLgdrkpH1rWjwpQS16m87kA1E4Z35C2STeYWyDCrA=.73d51aaf-ad43-4470-a1aa-aa8d026ce7d8@github.com> Message-ID: On Fri, 3 Dec 2021 06:18:43 GMT, Prasanta Sadhukhan wrote: >> Test is failing in macosx-12 in aarch64 system. Added stability fixes of delay after frame is visible, making frame to center of screen to make the test stable in macos12-aarch64 system too. >> Modified test passes in all CI platforms including osx-aarch64 system in osx11 and osx12. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Add waitForIdle Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6661 From duke at openjdk.java.net Mon Dec 6 15:58:28 2021 From: duke at openjdk.java.net (Tejesh R) Date: Mon, 6 Dec 2021 15:58:28 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs Message-ID: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> JListBox is invalid component. CellTableEditor Interface doesn't support JComboBox and JTree components. Hence its removed from Documentation. ------------- Commit messages: - 6465404: some problems in CellEditor related API docs Changes: https://git.openjdk.java.net/jdk/pull/6608/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6608&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-6465404 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/6608.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6608/head:pull/6608 PR: https://git.openjdk.java.net/jdk/pull/6608 From duke at openjdk.java.net Mon Dec 6 15:59:29 2021 From: duke at openjdk.java.net (Tejesh R) Date: Mon, 6 Dec 2021 15:59:29 GMT Subject: RFR: 6462028: MaskFormatter API documentation refers to getDisplayValue Message-ID: <-SOfUt64IAtAG0_rLAwkmMCCd81ZaPuTuF5ORNYuIOs=.fd151cd5-71c7-4e21-bd62-aeec7d296e76@github.com> MaskFormatter API doesn't have getDisplayValue method, hence removed from Documentation. ------------- Commit messages: - 6462028:MaskFormatter API documentation refers to getDisplayValue Changes: https://git.openjdk.java.net/jdk/pull/6556/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6556&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-6462028 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/6556.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6556/head:pull/6556 PR: https://git.openjdk.java.net/jdk/pull/6556 From psadhukhan at openjdk.java.net Mon Dec 6 16:12:20 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 6 Dec 2021 16:12:20 GMT Subject: RFR: 6462028: MaskFormatter API documentation refers to getDisplayValue In-Reply-To: <-SOfUt64IAtAG0_rLAwkmMCCd81ZaPuTuF5ORNYuIOs=.fd151cd5-71c7-4e21-bd62-aeec7d296e76@github.com> References: <-SOfUt64IAtAG0_rLAwkmMCCd81ZaPuTuF5ORNYuIOs=.fd151cd5-71c7-4e21-bd62-aeec7d296e76@github.com> Message-ID: On Thu, 25 Nov 2021 09:54:47 GMT, Tejesh R wrote: > MaskFormatter API doesn't have getDisplayValue method, hence removed from Documentation. Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6556 From psadhukhan at openjdk.java.net Mon Dec 6 16:14:23 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 6 Dec 2021 16:14:23 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs In-Reply-To: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> Message-ID: On Tue, 30 Nov 2021 08:49:19 GMT, Tejesh R wrote: > JListBox is invalid component. CellTableEditor Interface doesn't support JComboBox and JTree components. Hence its removed from Documentation. Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From psadhukhan at openjdk.java.net Mon Dec 6 16:15:22 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 6 Dec 2021 16:15:22 GMT Subject: Integrated: 8172065: javax/swing/JTree/4908142/bug4908142.java The selected index should be "aad" In-Reply-To: <1bFLgdrkpH1rWjwpQS16m87kA1E4Z35C2STeYWyDCrA=.73d51aaf-ad43-4470-a1aa-aa8d026ce7d8@github.com> References: <1bFLgdrkpH1rWjwpQS16m87kA1E4Z35C2STeYWyDCrA=.73d51aaf-ad43-4470-a1aa-aa8d026ce7d8@github.com> Message-ID: On Thu, 2 Dec 2021 08:12:15 GMT, Prasanta Sadhukhan wrote: > Test is failing in macosx-12 in aarch64 system. Added stability fixes of delay after frame is visible, making frame to center of screen to make the test stable in macos12-aarch64 system too. > Modified test passes in all CI platforms including osx-aarch64 system in osx11 and osx12. This pull request has now been integrated. Changeset: 082fdf47 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/082fdf479367612a7bd795d3becfe9830db4b2d6 Stats: 6 lines in 1 file changed: 4 ins; 0 del; 2 mod 8172065: javax/swing/JTree/4908142/bug4908142.java The selected index should be "aad" Reviewed-by: aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/6661 From aivanov at openjdk.java.net Mon Dec 6 16:26:10 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 6 Dec 2021 16:26:10 GMT Subject: RFR: 6462028: MaskFormatter API documentation refers to getDisplayValue In-Reply-To: <-SOfUt64IAtAG0_rLAwkmMCCd81ZaPuTuF5ORNYuIOs=.fd151cd5-71c7-4e21-bd62-aeec7d296e76@github.com> References: <-SOfUt64IAtAG0_rLAwkmMCCd81ZaPuTuF5ORNYuIOs=.fd151cd5-71c7-4e21-bd62-aeec7d296e76@github.com> Message-ID: <62NcR6AEhkTmMH9YnM_KnoK_quyX1RlSC6nFc-dyg4U=.c078dcec-9805-4004-9d34-6eb4ae1635c7@github.com> On Thu, 25 Nov 2021 09:54:47 GMT, Tejesh R wrote: > MaskFormatter API doesn't have getDisplayValue method, hence removed from Documentation. Please also update the copyright year at the start of the file. src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java line 103: > 101: * MaskFormatter formatter = new MaskFormatter("###-####"); > 102: * formatter.setPlaceholderCharacter('_'); > 103: * formatter.getDisplayValue(tf, "123"); This code is part of an example, without this line, the following lines of documentation do not make sense. Probably, `getDisplayValue` should be replaced with `valueToString`. You should check that and ensure the sample and the expected output, as discussed in the following sentences, is correct. ------------- Changes requested by aivanov (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/6556 From aivanov at openjdk.java.net Mon Dec 6 16:40:16 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 6 Dec 2021 16:40:16 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs In-Reply-To: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> Message-ID: <70BX5SXk_YBwACbsXf3aMS4KytQQoxkwNhXuuRgOYgo=.4e15bbad-05b2-456a-965d-b9c20b9c6303@github.com> On Tue, 30 Nov 2021 08:49:19 GMT, Tejesh R wrote: > JListBox is invalid component. CellTableEditor Interface doesn't support JComboBox and JTree components. Hence its removed from Documentation. Please also update the copyright year. Please also expand the wildcard import at line 30: import javax.swing.*; to a specific class import. In fact, this interface imports only `JTable` with the wildcard since `CellEditor` is already imported explicitly. src/java.desktop/share/classes/javax/swing/table/TableCellEditor.java line 35: > 33: * This interface defines the method any object that would like to be > 34: * an editor of values for the component JTable that > 35: * needs to implement. Suggestion: * an editor of values for the {@code JTable} component needs to implement. _?that?_ after `JTable` shouldn't be there. However, I would suggest rephrasing the Javadoc to make it easier to understand: the sentence has two levels of dependent clauses. ------------- Changes requested by aivanov (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/6608 From vdyakov at openjdk.java.net Mon Dec 6 16:40:16 2021 From: vdyakov at openjdk.java.net (Victor Dyakov) Date: Mon, 6 Dec 2021 16:40:16 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs In-Reply-To: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> Message-ID: On Tue, 30 Nov 2021 08:49:19 GMT, Tejesh R wrote: > JListBox is invalid component. CellTableEditor Interface doesn't support JComboBox and JTree components. Hence its removed from Documentation. @azuev-java please review ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From aivanov at openjdk.java.net Mon Dec 6 16:54:11 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 6 Dec 2021 16:54:11 GMT Subject: RFR: 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList In-Reply-To: References: Message-ID: On Sat, 4 Dec 2021 17:42:41 GMT, Alexey Ivanov wrote: >> The documentation for following methods used object equality mentioning 'equals()'. I have replaced the equals() with == operator where necessary with some formattings. >> >> sun.awt.util.IdentityLinkedList#contains >> sun.awt.util.IdentityArrayList#contains >> sun.awt.util.IdentityArrayList#indexOf >> sun.awt.util.IdentityArrayList#lastIndexOf >> sun.awt.util.IdentityArrayList#remove(java.lang.Object) >> >> Kindly review the change. > > Was the previous PR #6694 not good enough? > The previous PR has comments to the changes thus you should've referenced it when you created the new one. > @aivanov-jdk The PR #6694 included HttpURLConnection too. I therefore closed that PR ([#6694 (review)](https://github.com/openjdk/jdk/pull/6694#pullrequestreview-823124988)) and initiated new requested with correct files and changes. As I am slightly new to git I did not know how to update the PR, so I filed a new one. You could've just reverted the changes to `HttpURLConnection` in your branch and pushed. Effectively, it would've removed the change from the PR. ------------- PR: https://git.openjdk.java.net/jdk/pull/6710 From aivanov at openjdk.java.net Mon Dec 6 17:01:19 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 6 Dec 2021 17:01:19 GMT Subject: RFR: 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList In-Reply-To: References: Message-ID: On Sat, 4 Dec 2021 03:07:03 GMT, ANUPAM DEV wrote: > The documentation for following methods used object equality mentioning 'equals()'. I have replaced the equals() with == operator where necessary with some formattings. > > sun.awt.util.IdentityLinkedList#contains > sun.awt.util.IdentityArrayList#contains > sun.awt.util.IdentityArrayList#indexOf > sun.awt.util.IdentityArrayList#lastIndexOf > sun.awt.util.IdentityArrayList#remove(java.lang.Object) > > Kindly review the change. Changes requested by aivanov (Reviewer). src/java.desktop/share/classes/sun/awt/util/IdentityLinkedList.java line 2: > 1: /* > 2: * Copyright (c) 2007, 2021 Oracle and/or its affiliates. All rights reserved. Suggestion: * Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved. There should be another comma. ------------- PR: https://git.openjdk.java.net/jdk/pull/6710 From aivanov at openjdk.java.net Mon Dec 6 17:10:14 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 6 Dec 2021 17:10:14 GMT Subject: RFR: 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList In-Reply-To: References: Message-ID: On Mon, 6 Dec 2021 16:57:23 GMT, Alexey Ivanov wrote: >> The documentation for following methods used object equality mentioning 'equals()'. I have replaced the equals() with == operator where necessary with some formattings. >> >> sun.awt.util.IdentityLinkedList#contains >> sun.awt.util.IdentityArrayList#contains >> sun.awt.util.IdentityArrayList#indexOf >> sun.awt.util.IdentityArrayList#lastIndexOf >> sun.awt.util.IdentityArrayList#remove(java.lang.Object) >> >> Kindly review the change. > > src/java.desktop/share/classes/sun/awt/util/IdentityLinkedList.java line 2: > >> 1: /* >> 2: * Copyright (c) 2007, 2021 Oracle and/or its affiliates. All rights reserved. > > Suggestion: > > * Copyright (c) 2007, 2021, Oracle and/or its affiliates. All rights reserved. > > There should be another comma. Other than that, the changes look good. ------------- PR: https://git.openjdk.java.net/jdk/pull/6710 From prr at openjdk.java.net Mon Dec 6 17:19:12 2021 From: prr at openjdk.java.net (Phil Race) Date: Mon, 6 Dec 2021 17:19:12 GMT Subject: RFR: 6462028: MaskFormatter API documentation refers to getDisplayValue In-Reply-To: <62NcR6AEhkTmMH9YnM_KnoK_quyX1RlSC6nFc-dyg4U=.c078dcec-9805-4004-9d34-6eb4ae1635c7@github.com> References: <-SOfUt64IAtAG0_rLAwkmMCCd81ZaPuTuF5ORNYuIOs=.fd151cd5-71c7-4e21-bd62-aeec7d296e76@github.com> <62NcR6AEhkTmMH9YnM_KnoK_quyX1RlSC6nFc-dyg4U=.c078dcec-9805-4004-9d34-6eb4ae1635c7@github.com> Message-ID: On Mon, 6 Dec 2021 16:21:51 GMT, Alexey Ivanov wrote: >> MaskFormatter API doesn't have getDisplayValue method, hence removed from Documentation. > > src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java line 103: > >> 101: * MaskFormatter formatter = new MaskFormatter("###-####"); >> 102: * formatter.setPlaceholderCharacter('_'); >> 103: * formatter.getDisplayValue(tf, "123"); > > This code is part of an example, without this line, the following lines of documentation do not make sense. Probably, `getDisplayValue` should be replaced with `valueToString`. You should check that and ensure the sample and the expected output, as discussed in the following sentences, is correct. I agree. Simply deleting this line solves nothing. The example needs to be reviewed and the text needs to say something correct and useful. ------------- PR: https://git.openjdk.java.net/jdk/pull/6556 From prr at openjdk.java.net Mon Dec 6 17:24:12 2021 From: prr at openjdk.java.net (Phil Race) Date: Mon, 6 Dec 2021 17:24:12 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs In-Reply-To: <70BX5SXk_YBwACbsXf3aMS4KytQQoxkwNhXuuRgOYgo=.4e15bbad-05b2-456a-965d-b9c20b9c6303@github.com> References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> <70BX5SXk_YBwACbsXf3aMS4KytQQoxkwNhXuuRgOYgo=.4e15bbad-05b2-456a-965d-b9c20b9c6303@github.com> Message-ID: <_yyT1DE1iec1ea6SsjCE-wT6fBrkBrws9Co61mbukNs=.572220ae-c3a4-4363-864a-bcfcc51c0e73@github.com> On Mon, 6 Dec 2021 16:29:03 GMT, Alexey Ivanov wrote: >> JListBox is invalid component. CellTableEditor Interface doesn't support JComboBox and JTree components. Hence its removed from Documentation. > > src/java.desktop/share/classes/javax/swing/table/TableCellEditor.java line 35: > >> 33: * This interface defines the method any object that would like to be >> 34: * an editor of values for the component JTable that >> 35: * needs to implement. > > Suggestion: > > * an editor of values for the {@code JTable} component needs to implement. > > _?that?_ after `JTable` shouldn't be there. > > However, I would suggest rephrasing the Javadoc to make it easier to understand: the sentence has two levels of dependent clauses. I'm not sure this fix is going in the right direction. Isn't the doc saying that if you want to use one of these components as the cell of a JTable it should implement this interface ? And the problem with JListBox is that it is actually just called JList ? ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From asemenov at openjdk.java.net Mon Dec 6 17:43:20 2021 From: asemenov at openjdk.java.net (Artem Semenov) Date: Mon, 6 Dec 2021 17:43:20 GMT Subject: Integrated: 8277497 Last column cell in the JTAble row is read as empty cell In-Reply-To: <4U4YMD6EbbtbUdEXp7fLovboOhmYXUmug-7I-2EIwDU=.b46b4469-d651-4799-a2cf-120383139cb6@github.com> References: <4U4YMD6EbbtbUdEXp7fLovboOhmYXUmug-7I-2EIwDU=.b46b4469-d651-4799-a2cf-120383139cb6@github.com> Message-ID: On Wed, 24 Nov 2021 15:16:54 GMT, Artem Semenov wrote: > Testing https://bugs.openjdk.java.net/browse/JDK-8271071 > Step to reproduce > 1) Run SwingSet2 in JDK 18 ( I used b24 ) > 2) Enable Voiceover. > 3) Select JTable demo > 4) Click any row in the table or select the first row . Observe that row is selected & VoiceOver reads the column values or navigate the columns one by one by pressing tab key. When the focus reaches the last column ( Favourite Food ) Observe that column value is read as null. If you hear the same then the bug is reproduced. This pull request has now been integrated. Changeset: 70bad89b Author: Artem Semenov URL: https://git.openjdk.java.net/jdk/commit/70bad89b012eb200ca1e76f384a6e5fb307cf26d Stats: 22 lines in 1 file changed: 22 ins; 0 del; 0 mod 8277497: Last column cell in the JTAble row is read as empty cell Reviewed-by: ant, kizune, pbansal ------------- PR: https://git.openjdk.java.net/jdk/pull/6538 From prr at openjdk.java.net Mon Dec 6 17:44:19 2021 From: prr at openjdk.java.net (Phil Race) Date: Mon, 6 Dec 2021 17:44:19 GMT Subject: RFR: 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList In-Reply-To: References: Message-ID: On Sat, 4 Dec 2021 03:07:03 GMT, ANUPAM DEV wrote: > The documentation for following methods used object equality mentioning 'equals()'. I have replaced the equals() with == operator where necessary with some formattings. > > sun.awt.util.IdentityLinkedList#contains > sun.awt.util.IdentityArrayList#contains > sun.awt.util.IdentityArrayList#indexOf > sun.awt.util.IdentityArrayList#lastIndexOf > sun.awt.util.IdentityArrayList#remove(java.lang.Object) > > Kindly review the change. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6710 From prr at openjdk.java.net Mon Dec 6 17:45:16 2021 From: prr at openjdk.java.net (Phil Race) Date: Mon, 6 Dec 2021 17:45:16 GMT Subject: RFR: 8278251: Enable "missing-explicit-ctor" check in the jdk.unsupported.desktop module In-Reply-To: <4f-QfTpojcbsiww5G7DrU7daNRNW0scSjxsPOUODdTo=.c578c7b1-2f75-4734-ae75-9c1a5c3214f4@github.com> References: <4f-QfTpojcbsiww5G7DrU7daNRNW0scSjxsPOUODdTo=.c578c7b1-2f75-4734-ae75-9c1a5c3214f4@github.com> Message-ID: On Fri, 3 Dec 2021 20:55:23 GMT, Sergey Bylokhov wrote: > The "missing-explicit-ctor" check was disabled by the [JDK-8071961](https://bugs.openjdk.java.net/browse/JDK-8071961) and later was fixed by the [JDK-8250853](https://bugs.openjdk.java.net/browse/JDK-8250853). So we can re-enable this check again. > > The fix will remove the "Java.gmk" file and as a result the "jdk.unsupported.desktop" folder. > > All "Pre-submit tests" builds are green. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6708 From prr at openjdk.java.net Mon Dec 6 17:54:18 2021 From: prr at openjdk.java.net (Phil Race) Date: Mon, 6 Dec 2021 17:54:18 GMT Subject: RFR: 8277868: Use Comparable.compare() instead of surrogate code [v2] In-Reply-To: References: Message-ID: On Mon, 29 Nov 2021 08:18:47 GMT, ?????? ??????? wrote: >> Instead of something like >> >> long x; >> long y; >> return (x < y) ? -1 : ((x == y) ? 0 : 1); >> >> we can use `return Long.compare(x, y);` >> >> All replacements are done with IDE. > > ?????? ??????? has updated the pull request incrementally with one additional commit since the last revision: > > 8277868: Use Integer.signum() in BasicTableUI src/java.desktop/share/classes/java/awt/geom/Line2D.java line 115: > 113: */ > 114: public double getX1() { > 115: return x1; What do these changes have to do with the subject of the PR ? src/java.desktop/share/classes/sun/java2d/Spans.java line 322: > 320: float otherStart = otherSpan.getStart(); > 321: > 322: return Float.compare(mStart, otherStart); We don't need the variable any more, do we ? ------------- PR: https://git.openjdk.java.net/jdk/pull/6575 From duke at openjdk.java.net Mon Dec 6 17:54:41 2021 From: duke at openjdk.java.net (ANUPAM DEV) Date: Mon, 6 Dec 2021 17:54:41 GMT Subject: RFR: 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList [v2] In-Reply-To: References: Message-ID: > The documentation for following methods used object equality mentioning 'equals()'. I have replaced the equals() with == operator where necessary with some formattings. > > sun.awt.util.IdentityLinkedList#contains > sun.awt.util.IdentityArrayList#contains > sun.awt.util.IdentityArrayList#indexOf > sun.awt.util.IdentityArrayList#lastIndexOf > sun.awt.util.IdentityArrayList#remove(java.lang.Object) > > Kindly review the change. ANUPAM DEV has updated the pull request incrementally with one additional commit since the last revision: Update src/java.desktop/share/classes/sun/awt/util/IdentityLinkedList.java Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6710/files - new: https://git.openjdk.java.net/jdk/pull/6710/files/46a065c4..1bd337ac Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6710&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6710&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/6710.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6710/head:pull/6710 PR: https://git.openjdk.java.net/jdk/pull/6710 From prr at openjdk.java.net Mon Dec 6 17:57:14 2021 From: prr at openjdk.java.net (Phil Race) Date: Mon, 6 Dec 2021 17:57:14 GMT Subject: RFR: JDK-8276447 Deprecate finalization-related methods for removal [v3] In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 19:23:59 GMT, Brent Christian wrote: >> Here are the code changes for the "Deprecate finalizers in the standard Java API" portion of JEP 421 ("Deprecate Finalization for Removal") for code review. >> >> This change makes the indicated deprecations, and updates the API spec for JEP 421. It also updates the relevant @SuppressWarning annotations. >> >> The CSR has been approved. >> An automated test build+test run passes cleanly (FWIW :D ). > > Brent Christian has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 33 commits: > > - Merge branch 'master' into 8276447 > - Merge branch 'master' into 8276447 > - merge > - @SuppressWarnings(removal) in Windows CKey.java > - Add jls tag to runFinalization methods > - Update wording of Object.finalize, new paragraph is now bold > - update Object.finalize javadoc > - update Object.finalize JavaDoc and @deprecated tag > - Update Object.finalize deprecation message > - Indicate that runFinalizers does nothing if finalization is disabled or removed > - ... and 23 more: https://git.openjdk.java.net/jdk/compare/0dfb3a70...8cde0674 Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6465 From aivanov at openjdk.java.net Mon Dec 6 18:45:11 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 6 Dec 2021 18:45:11 GMT Subject: RFR: 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList [v2] In-Reply-To: References: Message-ID: On Mon, 6 Dec 2021 17:54:41 GMT, ANUPAM DEV wrote: >> The documentation for following methods used object equality mentioning 'equals()'. I have replaced the equals() with == operator where necessary with some formattings. >> >> sun.awt.util.IdentityLinkedList#contains >> sun.awt.util.IdentityArrayList#contains >> sun.awt.util.IdentityArrayList#indexOf >> sun.awt.util.IdentityArrayList#lastIndexOf >> sun.awt.util.IdentityArrayList#remove(java.lang.Object) >> >> Kindly review the change. > > ANUPAM DEV has updated the pull request incrementally with one additional commit since the last revision: > > Update src/java.desktop/share/classes/sun/awt/util/IdentityLinkedList.java > > Co-authored-by: Alexey Ivanov <70774172+aivanov-jdk at users.noreply.github.com> Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6710 From duke at openjdk.java.net Mon Dec 6 18:50:17 2021 From: duke at openjdk.java.net (ANUPAM DEV) Date: Mon, 6 Dec 2021 18:50:17 GMT Subject: Integrated: 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList In-Reply-To: References: Message-ID: On Sat, 4 Dec 2021 03:07:03 GMT, ANUPAM DEV wrote: > The documentation for following methods used object equality mentioning 'equals()'. I have replaced the equals() with == operator where necessary with some formattings. > > sun.awt.util.IdentityLinkedList#contains > sun.awt.util.IdentityArrayList#contains > sun.awt.util.IdentityArrayList#indexOf > sun.awt.util.IdentityArrayList#lastIndexOf > sun.awt.util.IdentityArrayList#remove(java.lang.Object) > > Kindly review the change. This pull request has now been integrated. Changeset: 239362da Author: ANUPAM DEV Committer: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/239362da51e70b9e968cb488b7c2ec9d91c32837 Stats: 19 lines in 2 files changed: 8 ins; 0 del; 11 mod 8247973: Javadoc incorrect for IdentityArrayList, IdentityLinkedList Reviewed-by: aivanov, prr ------------- PR: https://git.openjdk.java.net/jdk/pull/6710 From aivanov at openjdk.java.net Mon Dec 6 19:03:17 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 6 Dec 2021 19:03:17 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs In-Reply-To: <_yyT1DE1iec1ea6SsjCE-wT6fBrkBrws9Co61mbukNs=.572220ae-c3a4-4363-864a-bcfcc51c0e73@github.com> References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> <70BX5SXk_YBwACbsXf3aMS4KytQQoxkwNhXuuRgOYgo=.4e15bbad-05b2-456a-965d-b9c20b9c6303@github.com> <_yyT1DE1iec1ea6SsjCE-wT6fBrkBrws9Co61mbukNs=.572220ae-c3a4-4363-864a-bcfcc51c0e73@github.com> Message-ID: On Mon, 6 Dec 2021 17:21:34 GMT, Phil Race wrote: >> src/java.desktop/share/classes/javax/swing/table/TableCellEditor.java line 35: >> >>> 33: * This interface defines the method any object that would like to be >>> 34: * an editor of values for the component JTable that >>> 35: * needs to implement. >> >> Suggestion: >> >> * an editor of values for the {@code JTable} component needs to implement. >> >> _?that?_ after `JTable` shouldn't be there. >> >> However, I would suggest rephrasing the Javadoc to make it easier to understand: the sentence has two levels of dependent clauses. > > I'm not sure this fix is going in the right direction. Isn't the doc saying that if you want to use one of these components as the cell of a JTable it should implement this interface ? > And the problem with JListBox is that it is actually just called JList ? As I read it, the interface `TableCellEditor` adds the `getTableCellEditorComponent` method to the generic `CellEditor` interface. There's also `TreeCellEditor` interface which adds `getTreeCellEditorComponent` specifically for `JTree`. This one has a cleaner [Javadoc](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/tree/TreeCellEditor.html): > Adds to CellEditor the extensions necessary to configure an editor in a tree. The `TableCellEditor` interface should say something similar. ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From aivanov at openjdk.java.net Mon Dec 6 19:13:12 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 6 Dec 2021 19:13:12 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs In-Reply-To: References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> <70BX5SXk_YBwACbsXf3aMS4KytQQoxkwNhXuuRgOYgo=.4e15bbad-05b2-456a-965d-b9c20b9c6303@github.com> <_yyT1DE1iec1ea6SsjCE-wT6fBrkBrws9Co61mbukNs=.572220ae-c3a4-4363-864a-bcfcc51c0e73@github.com> Message-ID: On Mon, 6 Dec 2021 19:00:32 GMT, Alexey Ivanov wrote: >> I'm not sure this fix is going in the right direction. Isn't the doc saying that if you want to use one of these components as the cell of a JTable it should implement this interface ? >> And the problem with JListBox is that it is actually just called JList ? > > As I read it, the interface `TableCellEditor` adds the `getTableCellEditorComponent` method to the generic `CellEditor` interface. > > There's also `TreeCellEditor` interface which adds `getTreeCellEditorComponent` specifically for `JTree`. This one has a cleaner [Javadoc](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/tree/TreeCellEditor.html): > >> Adds to CellEditor the extensions necessary to configure an editor in a tree. > > The `TableCellEditor` interface should say something similar. Currently, the Javadoc says, ??that would like to be an editor of values _for components_ such as JListBox, JComboBox, JTree, or JTable?? Yet the interface adds a method which is relevant for `JTable` only. `JList` has no cell editor. `JComboBox` uses its own `ComboBoxEditor` interface, and `JTree` uses `TreeCellEditor`. So, I think we're in the right direction. ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From darcy at openjdk.java.net Mon Dec 6 19:35:17 2021 From: darcy at openjdk.java.net (Joe Darcy) Date: Mon, 6 Dec 2021 19:35:17 GMT Subject: RFR: 8278251: Enable "missing-explicit-ctor" check in the jdk.unsupported.desktop module In-Reply-To: <4f-QfTpojcbsiww5G7DrU7daNRNW0scSjxsPOUODdTo=.c578c7b1-2f75-4734-ae75-9c1a5c3214f4@github.com> References: <4f-QfTpojcbsiww5G7DrU7daNRNW0scSjxsPOUODdTo=.c578c7b1-2f75-4734-ae75-9c1a5c3214f4@github.com> Message-ID: On Fri, 3 Dec 2021 20:55:23 GMT, Sergey Bylokhov wrote: > The "missing-explicit-ctor" check was disabled by the [JDK-8071961](https://bugs.openjdk.java.net/browse/JDK-8071961) and later was fixed by the [JDK-8250853](https://bugs.openjdk.java.net/browse/JDK-8250853). So we can re-enable this check again. > > The fix will remove the "Java.gmk" file and as a result the "jdk.unsupported.desktop" folder. > > All "Pre-submit tests" builds are green. Not a reviewer for this particular change, but I support its goals. ------------- PR: https://git.openjdk.java.net/jdk/pull/6708 From bchristi at openjdk.java.net Mon Dec 6 20:41:43 2021 From: bchristi at openjdk.java.net (Brent Christian) Date: Mon, 6 Dec 2021 20:41:43 GMT Subject: RFR: JDK-8276447 Deprecate finalization-related methods for removal [v4] In-Reply-To: References: Message-ID: > Here are the code changes for the "Deprecate finalizers in the standard Java API" portion of JEP 421 ("Deprecate Finalization for Removal") for code review. > > This change makes the indicated deprecations, and updates the API spec for JEP 421. It also updates the relevant @SuppressWarning annotations. > > The CSR has been approved. > An automated test build+test run passes cleanly (FWIW :D ). Brent Christian has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 34 commits: - Merge branch 'master' into 8276447 - Merge branch 'master' into 8276447 - Merge branch 'master' into 8276447 - merge - @SuppressWarnings(removal) in Windows CKey.java - Add jls tag to runFinalization methods - Update wording of Object.finalize, new paragraph is now bold - update Object.finalize javadoc - update Object.finalize JavaDoc and @deprecated tag - Update Object.finalize deprecation message - ... and 24 more: https://git.openjdk.java.net/jdk/compare/ea8d3c92...0a983d51 ------------- Changes: https://git.openjdk.java.net/jdk/pull/6465/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6465&range=03 Stats: 194 lines in 62 files changed: 54 ins; 38 del; 102 mod Patch: https://git.openjdk.java.net/jdk/pull/6465.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6465/head:pull/6465 PR: https://git.openjdk.java.net/jdk/pull/6465 From aivanov at openjdk.java.net Mon Dec 6 21:52:16 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 6 Dec 2021 21:52:16 GMT Subject: RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits [v3] In-Reply-To: References: <8No3mHp1lnZqHb2ptNIhnqk0By-nvY_ziROsgwiw5vo=.8461c16a-f88d-40de-ae2f-c3af16aad281@github.com> <_p_UCYxPb7a8sImvlIBHWSywpCU4fh7Vht2KJniHhFo=.2d0a9c43-b8ca-44d6-b86e-1f4f45e123d2@github.com> Message-ID: On Sat, 4 Dec 2021 19:29:37 GMT, Alexey Ivanov wrote: >>> Can't we call it explicitly in the case where colorBits == NULL? >> >> I would use the default handlers for bad_alloc since they can be changed in feature and keeping code that is intended to be used in two places is usually not a good idea. >> >>> Alternatively, since you don't use the macros for try and catch, you can re-arrange code and perform cleanup after the catch-block. Just an idea? It may not work. >> >> That might require a lot of code reformatting and the benefits are unclear. > >> > Alternatively, since you don't use the macros for try and catch, you can re-arrange code and perform cleanup after the catch-block. Just an idea? It may not work. >> >> That might require a lot of code reformatting and the benefits are unclear. > > I tried it, it doesn't, [see this diff](https://github.com/aivanov-jdk/jdk/commit/ccf7500cf0e4614b12c0882204a81d928fce0a82). It's close to your latest code, however, there's only one `catch` that handles both allocations and there are no `if`'s inside the `try`-block. What about this approach? [Compared to master](https://github.com/openjdk/jdk/compare/master...aivanov-jdk:8277299-bad-alloc-w32) [Compared to your latest code](https://github.com/azuev-java/jdk/compare/JDK-8277299...aivanov-jdk:8277299-bad-alloc-w32) I think it's cleaner in the use of exceptions. Each try-block allocates memory that it uses and frees it before the catch-block. There's no need for if's: if exception is thrown, the memory wasn't allocated, therefore the memory is freed only if no exception is thrown. What do you think? ------------- PR: https://git.openjdk.java.net/jdk/pull/6473 From achung at openjdk.java.net Mon Dec 6 21:54:13 2021 From: achung at openjdk.java.net (Alisen Chung) Date: Mon, 6 Dec 2021 21:54:13 GMT Subject: RFR: 8190264: JScrollBar ignores its border when using macOS Mac OS X Aqua look and feel [v4] In-Reply-To: References: Message-ID: On Fri, 3 Dec 2021 19:13:08 GMT, Sergey Bylokhov wrote: >> You can render directly to the BufferedImage instead of the JFrame, so in this case, it will not be necessary to use a robot, you will be able to check the pixel directly. > > For example, you can take a look at the JButtonPaintNPE or TestBadBreak tests. In the TestBadBreak example, how do you know it's properly painting onto the final BufferedImage? When I try the same it doesn't seem to be painting anything on the BufferedImage, so there's no colors to compare. ------------- PR: https://git.openjdk.java.net/jdk/pull/6374 From aivanov at openjdk.java.net Mon Dec 6 22:27:23 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 6 Dec 2021 22:27:23 GMT Subject: RFR: 8190264: JScrollBar ignores its border when using macOS Mac OS X Aqua look and feel [v7] In-Reply-To: <29otHmFYbrgY0zuOeXw2NFz5V2Q0YZIKu18THN1yGPQ=.3ca8bf18-8c44-402c-a971-eece3da26c4c@github.com> References: <29otHmFYbrgY0zuOeXw2NFz5V2Q0YZIKu18THN1yGPQ=.3ca8bf18-8c44-402c-a971-eece3da26c4c@github.com> Message-ID: On Thu, 2 Dec 2021 19:57:54 GMT, Alisen Chung wrote: >> Adjusted the AquaLF scrollbar to account for border inset settings when dragging the thumb and clicking on the track. > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > removed robot mouse moves, use pixel colors to check test/jdk/java/awt/Scrollbar/AquaLFScrollbarTest/ScrollBarBorderTest.java line 89: > 87: public static void main(String[] args) { > 88: ScrollBarBorderTest borderTest = new ScrollBarBorderTest(); > 89: borderTest.createAndShowGUI(); You're using Swing which is not thread-safe. You should create and access Swing components from the Event Dispatch Thread only. ------------- PR: https://git.openjdk.java.net/jdk/pull/6374 From aivanov at openjdk.java.net Mon Dec 6 22:27:23 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 6 Dec 2021 22:27:23 GMT Subject: RFR: 8190264: JScrollBar ignores its border when using macOS Mac OS X Aqua look and feel [v4] In-Reply-To: References: Message-ID: <4Z1J_H2sXmOYQE6yEUjZA0Odux8IZ6a63dWciigvUpo=.81fe0e5e-ea85-4a11-b6f2-0605265f5e00@github.com> On Mon, 6 Dec 2021 21:51:11 GMT, Alisen Chung wrote: > In the TestBadBreak example, how do you know it's properly painting onto the final BufferedImage? When I try the same it doesn't seem to be painting anything on the BufferedImage, so there's no colors to compare. How do you paint the frame into BufferedImage? You may need to set the size of the frame explicitly. There are many tests which paint components to the image. You can also take a look at test/jdk/javax/swing/text/FlowView/6318524/bug6318524.java and test/jdk/javax/swing/text/ParagraphView/6364882/bug6364882.java. Each of these two provides an option to save the BufferedImage to a file. ------------- PR: https://git.openjdk.java.net/jdk/pull/6374 From achung at openjdk.java.net Mon Dec 6 22:45:37 2021 From: achung at openjdk.java.net (Alisen Chung) Date: Mon, 6 Dec 2021 22:45:37 GMT Subject: RFR: 8190264: JScrollBar ignores its border when using macOS Mac OS X Aqua look and feel [v8] In-Reply-To: References: Message-ID: > Adjusted the AquaLF scrollbar to account for border inset settings when dragging the thumb and clicking on the track. Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: need to fix comparison of BufferedImages ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6374/files - new: https://git.openjdk.java.net/jdk/pull/6374/files/52edbf4e..24575e58 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6374&range=07 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6374&range=06-07 Stats: 105 lines in 1 file changed: 46 ins; 41 del; 18 mod Patch: https://git.openjdk.java.net/jdk/pull/6374.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6374/head:pull/6374 PR: https://git.openjdk.java.net/jdk/pull/6374 From achung at openjdk.java.net Mon Dec 6 23:04:13 2021 From: achung at openjdk.java.net (Alisen Chung) Date: Mon, 6 Dec 2021 23:04:13 GMT Subject: RFR: 8190264: JScrollBar ignores its border when using macOS Mac OS X Aqua look and feel [v4] In-Reply-To: <4Z1J_H2sXmOYQE6yEUjZA0Odux8IZ6a63dWciigvUpo=.81fe0e5e-ea85-4a11-b6f2-0605265f5e00@github.com> References: <4Z1J_H2sXmOYQE6yEUjZA0Odux8IZ6a63dWciigvUpo=.81fe0e5e-ea85-4a11-b6f2-0605265f5e00@github.com> Message-ID: On Mon, 6 Dec 2021 22:21:26 GMT, Alexey Ivanov wrote: > How do you paint the frame into BufferedImage? You may need to set the size of the frame explicitly. I'm overriding the paintComponent method of JPanel to instead directly paint onto a BufferedImage that I passed in, similar to the TestBadBreak example. I pushed what I have so far, but it seems like the BufferedImage is blank ------------- PR: https://git.openjdk.java.net/jdk/pull/6374 From aivanov at openjdk.java.net Mon Dec 6 23:26:14 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 6 Dec 2021 23:26:14 GMT Subject: RFR: 8190264: JScrollBar ignores its border when using macOS Mac OS X Aqua look and feel [v4] In-Reply-To: References: <4Z1J_H2sXmOYQE6yEUjZA0Odux8IZ6a63dWciigvUpo=.81fe0e5e-ea85-4a11-b6f2-0605265f5e00@github.com> Message-ID: On Mon, 6 Dec 2021 23:01:05 GMT, Alisen Chung wrote: >>> In the TestBadBreak example, how do you know it's properly painting onto the final BufferedImage? When I try the same it doesn't seem to be painting anything on the BufferedImage, so there's no colors to compare. >> >> How do you paint the frame into BufferedImage? >> You may need to set the size of the frame explicitly. >> >> There are many tests which paint components to the image. You can also take a look at test/jdk/javax/swing/text/FlowView/6318524/bug6318524.java and test/jdk/javax/swing/text/ParagraphView/6364882/bug6364882.java. Each of these two provides an option to save the BufferedImage to a file. > >> How do you paint the frame into BufferedImage? > You may need to set the size of the frame explicitly. > > I'm overriding the paintComponent method of JPanel to instead directly paint onto a BufferedImage that I passed in, similar to the TestBadBreak example. > > I pushed what I have so far, but it seems like the BufferedImage is blank The image is blank because this method is never called. `TestBadBreak` relies on the frame being shown, it adds the component into the frame and shows the frame to capture what's painted. You don't add the `panel` into the frame, therefore it's never painted. Try to paint into the image directly, after you configured the panel, that is after `panel.add(scrollBar);`, call: Graphics2D graphics2D = image.createGraphics(); panel.paint(graphics2D); graphics2D.dispose(); Then you can analyse the colour of pixels on the image just like you do now with robot. ------------- PR: https://git.openjdk.java.net/jdk/pull/6374 From serb at openjdk.java.net Tue Dec 7 00:22:23 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 7 Dec 2021 00:22:23 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v5] In-Reply-To: References: Message-ID: On Thu, 2 Dec 2021 06:27:01 GMT, Liam Miller-Cushon wrote: >> This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). > > Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision: > > Add uninstallColorsAndFont I think it is fine, need to run the tests for the change since it can uncover some hidden issues. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From cushon at openjdk.java.net Tue Dec 7 05:03:27 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Tue, 7 Dec 2021 05:03:27 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v6] In-Reply-To: References: Message-ID: > This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). Liam Miller-Cushon has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: - Add uninstallColorsAndFont - 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy ------------- Changes: https://git.openjdk.java.net/jdk/pull/6603/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6603&range=05 Stats: 64 lines in 28 files changed: 58 ins; 4 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/6603.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6603/head:pull/6603 PR: https://git.openjdk.java.net/jdk/pull/6603 From duke at openjdk.java.net Tue Dec 7 05:24:17 2021 From: duke at openjdk.java.net (Tejesh R) Date: Tue, 7 Dec 2021 05:24:17 GMT Subject: RFR: 6462028: MaskFormatter API documentation refers to getDisplayValue In-Reply-To: References: <-SOfUt64IAtAG0_rLAwkmMCCd81ZaPuTuF5ORNYuIOs=.fd151cd5-71c7-4e21-bd62-aeec7d296e76@github.com> <62NcR6AEhkTmMH9YnM_KnoK_quyX1RlSC6nFc-dyg4U=.c078dcec-9805-4004-9d34-6eb4ae1635c7@github.com> Message-ID: <8PTMn3OTqBW5GdNwAT-Um1CGccVLdJZ9Gu1suQDKqxE=.8ae0f73d-7015-44e9-befa-2473833d5be3@github.com> On Mon, 6 Dec 2021 17:16:20 GMT, Phil Race wrote: >> src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java line 103: >> >>> 101: * MaskFormatter formatter = new MaskFormatter("###-####"); >>> 102: * formatter.setPlaceholderCharacter('_'); >>> 103: * formatter.getDisplayValue(tf, "123"); >> >> This code is part of an example, without this line, the following lines of documentation do not make sense. Probably, `getDisplayValue` should be replaced with `valueToString`. You should check that and ensure the sample and the expected output, as discussed in the following sentences, is correct. > > I agree. Simply deleting this line solves nothing. The example needs to be reviewed and the text needs to say something correct and useful. Yeah, I've checked with `valueToString` method, its working fine. I'll replace `getDisplayValue` with `valueToString`? ValueToString takes one parameter which is of Object type. It return the formated value. Sample Code: MaskFormatter formatter = new MaskFormatter("###-##"); formatter.setPlaceholderCharacter('*'); System.out.println(formatter.valueToString("87")); Output: 87*-** ------------- PR: https://git.openjdk.java.net/jdk/pull/6556 From duke at openjdk.java.net Tue Dec 7 08:19:22 2021 From: duke at openjdk.java.net (=?UTF-8?B?0KHQtdGA0LPQtdC5?= =?UTF-8?B?IA==?= =?UTF-8?B?0KbRi9C/0LDQvdC+0LI=?=) Date: Tue, 7 Dec 2021 08:19:22 GMT Subject: RFR: 8277868: Use Comparable.compare() instead of surrogate code [v2] In-Reply-To: References: Message-ID: On Mon, 6 Dec 2021 17:46:22 GMT, Phil Race wrote: >> ?????? ??????? has updated the pull request incrementally with one additional commit since the last revision: >> >> 8277868: Use Integer.signum() in BasicTableUI > > src/java.desktop/share/classes/java/awt/geom/Line2D.java line 115: > >> 113: */ >> 114: public double getX1() { >> 115: return x1; > > What do these changes have to do with the subject of the PR ? Just a tiny clean-up in on of affected files. Do you want this to be reverted? ------------- PR: https://git.openjdk.java.net/jdk/pull/6575 From duke at openjdk.java.net Tue Dec 7 08:28:47 2021 From: duke at openjdk.java.net (=?UTF-8?B?0KHQtdGA0LPQtdC5?= =?UTF-8?B?IA==?= =?UTF-8?B?0KbRi9C/0LDQvdC+0LI=?=) Date: Tue, 7 Dec 2021 08:28:47 GMT Subject: RFR: 8277868: Use Comparable.compare() instead of surrogate code [v3] In-Reply-To: References: Message-ID: > Instead of something like > > long x; > long y; > return (x < y) ? -1 : ((x == y) ? 0 : 1); > > we can use `return Long.compare(x, y);` > > All replacements are done with IDE. ?????? ??????? has updated the pull request incrementally with one additional commit since the last revision: 8277868: Inline local var ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6575/files - new: https://git.openjdk.java.net/jdk/pull/6575/files/6744a562..1b3a5d4b Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6575&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6575&range=01-02 Stats: 3 lines in 1 file changed: 0 ins; 2 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/6575.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6575/head:pull/6575 PR: https://git.openjdk.java.net/jdk/pull/6575 From duke at openjdk.java.net Tue Dec 7 08:54:13 2021 From: duke at openjdk.java.net (=?UTF-8?B?0KHQtdGA0LPQtdC5?= =?UTF-8?B?IA==?= =?UTF-8?B?0KbRi9C/0LDQvdC+0LI=?=) Date: Tue, 7 Dec 2021 08:54:13 GMT Subject: RFR: 8277868: Use Comparable.compare() instead of surrogate code [v2] In-Reply-To: References: Message-ID: On Mon, 6 Dec 2021 17:48:37 GMT, Phil Race wrote: >> ?????? ??????? has updated the pull request incrementally with one additional commit since the last revision: >> >> 8277868: Use Integer.signum() in BasicTableUI > > src/java.desktop/share/classes/sun/java2d/Spans.java line 322: > >> 320: float otherStart = otherSpan.getStart(); >> 321: >> 322: return Float.compare(mStart, otherStart); > > We don't need the variable any more, do we ? inlined ------------- PR: https://git.openjdk.java.net/jdk/pull/6575 From jdv at openjdk.java.net Tue Dec 7 09:48:13 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Tue, 7 Dec 2021 09:48:13 GMT Subject: RFR: 8272392 Lanai: SwingSet2. Black background on expanding tree node [v2] In-Reply-To: References: Message-ID: On Fri, 3 Dec 2021 15:39:12 GMT, Alexey Ushakov wrote: > > I used test case present in https://bugs.openjdk.java.net/browse/JDK-8267963 to check how it behaves with this PR and noticed that it is causes regresssion related to how ruler text looks and also if we move Ruler between monitors it doesnt draw. > > Thought this may be because of state's not getting reset since there is mismatch in EncoderManager.reset() arguments. Updated code to add isText argument over this PR, but i continue to see the regressions. > > @jayathirthrao could you please provide some more info about your environment. I cannot reproduce the problems that you've reported with the test from JDK-8267963. Strange that i am not seeing the issue i noticed last week in my system. SwingSet2, J2DDemo and Font2DTest are not showing any regressions. I am running some tests with Metal API validation. If tests are green i will approve. @aghaisas also wants to run some tests on discrete graphics, so lets wait for his approval also. ------------- PR: https://git.openjdk.java.net/jdk/pull/6529 From myano at openjdk.java.net Tue Dec 7 11:09:18 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Tue, 7 Dec 2021 11:09:18 GMT Subject: RFR: 8275715: D3D pipeline processes multiple PaintEvent at initial drawing [v2] In-Reply-To: References: <-hj0v7RZ0HPpP9GND5csZsZ1Vz7oxaufOAC0-ZygtwM=.6a5ae7a8-52d6-4e3e-a166-2fae2c23dbe0@github.com> <2rBhm1b2wZwnJFYIve6hdNLHFE0iAkGbj1GkDkSOUCs=.726e6e6a-76b6-4657-b44b-dd854769055c@github.com> Message-ID: On Thu, 18 Nov 2021 00:02:30 GMT, Sergey Bylokhov wrote: >> @mrserb Can I hope this fix will be integrated after JDK-8270874 is fixed? > > Yes. @mrserb Could you please check this pull request? ------------- PR: https://git.openjdk.java.net/jdk/pull/6064 From aivanov at openjdk.java.net Tue Dec 7 12:01:16 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 7 Dec 2021 12:01:16 GMT Subject: RFR: 6462028: MaskFormatter API documentation refers to getDisplayValue In-Reply-To: <8PTMn3OTqBW5GdNwAT-Um1CGccVLdJZ9Gu1suQDKqxE=.8ae0f73d-7015-44e9-befa-2473833d5be3@github.com> References: <-SOfUt64IAtAG0_rLAwkmMCCd81ZaPuTuF5ORNYuIOs=.fd151cd5-71c7-4e21-bd62-aeec7d296e76@github.com> <62NcR6AEhkTmMH9YnM_KnoK_quyX1RlSC6nFc-dyg4U=.c078dcec-9805-4004-9d34-6eb4ae1635c7@github.com> <8PTMn3OTqBW5GdNwAT-Um1CGccVLdJZ9Gu1suQDKqxE=.8ae0f73d-7015-44e9-befa-2473833d5be3@github.com> Message-ID: On Tue, 7 Dec 2021 05:20:42 GMT, Tejesh R wrote: >> I agree. Simply deleting this line solves nothing. The example needs to be reviewed and the text needs to say something correct and useful. > > Yeah, I've checked with `valueToString` method, its working fine. I'll replace `getDisplayValue` with `valueToString`? ValueToString takes one parameter which is of Object type. It return the formated value. > Sample Code: > MaskFormatter formatter = new MaskFormatter("###-##"); > formatter.setPlaceholderCharacter('*'); > System.out.println(formatter.valueToString("87")); > > Output: > 87*-** Yes, this will make the example correct. This sample code demonstrates what is discussed in the docs: MaskFormatter formatter = new MaskFormatter("###-####"); formatter.setPlaceholderCharacter('_'); System.out.println(formatter.valueToString("123")); formatter = new MaskFormatter("###-####"); formatter.setPlaceholderCharacter('*'); formatter.setPlaceholder("555-1212"); System.out.println(formatter.valueToString("123")); and produces the output: 123-____ 123-1212 which perfectly aligns with the documentation. ------------- PR: https://git.openjdk.java.net/jdk/pull/6556 From aivanov at openjdk.java.net Tue Dec 7 12:28:17 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 7 Dec 2021 12:28:17 GMT Subject: RFR: 8277868: Use Comparable.compare() instead of surrogate code [v3] In-Reply-To: References: Message-ID: On Tue, 7 Dec 2021 08:28:47 GMT, ?????? ??????? wrote: >> Instead of something like >> >> long x; >> long y; >> return (x < y) ? -1 : ((x == y) ? 0 : 1); >> >> we can use `return Long.compare(x, y);` >> >> All replacements are done with IDE. > > ?????? ??????? has updated the pull request incrementally with one additional commit since the last revision: > > 8277868: Inline local var src/java.base/share/classes/java/util/Calendar.java line 3420: > 3418: private int compareTo(long t) { > 3419: long thisTime = getMillisOf(this); > 3420: return Long.compare(thisTime, t); Probably, in this case `thisTime` variable can also be dropped. src/java.base/share/classes/java/util/Date.java line 977: > 975: long thisTime = getMillisOf(this); > 976: long anotherTime = getMillisOf(anotherDate); > 977: return Long.compare(thisTime, anotherTime); Looks like local variables can also be dropped here as each value is used once. src/java.base/share/classes/java/util/UUID.java line 517: > 515: return (this.mostSigBits < val.mostSigBits ? -1 : > 516: (this.mostSigBits > val.mostSigBits ? 1 : > 517: Long.compare(this.leastSigBits, val.leastSigBits))); In this case Javadoc specifies only -1, 0 or 1 can be returned. `Long.compare` does not specify this but returns these values. Couldn't it cause any problems in the future if implementation of `Long.compare` is changed? Does it make sense to use `Long.compare` for `mostSigBits` too? int mostSigBits = Long.compare(this.mostSigBits, val.mostSigBits); return mostSigBits != 0 ? mostSigBits : Long.compare(this.leastSigBits, val.leastSigBits); ------------- PR: https://git.openjdk.java.net/jdk/pull/6575 From aivanov at openjdk.java.net Tue Dec 7 12:28:17 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 7 Dec 2021 12:28:17 GMT Subject: RFR: 8277868: Use Comparable.compare() instead of surrogate code [v2] In-Reply-To: References: Message-ID: <9S_GeeZQl7DEU-sc0rPTWTs-rECNOmwEQRsj-zMotqU=.4f156b22-5909-4451-8652-9af749bb288f@github.com> On Tue, 7 Dec 2021 08:16:08 GMT, ?????? ??????? wrote: >> src/java.desktop/share/classes/java/awt/geom/Line2D.java line 115: >> >>> 113: */ >>> 114: public double getX1() { >>> 115: return x1; >> >> What do these changes have to do with the subject of the PR ? > > Just a tiny clean-up in on of affected files. Do you want this to be reverted? I believe it makes to preserve the cast: the fields are of type `float` and explicit cast hints there's a type conversion. ------------- PR: https://git.openjdk.java.net/jdk/pull/6575 From duke at openjdk.java.net Tue Dec 7 14:39:46 2021 From: duke at openjdk.java.net (=?UTF-8?B?0KHQtdGA0LPQtdC5?= =?UTF-8?B?IA==?= =?UTF-8?B?0KbRi9C/0LDQvdC+0LI=?=) Date: Tue, 7 Dec 2021 14:39:46 GMT Subject: RFR: 8277868: Use Comparable.compare() instead of surrogate code [v4] In-Reply-To: References: Message-ID: <6H721EvqNvo4S4PAIRiqFgVtORHDFVjUW_nQ3LJIdvM=.685ca0ab-0ba9-4501-9e4e-6de9ca93be51@github.com> > Instead of something like > > long x; > long y; > return (x < y) ? -1 : ((x == y) ? 0 : 1); > > we can use `return Long.compare(x, y);` > > All replacements are done with IDE. ?????? ??????? has updated the pull request incrementally with two additional commits since the last revision: - 8277868: Revert irrelevant changes - 8277868: Inline local vars ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6575/files - new: https://git.openjdk.java.net/jdk/pull/6575/files/1b3a5d4b..bb06bf2f Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6575&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6575&range=02-03 Stats: 9 lines in 3 files changed: 0 ins; 3 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/6575.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6575/head:pull/6575 PR: https://git.openjdk.java.net/jdk/pull/6575 From duke at openjdk.java.net Tue Dec 7 14:39:51 2021 From: duke at openjdk.java.net (=?UTF-8?B?0KHQtdGA0LPQtdC5?= =?UTF-8?B?IA==?= =?UTF-8?B?0KbRi9C/0LDQvdC+0LI=?=) Date: Tue, 7 Dec 2021 14:39:51 GMT Subject: RFR: 8277868: Use Comparable.compare() instead of surrogate code [v3] In-Reply-To: References: Message-ID: On Tue, 7 Dec 2021 12:01:27 GMT, Alexey Ivanov wrote: >> ?????? ??????? has updated the pull request incrementally with one additional commit since the last revision: >> >> 8277868: Inline local var > > src/java.base/share/classes/java/util/Calendar.java line 3420: > >> 3418: private int compareTo(long t) { >> 3419: long thisTime = getMillisOf(this); >> 3420: return Long.compare(thisTime, t); > > Probably, in this case `thisTime` variable can also be dropped. Inlined > src/java.base/share/classes/java/util/Date.java line 977: > >> 975: long thisTime = getMillisOf(this); >> 976: long anotherTime = getMillisOf(anotherDate); >> 977: return Long.compare(thisTime, anotherTime); > > Looks like local variables can also be dropped here as each value is used once. Inlined ------------- PR: https://git.openjdk.java.net/jdk/pull/6575 From prr at openjdk.java.net Thu Dec 9 17:57:48 2021 From: prr at openjdk.java.net (Phil Race) Date: Thu, 9 Dec 2021 17:57:48 GMT Subject: RFR: 8278456: Define jtreg jdk_desktop test group time-based sub-tasks for use by headful testing. Message-ID: Define part1/part2/part3 for client jtreg tests as done for some other areas See the bug report for some numbers on the potential benefits of this for faster testing. ------------- Commit messages: - 8278456: Define jtreg jdk_desktop test group time-based sub-tasks for use by headful testing. Changes: https://git.openjdk.java.net/jdk/pull/6784/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6784&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278456 Stats: 23 lines in 1 file changed: 17 ins; 0 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/6784.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6784/head:pull/6784 PR: https://git.openjdk.java.net/jdk/pull/6784 From serb at openjdk.java.net Thu Dec 9 18:49:14 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 9 Dec 2021 18:49:14 GMT Subject: RFR: 8278456: Define jtreg jdk_desktop test group time-based sub-tasks for use by headful testing. In-Reply-To: References: Message-ID: On Thu, 9 Dec 2021 17:49:00 GMT, Phil Race wrote: > Define part1/part2/part3 for client jtreg tests as done for some other areas > See the bug report for some numbers on the potential benefits of this for faster testing. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6784 From aivanov at openjdk.java.net Thu Dec 9 20:06:15 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 9 Dec 2021 20:06:15 GMT Subject: RFR: 8278456: Define jtreg jdk_desktop test group time-based sub-tasks for use by headful testing. In-Reply-To: References: Message-ID: On Thu, 9 Dec 2021 17:49:00 GMT, Phil Race wrote: > Define part1/part2/part3 for client jtreg tests as done for some other areas > See the bug report for some numbers on the potential benefits of this for faster testing. Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6784 From serb at openjdk.java.net Thu Dec 9 22:53:41 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 9 Dec 2021 22:53:41 GMT Subject: RFR: 8276819: javax/print/PrintServiceLookup/FlushCustomClassLoader.java fails to free Message-ID: This is an attempt to make the FlushCustomClassLoader more stable. I cannot reproduce this bug so added some improvement blindly, based on assumption that the test may fail on the slow/overloaded system. * The attempt limitation was removed, but the test execution time decreased to 1 minute * For each attempt the generation of OOM was added to make sure that the GC was triggered ------------- Commit messages: - Update FlushCustomClassLoader.java Changes: https://git.openjdk.java.net/jdk/pull/6778/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6778&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8276819 Stats: 9 lines in 1 file changed: 3 ins; 4 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/6778.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6778/head:pull/6778 PR: https://git.openjdk.java.net/jdk/pull/6778 From serb at openjdk.java.net Fri Dec 10 00:57:17 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 10 Dec 2021 00:57:17 GMT Subject: RFR: 8274893: Update java.desktop classes to use try-with-resources [v4] In-Reply-To: <4-SKWxMIwTELnjjaNtCMiLopBp2n1-vpCPnEl4Gst6s=.e04c81b2-d0ed-4366-9b5b-f3eac4a660a5@github.com> References: <_2AOzxRXvyozC4AbdieYrNLVEsNdnYJBLM3ExBBpIsA=.a82484c7-8ece-4233-a965-634e9e867cb7@github.com> <4-SKWxMIwTELnjjaNtCMiLopBp2n1-vpCPnEl4Gst6s=.e04c81b2-d0ed-4366-9b5b-f3eac4a660a5@github.com> Message-ID: On Tue, 23 Nov 2021 20:52:40 GMT, Andrey Turbanov wrote: >> 8274893: Update java.desktop classes to use try-with-resources > > Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: > > 8274893: Update java.desktop classes to use try-with-resources > close nested streams too to unify code Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5817 From serb at openjdk.java.net Fri Dec 10 03:18:37 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 10 Dec 2021 03:18:37 GMT Subject: RFR: 8273101: Eliminate the usage of threadgroup sandboxing in the java.util.logging [v2] In-Reply-To: References: Message-ID: > At the time Java supported applets and webstart, a special mechanism for launching various applications in one JVM was used to reduce memory usage and each application was isolated from each other. > > This isolation was implemented via ThreadGroups where each application created its own thread group and all data for the application was stored in the context of its own group. > > Some parts of the JDK used ThreadGroups directly, others used special classes like sun.awt.AppContext. > > Such sandboxing became useless since the plugin and webstart are no longer supported and were removed in jdk11. > > Note that this is just a first step for the overall cleanup, here is my plan: > 1. Cleanup the usage of AppContext in the ?java.util.logging.LogManager" class in the java.base module. > 2. Cleanup the usage of TheadGroup in the JavaSound > 3. Cleanup the usage of TheadGroup in the JavaBeans > 4. Cleanup the usage of AppContext in the Swing > 5. Cleanup the usage of AppContext in the AWT > 6. Delete the AppContext class. > > The current PR is for the first step. So this is the request to delete the usage of AppContext in the LogManager and related tests. > > Tested by tier1/tier2/tier3 and jdk_desktop tests. Sergey Bylokhov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains four commits: - Merge branch 'master' into JDK-8273101 - Some tests deleted - Update the RootLevelInConfigFile test - Initial version of JDK-8273101 ------------- Changes: https://git.openjdk.java.net/jdk/pull/5326/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5326&range=01 Stats: 1423 lines in 10 files changed: 0 ins; 1418 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/5326.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/5326/head:pull/5326 PR: https://git.openjdk.java.net/jdk/pull/5326 From psadhukhan at openjdk.java.net Fri Dec 10 04:24:14 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 10 Dec 2021 04:24:14 GMT Subject: RFR: 8278456: Define jtreg jdk_desktop test group time-based sub-tasks for use by headful testing. In-Reply-To: References: Message-ID: On Thu, 9 Dec 2021 17:49:00 GMT, Phil Race wrote: > Define part1/part2/part3 for client jtreg tests as done for some other areas > See the bug report for some numbers on the potential benefits of this for faster testing. test/jdk/TEST.groups line 414: > 412: java/awt/Modal \ > 413: java/awt/datatransfer \ > 414: java/awt/Window I am not sure I understand why we need to run java/awt/Component, java/awt/Modal, java/awt/datatransfer, java/awt/Window in part_2 and part_3...Will it not be duplication of run of tests (as jdk_desktop is supposed to run all part1,2,3)? ------------- PR: https://git.openjdk.java.net/jdk/pull/6784 From prr at openjdk.java.net Fri Dec 10 04:45:15 2021 From: prr at openjdk.java.net (Phil Race) Date: Fri, 10 Dec 2021 04:45:15 GMT Subject: RFR: 8278456: Define jtreg jdk_desktop test group time-based sub-tasks for use by headful testing. In-Reply-To: References: Message-ID: <3thjwv495pxm1nAb_C4wVmN1BkT4AhYAdaBsV0nNHa4=.7ed9b0f2-4e55-4af8-a109-7d5d7a0a4e50@github.com> On Fri, 10 Dec 2021 04:20:33 GMT, Prasanta Sadhukhan wrote: >> Define part1/part2/part3 for client jtreg tests as done for some other areas >> See the bug report for some numbers on the potential benefits of this for faster testing. > > test/jdk/TEST.groups line 414: > >> 412: java/awt/Modal \ >> 413: java/awt/datatransfer \ >> 414: java/awt/Window > > I am not sure I understand why we need to run java/awt/Component, java/awt/Modal, java/awt/datatransfer, java/awt/Window in part_2 and part_3...Will it not be duplication of run of tests (as jdk_desktop is supposed to run all part1,2,3)? We aren't. the "-" means it is excluded. ------------- PR: https://git.openjdk.java.net/jdk/pull/6784 From psadhukhan at openjdk.java.net Fri Dec 10 04:53:14 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 10 Dec 2021 04:53:14 GMT Subject: RFR: 8278456: Define jtreg jdk_desktop test group time-based sub-tasks for use by headful testing. In-Reply-To: References: Message-ID: On Thu, 9 Dec 2021 17:49:00 GMT, Phil Race wrote: > Define part1/part2/part3 for client jtreg tests as done for some other areas > See the bug report for some numbers on the potential benefits of this for faster testing. Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6784 From psadhukhan at openjdk.java.net Fri Dec 10 04:53:16 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 10 Dec 2021 04:53:16 GMT Subject: RFR: 8278456: Define jtreg jdk_desktop test group time-based sub-tasks for use by headful testing. In-Reply-To: <3thjwv495pxm1nAb_C4wVmN1BkT4AhYAdaBsV0nNHa4=.7ed9b0f2-4e55-4af8-a109-7d5d7a0a4e50@github.com> References: <3thjwv495pxm1nAb_C4wVmN1BkT4AhYAdaBsV0nNHa4=.7ed9b0f2-4e55-4af8-a109-7d5d7a0a4e50@github.com> Message-ID: On Fri, 10 Dec 2021 04:42:07 GMT, Phil Race wrote: >> test/jdk/TEST.groups line 414: >> >>> 412: java/awt/Modal \ >>> 413: java/awt/datatransfer \ >>> 414: java/awt/Window >> >> I am not sure I understand why we need to run java/awt/Component, java/awt/Modal, java/awt/datatransfer, java/awt/Window in part_2 and part_3...Will it not be duplication of run of tests (as jdk_desktop is supposed to run all part1,2,3)? > > We aren't. the "-" means it is excluded. ok...Thanks for the clarification.. Probably we could do the same for javax/swing instead of running in its entirety.. ------------- PR: https://git.openjdk.java.net/jdk/pull/6784 From duke at openjdk.java.net Fri Dec 10 07:55:15 2021 From: duke at openjdk.java.net (duke) Date: Fri, 10 Dec 2021 07:55:15 GMT Subject: Withdrawn: 8275165 : ProblemList InterpolationQualityTest.java In-Reply-To: <9gURgNbbZoa-8XRoDtrga0WI0E-9Eb7-CHeBlMDiYho=.ba41750d-a7bc-4535-879e-052919ad3cbd@github.com> References: <9gURgNbbZoa-8XRoDtrga0WI0E-9Eb7-CHeBlMDiYho=.ba41750d-a7bc-4535-879e-052919ad3cbd@github.com> Message-ID: On Wed, 13 Oct 2021 17:02:03 GMT, lawrence.andrews wrote: > InterpolationQualityTest.java test fails consistently on windows 10 hence adding it in the problemList. > > @shurymury This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/5930 From myano at openjdk.java.net Fri Dec 10 09:08:43 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Fri, 10 Dec 2021 09:08:43 GMT Subject: RFR: 8277463: JFileChooser with Metal L&F doesn't show non-canonical UNC path in - Look in Message-ID: I would like to fix the bug reported in JDK-8277463. As reporter's investigation, ShellFolder.getNormalizedFile() returns incorrect value for non-canonical Windows UNC path. getNormalizedFile() is used for symbolic link path, but Windows environment does not handle symbolic link. And, getCanonicalFile() returns correct path for a directory link in Windows which is made with `mklink` command. So getNormalizedFile() should perform to return getCanonicalFile() like WindowsFileChooserUI.addItem() at Windows environment. ------------- Commit messages: - 8277463: JFileChooser with Metal L&F doesn't show non-canonical UNC path in - Look in Changes: https://git.openjdk.java.net/jdk/pull/6796/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6796&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8277463 Stats: 128 lines in 2 files changed: 127 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/6796.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6796/head:pull/6796 PR: https://git.openjdk.java.net/jdk/pull/6796 From psadhukhan at openjdk.java.net Fri Dec 10 10:11:12 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 10 Dec 2021 10:11:12 GMT Subject: RFR: 8277463: JFileChooser with Metal L&F doesn't show non-canonical UNC path in - Look in In-Reply-To: References: Message-ID: On Fri, 10 Dec 2021 08:59:55 GMT, Masanori Yano wrote: > I would like to fix the bug reported in JDK-8277463. > > As reporter's investigation, ShellFolder.getNormalizedFile() returns incorrect value for non-canonical Windows UNC path. getNormalizedFile() is used for symbolic link path, but Windows environment does not handle symbolic link. And, getCanonicalFile() returns correct path for a directory link in Windows which is made with `mklink` command. So getNormalizedFile() should perform to return getCanonicalFile() like WindowsFileChooserUI.addItem() at Windows environment. I am not able to reproduce the issue even without the fix. How did you reproduce? I tried "\\\< mypcname>\dir.." and I could see "Documents" folder in "Look In" combobox of filechooser..It supposed to be empty for bug to be reproduced.. If I put in \\\< mypcname> in Windows Run prompt, I get no folder btw so no "dir" is present in my \\\< mypcname> folder actually and it does not allow me to create one in that \\\< mypcname> folder ------------- PR: https://git.openjdk.java.net/jdk/pull/6796 From psadhukhan at openjdk.java.net Fri Dec 10 10:11:15 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 10 Dec 2021 10:11:15 GMT Subject: RFR: 8276819: javax/print/PrintServiceLookup/FlushCustomClassLoader.java fails to free In-Reply-To: References: Message-ID: On Thu, 9 Dec 2021 02:47:48 GMT, Sergey Bylokhov wrote: > This is an attempt to make the FlushCustomClassLoader more stable. I cannot reproduce this bug so added some improvement blindly, based on assumption that the test may fail on the slow/overloaded system. > > * The attempt limitation was removed, but the test execution time decreased to 1 minute > * For each attempt the generation of OOM was added to make sure that the GC was triggered Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6778 From aivanov at openjdk.java.net Fri Dec 10 13:57:14 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 10 Dec 2021 13:57:14 GMT Subject: RFR: 8276819: javax/print/PrintServiceLookup/FlushCustomClassLoader.java fails to free In-Reply-To: References: Message-ID: On Thu, 9 Dec 2021 02:47:48 GMT, Sergey Bylokhov wrote: > This is an attempt to make the FlushCustomClassLoader more stable. I cannot reproduce this bug so added some improvement blindly, based on assumption that the test may fail on the slow/overloaded system. > > * The attempt limitation was removed, but the test execution time decreased to 1 minute > * For each attempt the generation of OOM was added to make sure that the GC was triggered Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6778 From kcr at openjdk.java.net Fri Dec 10 15:41:16 2021 From: kcr at openjdk.java.net (Kevin Rushforth) Date: Fri, 10 Dec 2021 15:41:16 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v6] In-Reply-To: References: Message-ID: On Tue, 7 Dec 2021 05:03:27 GMT, Liam Miller-Cushon wrote: >> This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). > > Liam Miller-Cushon 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 two additional commits since the last revision: > > - Add uninstallColorsAndFont > - 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy This adds public methods, which will need discussion on the client-libs mailing list, and requires a CSR. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From kcr at openjdk.java.net Fri Dec 10 15:44:17 2021 From: kcr at openjdk.java.net (Kevin Rushforth) Date: Fri, 10 Dec 2021 15:44:17 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v3] In-Reply-To: References: <_vz3JjOjXjatc2N63LFHgHSzMz2e8i26nbjEQ6FAVyo=.abef7fb9-34fa-49b7-86d1-b3f4a5fb21b2@github.com> Message-ID: On Thu, 2 Dec 2021 06:23:28 GMT, Liam Miller-Cushon wrote: >>> I'm not sure I understand, aren't these being installed in `BasicPanelUI`? >> >> If it is installs in the BasicListUI only then yes the fix belongs to this class. These properties changing also in some other classes as well, but some other classes cleanup it properly for example see BasicListUI.uninstallDefaults(), but I am not sure that all of them do this. > >> These properties changing also in some other classes as well, but some other classes cleanup it properly for example see BasicListUI.uninstallDefaults(), but I am not sure that all of them do this. > > I looked through other uses of `installColorsAndFont`, and most of them don't seem to be uninstalling the properties. I updated the ones I found, and added a `uninstallColorsAndFont` method to avoid copying the logic around. @cushon As a best practice, please do not force push to a branch for which there is an PR under review. Instead, you can merge the master branch into your branch if you need to update. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From cushon at openjdk.java.net Fri Dec 10 16:33:15 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Fri, 10 Dec 2021 16:33:15 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v6] In-Reply-To: References: Message-ID: <8UMnNv-iJ3Jmsd9wEAK-znj7AbBvtBk8fVe4Uof819Q=.b0e09cb7-1e05-44cb-9938-b988957dab69@github.com> On Tue, 7 Dec 2021 05:03:27 GMT, Liam Miller-Cushon wrote: >> This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). > > Liam Miller-Cushon has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: > > - Add uninstallColorsAndFont > - 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy I started a thread on client-libs-dev and filed a CSR: https://bugs.openjdk.java.net/browse/JDK-8278555 ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From aivanov at openjdk.java.net Fri Dec 10 16:33:18 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 10 Dec 2021 16:33:18 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v6] In-Reply-To: References: Message-ID: On Tue, 7 Dec 2021 05:03:27 GMT, Liam Miller-Cushon wrote: >> This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). > > Liam Miller-Cushon has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: > > - Add uninstallColorsAndFont > - 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy src/java.desktop/share/classes/javax/swing/LookAndFeel.java line 199: > 197: * @throws NullPointerException if {@code c} is {@code null} > 198: */ > 199: public static void uninstallColors(JComponent c) { It's a new method, `@since 19` should be added. src/java.desktop/share/classes/javax/swing/LookAndFeel.java line 247: > 245: * @throws NullPointerException if {@code c} is {@code null} > 246: */ > 247: public static void uninstallColorsAndFont(JComponent c) { Should also have `@since 19`. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From cushon at openjdk.java.net Fri Dec 10 16:40:52 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Fri, 10 Dec 2021 16:40:52 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v7] In-Reply-To: References: Message-ID: > This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision: Add @since 19 to new methods ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6603/files - new: https://git.openjdk.java.net/jdk/pull/6603/files/02ae7fba..10b53ea2 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6603&range=06 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6603&range=05-06 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/6603.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6603/head:pull/6603 PR: https://git.openjdk.java.net/jdk/pull/6603 From cushon at openjdk.java.net Fri Dec 10 16:40:57 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Fri, 10 Dec 2021 16:40:57 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v6] In-Reply-To: References: Message-ID: On Fri, 10 Dec 2021 16:09:40 GMT, Alexey Ivanov wrote: >> Liam Miller-Cushon has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: >> >> - Add uninstallColorsAndFont >> - 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy > > src/java.desktop/share/classes/javax/swing/LookAndFeel.java line 199: > >> 197: * @throws NullPointerException if {@code c} is {@code null} >> 198: */ >> 199: public static void uninstallColors(JComponent c) { > > It's a new method, `@since 19` should be added. Done, thanks > src/java.desktop/share/classes/javax/swing/LookAndFeel.java line 247: > >> 245: * @throws NullPointerException if {@code c} is {@code null} >> 246: */ >> 247: public static void uninstallColorsAndFont(JComponent c) { > > Should also have `@since 19`. Done ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From aivanov at openjdk.java.net Fri Dec 10 16:45:17 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 10 Dec 2021 16:45:17 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v7] In-Reply-To: References: Message-ID: On Fri, 10 Dec 2021 16:40:52 GMT, Liam Miller-Cushon wrote: >> This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). > > Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision: > > Add @since 19 to new methods @mrserb mentioned `BasicListUI.uninstallDefaults` uninstalls the colors correctly. However, with the new methods added, it could use `LookAndFeel.uninstallColorsAndFont` to reset its font, foreground and background. Probably other UI classes should be updated too. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From cushon at openjdk.java.net Fri Dec 10 16:54:44 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Fri, 10 Dec 2021 16:54:44 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v8] In-Reply-To: References: Message-ID: > This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision: Use LookAndFeel.uninstallColorsAndFont in BasicListUI ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6603/files - new: https://git.openjdk.java.net/jdk/pull/6603/files/10b53ea2..48a02633 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6603&range=07 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6603&range=06-07 Stats: 9 lines in 1 file changed: 0 ins; 8 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/6603.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6603/head:pull/6603 PR: https://git.openjdk.java.net/jdk/pull/6603 From cushon at openjdk.java.net Fri Dec 10 17:03:49 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Fri, 10 Dec 2021 17:03:49 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v9] In-Reply-To: References: Message-ID: <49gYRPX_QAzZcEsFovkzHbBn2I28lXo-3fYDHmYSUD0=.cf6525da-c24b-406f-ad90-2eabcbd840c3@github.com> > This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision: Add a few more missing calls to LookAndFeel.uninstallColors ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6603/files - new: https://git.openjdk.java.net/jdk/pull/6603/files/48a02633..7e3b3a19 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6603&range=08 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6603&range=07-08 Stats: 8 lines in 4 files changed: 8 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/6603.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6603/head:pull/6603 PR: https://git.openjdk.java.net/jdk/pull/6603 From cushon at openjdk.java.net Fri Dec 10 17:03:51 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Fri, 10 Dec 2021 17:03:51 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v7] In-Reply-To: References: Message-ID: On Fri, 10 Dec 2021 16:41:56 GMT, Alexey Ivanov wrote: >> Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision: >> >> Add @since 19 to new methods > > @mrserb mentioned `BasicListUI.uninstallDefaults` uninstalls the colors correctly. However, with the new methods added, it could use `LookAndFeel.uninstallColorsAndFont` to reset its font, foreground and background. > > Probably other UI classes should be updated too. @aivanov-jdk thanks, I updated `BasicListUI`. I found a few other cases with the following, which I have fixed: $ find src/java.desktop/share/ -type f -name '*.java' | xargs grep -l LookAndFeel.installColors | xargs grep -L LookAndFeel.uninstallColors The remaining files that call `LookAndFeel.installColors*` with a corresponding `uninstall*` call are below. This reference in javadoc seems fine: https://github.com/openjdk/jdk/blob/8eb453baebe377697286f7eb32280ca9f1fd7775/src/java.desktop/share/classes/javax/swing/plaf/synth/SynthSpinnerUI.java#L116 This may be suspicious, but it isn't in an `install` method: https://github.com/openjdk/jdk/blob/8eb453baebe377697286f7eb32280ca9f1fd7775/src/java.desktop/share/classes/sun/swing/FilePane.java#L1295 ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From vdyakov at openjdk.java.net Fri Dec 10 17:28:16 2021 From: vdyakov at openjdk.java.net (Victor Dyakov) Date: Fri, 10 Dec 2021 17:28:16 GMT Subject: RFR: 8275843: Random crashes while the UI code is executed In-Reply-To: References: Message-ID: On Mon, 1 Nov 2021 20:03:42 GMT, Sergey Bylokhov wrote: > Please take a look to one more wagon in this train: > [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795)->[JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931)->[JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579)->[JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392)->[Current issue](https://bugs.openjdk.java.net/browse/JDK-8275843). > > #### The short description: > > We have an inconsistent between xrender java code and the x11 window. The java code thinks that all our windows support only two types of color models: IntRgbX11 and IntArgbPreX11, but the x11 window supports more types. If such inconsistency occurs we render some garbage, or just crash since our "blits" will assume the wrong data layout. This issue was reported and fixed [before](http://hg.openjdk.java.net/jdk/jdk/rev/c53905e7dc57) but it was not realized why the rendering was wrong and that it can cause a crash. The fix is similar to the old one. > > #### The long description: > > * Once upon a time this bug was filed [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) it was about the rendering of colors to the volatile image, the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8176795?focusedCommentId=14138323&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14138323) In short: the volatile images in the xrender use intArgbPre color model, it means that the SunGraphics2D object [convert](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1753) the argb value to the argbPre before passing it to the pipeline, and the xrender pipeline [convert](http://hg.openjdk.java.net/jdk/jdk/rev/e4b03365ddbf) this value to the argbPre one more time -> double-conversion-> the bug is reproduced. The fix for that bug disabled the second conversion in the xrender. but it does not take into account that this code path is u sed for rendering to the ARGB X11 window where the shared code does not convert the color, so the next bug was filed. > * The second bug is [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931), the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8204931?focusedCommentId=14199800&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14199800). In short the bug was about rendering directly to the window and missing color conversion removed previously. The fix for that bug changed the surface type used by the window, so the shared code start to convert the color from ARGB to argbPre, but it does not take into account that we do not control the color model of the window, see how many of them we actually [support](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/unix/classes/sun/java2d/x11/X11SurfaceData.java#L501) Also note in the link above that if we do not recognize the type we do not fallback to something but throw InvalidPipeException, this is because the blits(and other primitives) may use t his type to access the data directly. So the next bug was reported: > * This is the third issue [JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579). The fix for that issue tried to roll back the previous one but does not take into account that the conversion removed by the first issue should be rollback as well, so the last bug was filed. > * The "last" issue is [JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392) rollback the previous one. So the bug reported in the third report come back. > > #### Fix description > > The fix for the current issue contains a few parts: > * Rollback of the [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931) so we will use the proper surface data for the window. > * Return conversion in the xrender pipeline removed by the [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) So we will convert it when we render to the volatile image(argbPre) and to the window(argb). We need to convert in both cases since the xrender API which we use expects the argbPre colors. > * Start to use the [eargb](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1752) value( instead of pixel) stored in the SunGraphics2D so we did not get the double conversion. > > Some tests are updated and one more is added. > > ### Note > I have checked the performance implication of this change and it looks like after this change the sequence window.setvisible(true)/window.dispose() will work 30% faster, this may affect the tests which does not wait enough time to make the window visible. Probably this is the reason why some of our tests became more stable at some point in jdk11. > > > I have tested this by the jck and jdk_desktop tests. But any additional verification/testing is welcome. @azvegint please review ------------- PR: https://git.openjdk.java.net/jdk/pull/6199 From aivanov at openjdk.java.net Fri Dec 10 17:31:13 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 10 Dec 2021 17:31:13 GMT Subject: RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits [v5] In-Reply-To: References: Message-ID: On Tue, 7 Dec 2021 19:52:50 GMT, Alexander Zuev wrote: >> Made colorBits and maskBits arrays dynamic so they are allocated on heap instead of stack. >> Added regression test. > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Reformat the code getting rid of the sectnd try block I admit I prefer the 2nd version with two try-catch blocks better because it avoids using if's completely. Anyway, this version looks good to me. Thanks. src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp line 1083: > 1081: maskBits = (long*)safe_Malloc(MAX_ICON_SIZE * MAX_ICON_SIZE * sizeof(long)); > 1082: > 1083: GetDIBits(dc, iconInfo.hbmMask, 0, iconSize, maskBits, &bmi, DIB_RGB_COLORS); Probably the empty lines here aren't necessary. ------------- Marked as reviewed by aivanov (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/6473 From kizune at openjdk.java.net Fri Dec 10 19:49:47 2021 From: kizune at openjdk.java.net (Alexander Zuev) Date: Fri, 10 Dec 2021 19:49:47 GMT Subject: [jdk18] RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits Message-ID: Made colorBits and maskBits arraus dynamic so they allocated on heap instead of stack. Added regression test. ------------- Commit messages: - A8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits Changes: https://git.openjdk.java.net/jdk18/pull/12/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk18&pr=12&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8277299 Stats: 83 lines in 2 files changed: 58 ins; 0 del; 25 mod Patch: https://git.openjdk.java.net/jdk18/pull/12.diff Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/12/head:pull/12 PR: https://git.openjdk.java.net/jdk18/pull/12 From kizune at openjdk.java.net Fri Dec 10 19:49:47 2021 From: kizune at openjdk.java.net (Alexander Zuev) Date: Fri, 10 Dec 2021 19:49:47 GMT Subject: [jdk18] RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits In-Reply-To: References: Message-ID: On Fri, 10 Dec 2021 19:43:26 GMT, Alexander Zuev wrote: > Made colorBits and maskBits arraus dynamic so they allocated on heap instead of stack. > Added regression test. @aivanov-jdk please review, this is the same fix as was reviewed on the mainline but with extra spaces removed. ------------- PR: https://git.openjdk.java.net/jdk18/pull/12 From aivanov at openjdk.java.net Fri Dec 10 20:23:13 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 10 Dec 2021 20:23:13 GMT Subject: [jdk18] RFR: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits In-Reply-To: References: Message-ID: On Fri, 10 Dec 2021 19:43:26 GMT, Alexander Zuev wrote: > Made colorBits and maskBits arraus dynamic so they allocated on heap instead of stack. > Added regression test. Marked as reviewed by aivanov (Reviewer). This review continues from the [mainline one](https://github.com/openjdk/jdk/pull/6473). ------------- PR: https://git.openjdk.java.net/jdk18/pull/12 From kizune at openjdk.java.net Fri Dec 10 20:30:18 2021 From: kizune at openjdk.java.net (Alexander Zuev) Date: Fri, 10 Dec 2021 20:30:18 GMT Subject: [jdk18] Integrated: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits In-Reply-To: References: Message-ID: On Fri, 10 Dec 2021 19:43:26 GMT, Alexander Zuev wrote: > Made colorBits and maskBits arraus dynamic so they allocated on heap instead of stack. > Added regression test. This pull request has now been integrated. Changeset: 94127f43 Author: Alexander Zuev URL: https://git.openjdk.java.net/jdk18/commit/94127f43a4a28a89094fa93cd1da49763134f9db Stats: 83 lines in 2 files changed: 58 ins; 0 del; 25 mod 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits Reviewed-by: aivanov ------------- PR: https://git.openjdk.java.net/jdk18/pull/12 From prr at openjdk.java.net Fri Dec 10 20:58:11 2021 From: prr at openjdk.java.net (Phil Race) Date: Fri, 10 Dec 2021 20:58:11 GMT Subject: RFR: 8278456: Define jtreg jdk_desktop test group time-based sub-tasks for use by headful testing. In-Reply-To: References: <3thjwv495pxm1nAb_C4wVmN1BkT4AhYAdaBsV0nNHa4=.7ed9b0f2-4e55-4af8-a109-7d5d7a0a4e50@github.com> Message-ID: On Fri, 10 Dec 2021 04:46:50 GMT, Prasanta Sadhukhan wrote: >> We aren't. the "-" means it is excluded. > > ok...Thanks for the clarification.. > Probably we could do the same for javax/swing instead of running in its entirety.. There is no point. The entire jdk_swing group runs in far less time than that. ------------- PR: https://git.openjdk.java.net/jdk/pull/6784 From prr at openjdk.java.net Fri Dec 10 21:07:17 2021 From: prr at openjdk.java.net (Phil Race) Date: Fri, 10 Dec 2021 21:07:17 GMT Subject: Integrated: 8278456: Define jtreg jdk_desktop test group time-based sub-tasks for use by headful testing. In-Reply-To: References: Message-ID: On Thu, 9 Dec 2021 17:49:00 GMT, Phil Race wrote: > Define part1/part2/part3 for client jtreg tests as done for some other areas > See the bug report for some numbers on the potential benefits of this for faster testing. This pull request has now been integrated. Changeset: 81c56c70 Author: Phil Race URL: https://git.openjdk.java.net/jdk/commit/81c56c700a47c7f1b7855052de17eb88fac84674 Stats: 23 lines in 1 file changed: 17 ins; 0 del; 6 mod 8278456: Define jtreg jdk_desktop test group time-based sub-tasks for use by headful testing. Reviewed-by: serb, aivanov, psadhukhan ------------- PR: https://git.openjdk.java.net/jdk/pull/6784 From aivanov at openjdk.java.net Fri Dec 10 21:14:11 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 10 Dec 2021 21:14:11 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v9] In-Reply-To: <49gYRPX_QAzZcEsFovkzHbBn2I28lXo-3fYDHmYSUD0=.cf6525da-c24b-406f-ad90-2eabcbd840c3@github.com> References: <49gYRPX_QAzZcEsFovkzHbBn2I28lXo-3fYDHmYSUD0=.cf6525da-c24b-406f-ad90-2eabcbd840c3@github.com> Message-ID: <42DMSPIok6eoDpX7B8nQG_B60O-s-bOPFUYi1fIH44I=.8afa5359-4611-4ec2-a521-23640faffd3b@github.com> On Fri, 10 Dec 2021 17:03:49 GMT, Liam Miller-Cushon wrote: >> This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). > > Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision: > > Add a few more missing calls to LookAndFeel.uninstallColors I've been contemplating about what is being done in this PR? It feels wrong. > > As of the usefulness of the serializations tests in Swing - it is a good coverage of the cleaning code in the L&fs. Each L&F should clean all its data when the app switch one LF to another, but if old L&F forget to cleanup then the app will get a memory leak. Swing explicitly warns, ?Serialized objects of this class will not be compatible with future Swing releases.? Don't break this rule in this test? A component is serialized using one version of the JDK and is deserialized in another version of the JDK and even on another platform. > This test doesn't switch L&Fs .. if it wasn't for mac defaulting to Aqua they'd all be using Metal. > > So _this is an accidental by-product_, not the goal of the test. It looks so. If the L&Fs are expected to clean up when uninstalled, it should be tested thoroughly for all the components and Look-and-Feels. Only this way we can be sure the properties get reset. While working on this code review, Liam has found and fixed quite a few places where clean-up wasn't done properly. > And that goal be met by the test writing out the serialized objects and reading them back all at "test time", can't it ? > > Seems to me right now we are stumbling over cases where what is serialized is inappropriate for persistent serialization. Taking into account the above comments, this test could be simplified to write out the objects and then read them in. No persistent serialization which is _explicitly_ unsupported. To be clear, I think the proposed change is good on its own: it adds convenience methods to clean up UI properties when a L&F is uninstalled, it adds the clean-up where it was missing. But it doesn't fit into the fix of this test failure. This work should be an enhancement performed under another bugid. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From prr at openjdk.java.net Fri Dec 10 21:41:12 2021 From: prr at openjdk.java.net (Phil Race) Date: Fri, 10 Dec 2021 21:41:12 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v9] In-Reply-To: <49gYRPX_QAzZcEsFovkzHbBn2I28lXo-3fYDHmYSUD0=.cf6525da-c24b-406f-ad90-2eabcbd840c3@github.com> References: <49gYRPX_QAzZcEsFovkzHbBn2I28lXo-3fYDHmYSUD0=.cf6525da-c24b-406f-ad90-2eabcbd840c3@github.com> Message-ID: On Fri, 10 Dec 2021 17:03:49 GMT, Liam Miller-Cushon wrote: >> This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). > > Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision: > > Add a few more missing calls to LookAndFeel.uninstallColors Whilst there might well be some need to do something to make sure uninstallUI() is doing its job entirely/properly, I am not sure that I'd want to push such a change as the resolution to this failing test. Better to start afresh with a new bug with an appropriate synopsis and then write some new tests that verify the UI is uninstalled on all the Swing components as you cycle though available L&Fs per-platform. And since the problem clearly exists in older versions of JDK (even if not exposed by the recent change in JDK 18), then how would we resolve it there since clearly the new API can't be backported. And perhaps new API isn't actually needed ? Are there other options ? And as I wrote before, the failing test is not 100% valid since Swing's specification says : "Warning: Serialized objects of this class will not be compatible with future Swing releases. The current serialization support is appropriate for short term storage or RMI between applications running the same version of Swing." "Same version" could be interpreted as "Swing in JDK N", or "Swing in JDK N on 'specific platform'" But either way, it isn't valid to check in a serialized form from Swing version N and have *any* expectation that it will run on N+1, which is what this test does. Yes, it can be argued that this test can/will fail even between platforms on the same version, but (1) I'm questioning whether even that serialization was intended and (2) the test is not limiting itself to that scenario. I did not understand the "special JDK" answer as to why this test needs to have a checked in serialized form on disk at all. If we can't do that, I think we should scrap the test or find a different way to do whatever it intends to verify. We should not be treating it as a test of uninstalling UI - it is a mere accident that this cropped up. I see Alexey wrote much the same above .. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From kizune at openjdk.java.net Sat Dec 11 08:24:13 2021 From: kizune at openjdk.java.net (Alexander Zuev) Date: Sat, 11 Dec 2021 08:24:13 GMT Subject: Withdrawn: 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits In-Reply-To: References: Message-ID: On Fri, 19 Nov 2021 06:34:30 GMT, Alexander Zuev wrote: > Made colorBits and maskBits arrays dynamic so they are allocated on heap instead of stack. > Added regression test. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/6473 From dcubed at openjdk.java.net Sat Dec 11 15:05:30 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sat, 11 Dec 2021 15:05:30 GMT Subject: RFR: 8278580: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64 Message-ID: A trivial fix to ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64. ------------- Commit messages: - 8278580: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64 Changes: https://git.openjdk.java.net/jdk/pull/6805/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6805&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278580 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/6805.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6805/head:pull/6805 PR: https://git.openjdk.java.net/jdk/pull/6805 From dfuchs at openjdk.java.net Sat Dec 11 15:37:13 2021 From: dfuchs at openjdk.java.net (Daniel Fuchs) Date: Sat, 11 Dec 2021 15:37:13 GMT Subject: RFR: 8278580: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64 In-Reply-To: References: Message-ID: On Sat, 11 Dec 2021 14:56:23 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64. LGTM ------------- Marked as reviewed by dfuchs (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/6805 From jdv at openjdk.java.net Sat Dec 11 15:37:13 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Sat, 11 Dec 2021 15:37:13 GMT Subject: RFR: 8278580: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64 In-Reply-To: References: Message-ID: <3qxLkgEYe9MNEjw4xPU-EDyHpyKPOZ1JPZIsdSOiuWc=.295c1304-aa07-486b-be25-6c31eaab9452@github.com> On Sat, 11 Dec 2021 14:56:23 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64. Marked as reviewed by jdv (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6805 From dcubed at openjdk.java.net Sat Dec 11 15:37:13 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sat, 11 Dec 2021 15:37:13 GMT Subject: RFR: 8278580: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64 In-Reply-To: References: Message-ID: On Sat, 11 Dec 2021 14:56:23 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64. I just realized that I did this ProblemListing in the wrong repo. ------------- PR: https://git.openjdk.java.net/jdk/pull/6805 From dcubed at openjdk.java.net Sat Dec 11 15:37:13 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sat, 11 Dec 2021 15:37:13 GMT Subject: Withdrawn: 8278580: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64 In-Reply-To: References: Message-ID: On Sat, 11 Dec 2021 14:56:23 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/6805 From dcubed at openjdk.java.net Sat Dec 11 15:43:14 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sat, 11 Dec 2021 15:43:14 GMT Subject: RFR: 8278580: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64 In-Reply-To: References: Message-ID: On Sat, 11 Dec 2021 15:29:36 GMT, Daniel Fuchs wrote: >> A trivial fix to ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64. > > LGTM @dfuch and @jayathirthrao - Can you please review this PR instead? Thanks! https://github.com/openjdk/jdk18/pull/13 ------------- PR: https://git.openjdk.java.net/jdk/pull/6805 From dcubed at openjdk.java.net Sat Dec 11 15:52:36 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sat, 11 Dec 2021 15:52:36 GMT Subject: [jdk18] RFR: 8278580: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64 Message-ID: <4uStyfL8U-xmT4oVR6e347jHn6qDxI32zZHrJ2-VPv8=.87709800-cb76-47c8-89d6-9013b202b6c4@github.com> A trivial fix to ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64. ------------- Commit messages: - 8278580: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64 Changes: https://git.openjdk.java.net/jdk18/pull/13/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk18&pr=13&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278580 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk18/pull/13.diff Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/13/head:pull/13 PR: https://git.openjdk.java.net/jdk18/pull/13 From alanb at openjdk.java.net Sat Dec 11 15:52:37 2021 From: alanb at openjdk.java.net (Alan Bateman) Date: Sat, 11 Dec 2021 15:52:37 GMT Subject: [jdk18] RFR: 8278580: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64 In-Reply-To: <4uStyfL8U-xmT4oVR6e347jHn6qDxI32zZHrJ2-VPv8=.87709800-cb76-47c8-89d6-9013b202b6c4@github.com> References: <4uStyfL8U-xmT4oVR6e347jHn6qDxI32zZHrJ2-VPv8=.87709800-cb76-47c8-89d6-9013b202b6c4@github.com> Message-ID: On Sat, 11 Dec 2021 15:37:33 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64. Approving to allow Dan exclude this test. ------------- Marked as reviewed by alanb (Reviewer). PR: https://git.openjdk.java.net/jdk18/pull/13 From dcubed at openjdk.java.net Sat Dec 11 15:52:38 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sat, 11 Dec 2021 15:52:38 GMT Subject: [jdk18] RFR: 8278580: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64 In-Reply-To: <4uStyfL8U-xmT4oVR6e347jHn6qDxI32zZHrJ2-VPv8=.87709800-cb76-47c8-89d6-9013b202b6c4@github.com> References: <4uStyfL8U-xmT4oVR6e347jHn6qDxI32zZHrJ2-VPv8=.87709800-cb76-47c8-89d6-9013b202b6c4@github.com> Message-ID: On Sat, 11 Dec 2021 15:37:33 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64. @dfuch and @jayathirthrao - Can you please review this PR instead? Thanks! ------------- PR: https://git.openjdk.java.net/jdk18/pull/13 From dcubed at openjdk.java.net Sat Dec 11 15:57:13 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sat, 11 Dec 2021 15:57:13 GMT Subject: [jdk18] RFR: 8278580: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64 In-Reply-To: References: <4uStyfL8U-xmT4oVR6e347jHn6qDxI32zZHrJ2-VPv8=.87709800-cb76-47c8-89d6-9013b202b6c4@github.com> Message-ID: On Sat, 11 Dec 2021 15:47:28 GMT, Alan Bateman wrote: >> A trivial fix to ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64. > > Approving to allow Dan exclude this test. @AlanBateman - Thanks for the review! ------------- PR: https://git.openjdk.java.net/jdk18/pull/13 From dcubed at openjdk.java.net Sat Dec 11 15:57:14 2021 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Sat, 11 Dec 2021 15:57:14 GMT Subject: [jdk18] Integrated: 8278580: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64 In-Reply-To: <4uStyfL8U-xmT4oVR6e347jHn6qDxI32zZHrJ2-VPv8=.87709800-cb76-47c8-89d6-9013b202b6c4@github.com> References: <4uStyfL8U-xmT4oVR6e347jHn6qDxI32zZHrJ2-VPv8=.87709800-cb76-47c8-89d6-9013b202b6c4@github.com> Message-ID: On Sat, 11 Dec 2021 15:37:33 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64. This pull request has now been integrated. Changeset: 9b99cbe7 Author: Daniel D. Daugherty URL: https://git.openjdk.java.net/jdk18/commit/9b99cbe7abf56d3ad5231a68b6506e35b89133c9 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8278580: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64 Reviewed-by: alanb ------------- PR: https://git.openjdk.java.net/jdk18/pull/13 From duke at openjdk.java.net Sun Dec 12 09:09:09 2021 From: duke at openjdk.java.net (Emmanuel Bourg) Date: Sun, 12 Dec 2021 09:09:09 GMT Subject: RFR: 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? Any reviewer for this? @prrace maybe ? ------------- PR: https://git.openjdk.java.net/jdk/pull/6180 From serb at openjdk.java.net Sun Dec 12 21:51:14 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sun, 12 Dec 2021 21:51:14 GMT Subject: Integrated: 8276819: javax/print/PrintServiceLookup/FlushCustomClassLoader.java fails to free In-Reply-To: References: Message-ID: On Thu, 9 Dec 2021 02:47:48 GMT, Sergey Bylokhov wrote: > This is an attempt to make the FlushCustomClassLoader more stable. I cannot reproduce this bug so added some improvement blindly, based on assumption that the test may fail on the slow/overloaded system. > > * The attempt limitation was removed, but the test execution time decreased to 1 minute > * For each attempt the generation of OOM was added to make sure that the GC was triggered This pull request has now been integrated. Changeset: 7c2c5858 Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/7c2c58587d4eda5523331eae45e7d897252dc097 Stats: 9 lines in 1 file changed: 3 ins; 4 del; 2 mod 8276819: javax/print/PrintServiceLookup/FlushCustomClassLoader.java fails to free Reviewed-by: psadhukhan, aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/6778 From dbatrak at openjdk.java.net Mon Dec 13 08:19:14 2021 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Mon, 13 Dec 2021 08:19:14 GMT Subject: RFR: 8278050: Armenian text isn't rendered on macOS if text layout is performed In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 10:52:38 GMT, Dmitry Batrak wrote: > The problem is related to the implementation of font fallback on macOS, specifically to the path used when text layout > is performed, i.e. the one using `FontSubstitution` and cascade lists. `CTFontCopyDefaultCascadeListForLanguages`'s output contains an entry for the font, able to render Armenian text ('NotoSansArmenian-Regular'), but `CFont.createCompositeFont` cannot find this font amongst registered fonts, and the entry is skipped, resulting in broken rendering. > System font loading (performed by `CFontManager.loadNativeFonts`) relies on `[NSFontManager availableFontFamilies]`, but its output doesn't contain 'Noto Sans Armenian' (which is a family for 'NotoSansArmenian-Regular' font). 'Noto Sans Armenian' is recognized by `[NSFontManager availableMembersOfFontFamily:]` though, 'NotoSansArmenian-Regular' is contained in `[NSFontManager availableFonts]` output, and the font can be created and used normally, just like any other system font. Not sure why its family is 'hidden', maybe macOS developers wanted to limit the number of options > displayed in font selection drop-downs. > For reference, another cascade list item, ignored in similar way is 'NotoSansZawgyi-Regular'. > > Proposed fix is to create `CFont` objects for cascade list items explicitly, if corresponding fonts are not registered. These objects are re-used between different fonts as their fallback components (to enable caching of char-to-glyph mapping), but are not made available to public font APIs. > I've considered an alternative solution - using `[NSFontManager availableFonts]` instead of > `[NSFontManager availableFontFamilies]` to load system fonts. Two factors complicate it though - `loadNativeFonts` will > take more time (on my machine about 170 additional fonts will be loaded) and the order of font loading will change (which > impacts the selection of 'preferred' plain/bold/italic/bolditalic components in `FontFamily` class). Both factors can be > dealt with, but they make the solution more complicated and prone to regressions. For now, it seems not worth it. > > I've not created a test, as it would rely on macOS providing a fallback font for Armenian script, which is not guaranteed. > Existing tests pass fine with the fix. Any chance for a second review? ------------- PR: https://git.openjdk.java.net/jdk/pull/6633 From ant at openjdk.java.net Mon Dec 13 16:56:25 2021 From: ant at openjdk.java.net (Anton Tarasov) Date: Mon, 13 Dec 2021 16:56:25 GMT Subject: RFR: 8278612: test/jdk/java/awt/dnd/RemoveDropTargetCrashTest crashes =?UTF-8?B?d2l0aOKApg==?= Message-ID: ? VoiceOver on macOS ------------- Commit messages: - 8278612: test/jdk/java/awt/dnd/RemoveDropTargetCrashTest crashes with VoiceOver on macOS Changes: https://git.openjdk.java.net/jdk/pull/6816/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6816&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278612 Stats: 13 lines in 2 files changed: 7 ins; 0 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/6816.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6816/head:pull/6816 PR: https://git.openjdk.java.net/jdk/pull/6816 From azvegint at openjdk.java.net Mon Dec 13 17:25:12 2021 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Mon, 13 Dec 2021 17:25:12 GMT Subject: RFR: 8275843: Random crashes while the UI code is executed In-Reply-To: References: Message-ID: On Mon, 1 Nov 2021 20:03:42 GMT, Sergey Bylokhov wrote: > Please take a look to one more wagon in this train: > [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795)->[JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931)->[JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579)->[JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392)->[Current issue](https://bugs.openjdk.java.net/browse/JDK-8275843). > > #### The short description: > > We have an inconsistent between xrender java code and the x11 window. The java code thinks that all our windows support only two types of color models: IntRgbX11 and IntArgbPreX11, but the x11 window supports more types. If such inconsistency occurs we render some garbage, or just crash since our "blits" will assume the wrong data layout. This issue was reported and fixed [before](http://hg.openjdk.java.net/jdk/jdk/rev/c53905e7dc57) but it was not realized why the rendering was wrong and that it can cause a crash. The fix is similar to the old one. > > #### The long description: > > * Once upon a time this bug was filed [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) it was about the rendering of colors to the volatile image, the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8176795?focusedCommentId=14138323&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14138323) In short: the volatile images in the xrender use intArgbPre color model, it means that the SunGraphics2D object [convert](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1753) the argb value to the argbPre before passing it to the pipeline, and the xrender pipeline [convert](http://hg.openjdk.java.net/jdk/jdk/rev/e4b03365ddbf) this value to the argbPre one more time -> double-conversion-> the bug is reproduced. The fix for that bug disabled the second conversion in the xrender. but it does not take into account that this code path is u sed for rendering to the ARGB X11 window where the shared code does not convert the color, so the next bug was filed. > * The second bug is [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931), the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8204931?focusedCommentId=14199800&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14199800). In short the bug was about rendering directly to the window and missing color conversion removed previously. The fix for that bug changed the surface type used by the window, so the shared code start to convert the color from ARGB to argbPre, but it does not take into account that we do not control the color model of the window, see how many of them we actually [support](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/unix/classes/sun/java2d/x11/X11SurfaceData.java#L501) Also note in the link above that if we do not recognize the type we do not fallback to something but throw InvalidPipeException, this is because the blits(and other primitives) may use t his type to access the data directly. So the next bug was reported: > * This is the third issue [JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579). The fix for that issue tried to roll back the previous one but does not take into account that the conversion removed by the first issue should be rollback as well, so the last bug was filed. > * The "last" issue is [JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392) rollback the previous one. So the bug reported in the third report come back. > > #### Fix description > > The fix for the current issue contains a few parts: > * Rollback of the [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931) so we will use the proper surface data for the window. > * Return conversion in the xrender pipeline removed by the [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) So we will convert it when we render to the volatile image(argbPre) and to the window(argb). We need to convert in both cases since the xrender API which we use expects the argbPre colors. > * Start to use the [eargb](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1752) value( instead of pixel) stored in the SunGraphics2D so we did not get the double conversion. > > Some tests are updated and one more is added. > > ### Note > I have checked the performance implication of this change and it looks like after this change the sequence window.setvisible(true)/window.dispose() will work 30% faster, this may affect the tests which does not wait enough time to make the window visible. Probably this is the reason why some of our tests became more stable at some point in jdk11. > > > I have tested this by the jck and jdk_desktop tests. But any additional verification/testing is welcome. I can confirm that testing looks good, however I didn't manage to get is crashed even once before the fix even with updated tests. (on personal, VM or multiple CI runs) How often it fails for you and on what config? src/java.desktop/unix/classes/sun/java2d/xr/XRSurfaceData.java line 403: > 401: SurfaceType sType = null; > 402: > 403: switch (transparency) { Since you are touching this, you might want to fix indent for cases in this switch. ------------- PR: https://git.openjdk.java.net/jdk/pull/6199 From cushon at openjdk.java.net Mon Dec 13 17:57:15 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Mon, 13 Dec 2021 17:57:15 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v9] In-Reply-To: <49gYRPX_QAzZcEsFovkzHbBn2I28lXo-3fYDHmYSUD0=.cf6525da-c24b-406f-ad90-2eabcbd840c3@github.com> References: <49gYRPX_QAzZcEsFovkzHbBn2I28lXo-3fYDHmYSUD0=.cf6525da-c24b-406f-ad90-2eabcbd840c3@github.com> Message-ID: On Fri, 10 Dec 2021 17:03:49 GMT, Liam Miller-Cushon wrote: >> This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). > > Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision: > > Add a few more missing calls to LookAndFeel.uninstallColors > > To be clear, I think the proposed change is good on its own: it adds convenience methods to clean up UI properties when a L&F is uninstalled, it adds the clean-up where it was missing. But it doesn't fit into the fix of this test failure. This work should be an enhancement performed under another bugid. > > Better to start afresh with a new bug with an appropriate synopsis and then write some new tests that verify the UI is uninstalled on all the Swing components as you cycle though available L&Fs per-platform. I have filed https://bugs.openjdk.java.net/browse/JDK-8278620 to track adding test coverage for the `uninstallUI` methods and deciding on the best fix for that issue. > Taking into account the above comments, this test could be simplified to write out the objects and then read them in. No persistent serialization which is explicitly unsupported. > > I think we should scrap the test or find a different way to do whatever it intends to verify. Currently the test relies on making a manual change to `DragGestureEvent` and `DragGestureRecognize` before serializing the objects, so it's not clear to me how the test would be modified to do that at test-time: https://github.com/openjdk/jdk/blob/5a4a9bb9d55134deac0e02cf37f31d1dd2223024/test/jdk/java/awt/dnd/BadSerializationTest/BadSerializationTest.java#L95-L96 I'm happy to update this change to scrap the test if there's agreement that's the best resolution. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From serb at openjdk.java.net Mon Dec 13 20:11:20 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 13 Dec 2021 20:11:20 GMT Subject: RFR: 8278612: test/jdk/java/awt/dnd/RemoveDropTargetCrashTest crashes =?UTF-8?B?d2l0aOKApg==?= In-Reply-To: References: Message-ID: On Mon, 13 Dec 2021 16:50:00 GMT, Anton Tarasov wrote: > ? VoiceOver on macOS src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/TabButtonAccessibility.m line 62: > 60: { > 61: if (fTabGroupAxContext == NULL) { > 62: id parent = [self parent]; Probably we can sanitize all casts to (CommonComponentAccessibility *) via some utility method which will check the type and then cast, so all calling code will get a CommonComponentAccessibility or nil? ------------- PR: https://git.openjdk.java.net/jdk/pull/6816 From serb at openjdk.java.net Mon Dec 13 20:27:19 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 13 Dec 2021 20:27:19 GMT Subject: RFR: 8275843: Random crashes while the UI code is executed In-Reply-To: References: Message-ID: On Mon, 13 Dec 2021 15:42:43 GMT, Alexander Zvegintsev wrote: >> Please take a look to one more wagon in this train: >> [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795)->[JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931)->[JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579)->[JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392)->[Current issue](https://bugs.openjdk.java.net/browse/JDK-8275843). >> >> #### The short description: >> >> We have an inconsistent between xrender java code and the x11 window. The java code thinks that all our windows support only two types of color models: IntRgbX11 and IntArgbPreX11, but the x11 window supports more types. If such inconsistency occurs we render some garbage, or just crash since our "blits" will assume the wrong data layout. This issue was reported and fixed [before](http://hg.openjdk.java.net/jdk/jdk/rev/c53905e7dc57) but it was not realized why the rendering was wrong and that it can cause a crash. The fix is similar to the old one. >> >> #### The long description: >> >> * Once upon a time this bug was filed [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) it was about the rendering of colors to the volatile image, the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8176795?focusedCommentId=14138323&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14138323) In short: the volatile images in the xrender use intArgbPre color model, it means that the SunGraphics2D object [convert](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1753) the argb value to the argbPre before passing it to the pipeline, and the xrender pipeline [convert](http://hg.openjdk.java.net/jdk/jdk/rev/e4b03365ddbf) this value to the argbPre one more time -> double-conversion-> the bug is reproduced. The fix for that bug disabled the second conversion in the xrender. but it does not take into account that this code path is used for rendering to the ARGB X11 window where the shared code does not convert the color, so the next bug was filed. >> * The second bug is [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931), the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8204931?focusedCommentId=14199800&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14199800). In short the bug was about rendering directly to the window and missing color conversion removed previously. The fix for that bug changed the surface type used by the window, so the shared code start to convert the color from ARGB to argbPre, but it does not take into account that we do not control the color model of the window, see how many of them we actually [support](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/unix/classes/sun/java2d/x11/X11SurfaceData.java#L501) Also note in the link above that if we do not recognize the type we do not fallback to something but throw InvalidPipeException, this is because the blits(and other primitives) may use this type to access the data directly. So the next bug was reported: >> * This is the third issue [JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579). The fix for that issue tried to roll back the previous one but does not take into account that the conversion removed by the first issue should be rollback as well, so the last bug was filed. >> * The "last" issue is [JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392) rollback the previous one. So the bug reported in the third report come back. >> >> #### Fix description >> >> The fix for the current issue contains a few parts: >> * Rollback of the [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931) so we will use the proper surface data for the window. >> * Return conversion in the xrender pipeline removed by the [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) So we will convert it when we render to the volatile image(argbPre) and to the window(argb). We need to convert in both cases since the xrender API which we use expects the argbPre colors. >> * Start to use the [eargb](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1752) value( instead of pixel) stored in the SunGraphics2D so we did not get the double conversion. >> >> Some tests are updated and one more is added. >> >> ### Note >> I have checked the performance implication of this change and it looks like after this change the sequence window.setvisible(true)/window.dispose() will work 30% faster, this may affect the tests which does not wait enough time to make the window visible. Probably this is the reason why some of our tests became more stable at some point in jdk11. >> >> >> I have tested this by the jck and jdk_desktop tests. But any additional verification/testing is welcome. > > src/java.desktop/unix/classes/sun/java2d/xr/XRSurfaceData.java line 403: > >> 401: SurfaceType sType = null; >> 402: >> 403: switch (transparency) { > > Since you are touching this, you might want to fix indent for cases in this switch. I can change it, but looks like all switches in the "sun.java2d.xr" use this code style. ------------- PR: https://git.openjdk.java.net/jdk/pull/6199 From serb at openjdk.java.net Mon Dec 13 20:35:15 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 13 Dec 2021 20:35:15 GMT Subject: RFR: 8275843: Random crashes while the UI code is executed In-Reply-To: References: Message-ID: <9Gso5jy9lm0RPqzYT0uJ-HlkZa0Ck7I8DlMR2jbqNo4=.35d6cf70-1781-4ae8-b595-8bcf474bbc0a@github.com> On Mon, 13 Dec 2021 17:22:05 GMT, Alexander Zvegintsev wrote: > How often it fails for you and on what config? I think the easiest way to reproduce the crash is to force the x11 to use some completely different format, like this: Xvfb :1 -screen 0 1920x1080x16 Note the usage of 16 bits depth. The vnc servers could be used as well. In such config the new DrawCustomColorModel.java will crash most of the time(depends on timings) ------------- PR: https://git.openjdk.java.net/jdk/pull/6199 From serb at openjdk.java.net Mon Dec 13 20:46:06 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 13 Dec 2021 20:46:06 GMT Subject: RFR: 8275843: Random crashes while the UI code is executed [v2] In-Reply-To: References: Message-ID: > Please take a look to one more wagon in this train: > [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795)->[JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931)->[JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579)->[JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392)->[Current issue](https://bugs.openjdk.java.net/browse/JDK-8275843). > > #### The short description: > > We have an inconsistent between xrender java code and the x11 window. The java code thinks that all our windows support only two types of color models: IntRgbX11 and IntArgbPreX11, but the x11 window supports more types. If such inconsistency occurs we render some garbage, or just crash since our "blits" will assume the wrong data layout. This issue was reported and fixed [before](http://hg.openjdk.java.net/jdk/jdk/rev/c53905e7dc57) but it was not realized why the rendering was wrong and that it can cause a crash. The fix is similar to the old one. > > #### The long description: > > * Once upon a time this bug was filed [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) it was about the rendering of colors to the volatile image, the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8176795?focusedCommentId=14138323&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14138323) In short: the volatile images in the xrender use intArgbPre color model, it means that the SunGraphics2D object [convert](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1753) the argb value to the argbPre before passing it to the pipeline, and the xrender pipeline [convert](http://hg.openjdk.java.net/jdk/jdk/rev/e4b03365ddbf) this value to the argbPre one more time -> double-conversion-> the bug is reproduced. The fix for that bug disabled the second conversion in the xrender. but it does not take into account that this code path is u sed for rendering to the ARGB X11 window where the shared code does not convert the color, so the next bug was filed. > * The second bug is [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931), the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8204931?focusedCommentId=14199800&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14199800). In short the bug was about rendering directly to the window and missing color conversion removed previously. The fix for that bug changed the surface type used by the window, so the shared code start to convert the color from ARGB to argbPre, but it does not take into account that we do not control the color model of the window, see how many of them we actually [support](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/unix/classes/sun/java2d/x11/X11SurfaceData.java#L501) Also note in the link above that if we do not recognize the type we do not fallback to something but throw InvalidPipeException, this is because the blits(and other primitives) may use t his type to access the data directly. So the next bug was reported: > * This is the third issue [JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579). The fix for that issue tried to roll back the previous one but does not take into account that the conversion removed by the first issue should be rollback as well, so the last bug was filed. > * The "last" issue is [JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392) rollback the previous one. So the bug reported in the third report come back. > > #### Fix description > > The fix for the current issue contains a few parts: > * Rollback of the [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931) so we will use the proper surface data for the window. > * Return conversion in the xrender pipeline removed by the [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) So we will convert it when we render to the volatile image(argbPre) and to the window(argb). We need to convert in both cases since the xrender API which we use expects the argbPre colors. > * Start to use the [eargb](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1752) value( instead of pixel) stored in the SunGraphics2D so we did not get the double conversion. > > Some tests are updated and one more is added. > > ### Note > I have checked the performance implication of this change and it looks like after this change the sequence window.setvisible(true)/window.dispose() will work 30% faster, this may affect the tests which does not wait enough time to make the window visible. Probably this is the reason why some of our tests became more stable at some point in jdk11. > > > I have tested this by the jck and jdk_desktop tests. But any additional verification/testing is welcome. Sergey Bylokhov 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 eight additional commits since the last revision: - Update DrawCustomColorModel.java - Merge branch 'master' into alpha - Merge branch 'master' into alpha - Merge branch 'master' into alpha - Update DrawCustomColorModel.java - fix space - Validate color for the new eargb only - Initial fix ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6199/files - new: https://git.openjdk.java.net/jdk/pull/6199/files/f20747a6..cac8aa81 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6199&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6199&range=00-01 Stats: 940191 lines in 2561 files changed: 489903 ins; 433827 del; 16461 mod Patch: https://git.openjdk.java.net/jdk/pull/6199.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6199/head:pull/6199 PR: https://git.openjdk.java.net/jdk/pull/6199 From azvegint at openjdk.java.net Mon Dec 13 22:03:24 2021 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Mon, 13 Dec 2021 22:03:24 GMT Subject: RFR: 8275843: Random crashes while the UI code is executed [v2] In-Reply-To: References: Message-ID: <7Fi7vH96eXbTO_5c3B0g0_Q_gRuJ30baQCYfi9rW-dA=.7b1b9874-35d1-4f11-bfcd-cd951931d780@github.com> On Mon, 13 Dec 2021 20:46:06 GMT, Sergey Bylokhov wrote: >> Please take a look to one more wagon in this train: >> [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795)->[JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931)->[JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579)->[JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392)->[Current issue](https://bugs.openjdk.java.net/browse/JDK-8275843). >> >> #### The short description: >> >> We have an inconsistent between xrender java code and the x11 window. The java code thinks that all our windows support only two types of color models: IntRgbX11 and IntArgbPreX11, but the x11 window supports more types. If such inconsistency occurs we render some garbage, or just crash since our "blits" will assume the wrong data layout. This issue was reported and fixed [before](http://hg.openjdk.java.net/jdk/jdk/rev/c53905e7dc57) but it was not realized why the rendering was wrong and that it can cause a crash. The fix is similar to the old one. >> >> #### The long description: >> >> * Once upon a time this bug was filed [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) it was about the rendering of colors to the volatile image, the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8176795?focusedCommentId=14138323&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14138323) In short: the volatile images in the xrender use intArgbPre color model, it means that the SunGraphics2D object [convert](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1753) the argb value to the argbPre before passing it to the pipeline, and the xrender pipeline [convert](http://hg.openjdk.java.net/jdk/jdk/rev/e4b03365ddbf) this value to the argbPre one more time -> double-conversion-> the bug is reproduced. The fix for that bug disabled the second conversion in the xrender. but it does not take into account that this code path is used for rendering to the ARGB X11 window where the shared code does not convert the color, so the next bug was filed. >> * The second bug is [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931), the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8204931?focusedCommentId=14199800&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14199800). In short the bug was about rendering directly to the window and missing color conversion removed previously. The fix for that bug changed the surface type used by the window, so the shared code start to convert the color from ARGB to argbPre, but it does not take into account that we do not control the color model of the window, see how many of them we actually [support](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/unix/classes/sun/java2d/x11/X11SurfaceData.java#L501) Also note in the link above that if we do not recognize the type we do not fallback to something but throw InvalidPipeException, this is because the blits(and other primitives) may use this type to access the data directly. So the next bug was reported: >> * This is the third issue [JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579). The fix for that issue tried to roll back the previous one but does not take into account that the conversion removed by the first issue should be rollback as well, so the last bug was filed. >> * The "last" issue is [JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392) rollback the previous one. So the bug reported in the third report come back. >> >> #### Fix description >> >> The fix for the current issue contains a few parts: >> * Rollback of the [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931) so we will use the proper surface data for the window. >> * Return conversion in the xrender pipeline removed by the [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) So we will convert it when we render to the volatile image(argbPre) and to the window(argb). We need to convert in both cases since the xrender API which we use expects the argbPre colors. >> * Start to use the [eargb](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1752) value( instead of pixel) stored in the SunGraphics2D so we did not get the double conversion. >> >> Some tests are updated and one more is added. >> >> ### Note >> I have checked the performance implication of this change and it looks like after this change the sequence window.setvisible(true)/window.dispose() will work 30% faster, this may affect the tests which does not wait enough time to make the window visible. Probably this is the reason why some of our tests became more stable at some point in jdk11. >> >> >> I have tested this by the jck and jdk_desktop tests. But any additional verification/testing is welcome. > > Sergey Bylokhov 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 eight additional commits since the last revision: > > - Update DrawCustomColorModel.java > - Merge branch 'master' into alpha > - Merge branch 'master' into alpha > - Merge branch 'master' into alpha > - Update DrawCustomColorModel.java > - fix space > - Validate color for the new eargb only > - Initial fix Marked as reviewed by azvegint (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6199 From azvegint at openjdk.java.net Mon Dec 13 22:03:24 2021 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Mon, 13 Dec 2021 22:03:24 GMT Subject: RFR: 8275843: Random crashes while the UI code is executed In-Reply-To: <9Gso5jy9lm0RPqzYT0uJ-HlkZa0Ck7I8DlMR2jbqNo4=.35d6cf70-1781-4ae8-b595-8bcf474bbc0a@github.com> References: <9Gso5jy9lm0RPqzYT0uJ-HlkZa0Ck7I8DlMR2jbqNo4=.35d6cf70-1781-4ae8-b595-8bcf474bbc0a@github.com> Message-ID: On Mon, 13 Dec 2021 20:31:43 GMT, Sergey Bylokhov wrote: > I think the easiest way to reproduce the crash is to force the x11 to use some completely different format, like this: Xvfb :1 -screen 0 1920x1080x16 Yes, this one crashes for me almost instantly. ------------- PR: https://git.openjdk.java.net/jdk/pull/6199 From azvegint at openjdk.java.net Mon Dec 13 22:03:24 2021 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Mon, 13 Dec 2021 22:03:24 GMT Subject: RFR: 8275843: Random crashes while the UI code is executed [v2] In-Reply-To: References: Message-ID: On Mon, 13 Dec 2021 20:24:33 GMT, Sergey Bylokhov wrote: >> src/java.desktop/unix/classes/sun/java2d/xr/XRSurfaceData.java line 403: >> >>> 401: SurfaceType sType = null; >>> 402: >>> 403: switch (transparency) { >> >> Since you are touching this, you might want to fix indent for cases in this switch. > > I can change it, but looks like all switches in the "sun.java2d.xr" use this code style. Then it is fine as it is. ------------- PR: https://git.openjdk.java.net/jdk/pull/6199 From jwilhelm at openjdk.java.net Tue Dec 14 01:49:19 2021 From: jwilhelm at openjdk.java.net (Jesper Wilhelmsson) Date: Tue, 14 Dec 2021 01:49:19 GMT Subject: RFR: Merge jdk18 Message-ID: Forwardport JDK 18 -> JDK 19 ------------- Commit messages: - Merge - 8132785: java/lang/management/ThreadMXBean/ThreadLists.java fails intermittently - 8273108: RunThese24H crashes with SEGV in markWord::displaced_mark_helper() after JDK-8268276 - 8278580: ProblemList javax/swing/JTree/4908142/bug4908142.java on macosx-x64 - 8277299: STACK_OVERFLOW in Java_sun_awt_shell_Win32ShellFolder2_getIconBits The merge commit only contains trivial merges, so no merge-specific webrevs have been generated. Changes: https://git.openjdk.java.net/jdk/pull/6824/files Stats: 119 lines in 6 files changed: 85 ins; 1 del; 33 mod Patch: https://git.openjdk.java.net/jdk/pull/6824.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6824/head:pull/6824 PR: https://git.openjdk.java.net/jdk/pull/6824 From jwilhelm at openjdk.java.net Tue Dec 14 02:21:17 2021 From: jwilhelm at openjdk.java.net (Jesper Wilhelmsson) Date: Tue, 14 Dec 2021 02:21:17 GMT Subject: RFR: Merge jdk18 [v2] In-Reply-To: References: Message-ID: > Forwardport JDK 18 -> JDK 19 Jesper Wilhelmsson 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 29 additional commits since the last revision: - Merge - 8278275: Initial nroff manpage generation for JDK 19 Reviewed-by: erikj, jjg, iris - 8278630: ProblemList compiler/vectorapi/reshape/TestVectorCastAVX512.java on X64 Reviewed-by: psandoz - 8269556: sun/tools/jhsdb/JShellHeapDumpTest.java fails with RuntimeException 'JShellToolProvider' missing from stdout/stderr Reviewed-by: kevinw, sspitsyn, amenkov - 8259610: VectorReshapeTests are not effective due to failing to intrinsify "VectorSupport.convert" Reviewed-by: psandoz, chagedorn - 8276241: JVM does not flag constant class entries ending in '/' Reviewed-by: dholmes, lfoltan - 8277481: Obsolete seldom used CDS flags Reviewed-by: iklam, ccheung, dholmes - 8271079: JavaFileObject#toUri and multi-release jars Reviewed-by: jjg, lancea, alanb - 8278482: G1: Improve HeapRegion::block_is_obj Reviewed-by: sjohanss, tschatzl, mli - 8278344: sun/security/pkcs12/KeytoolOpensslInteropTest.java test fails because of different openssl output Reviewed-by: mdoerr, goetz, stuefe - ... and 19 more: https://git.openjdk.java.net/jdk/compare/9d2883a1...dc02f07e ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6824/files - new: https://git.openjdk.java.net/jdk/pull/6824/files/dc02f07e..dc02f07e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6824&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6824&range=00-01 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/6824.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6824/head:pull/6824 PR: https://git.openjdk.java.net/jdk/pull/6824 From jwilhelm at openjdk.java.net Tue Dec 14 02:21:19 2021 From: jwilhelm at openjdk.java.net (Jesper Wilhelmsson) Date: Tue, 14 Dec 2021 02:21:19 GMT Subject: Integrated: Merge jdk18 In-Reply-To: References: Message-ID: On Tue, 14 Dec 2021 01:35:43 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 18 -> JDK 19 This pull request has now been integrated. Changeset: 8401a059 Author: Jesper Wilhelmsson URL: https://git.openjdk.java.net/jdk/commit/8401a059bd01b32e3532f806d3d8b60e851c468a Stats: 119 lines in 6 files changed: 85 ins; 1 del; 33 mod Merge ------------- PR: https://git.openjdk.java.net/jdk/pull/6824 From psadhukhan at openjdk.java.net Tue Dec 14 06:26:38 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 14 Dec 2021 06:26:38 GMT Subject: RFR: 8278348: [macos12] javax/swing/JTree/4908142/bug4908142.java fails in macos12 Message-ID: Test seem to be failing in macos12.0.1 (although it does not seem to affect 12.1) due to keypresses of "a", "a", "d" is not selecting "aad" but "ade" which seems to point to the fact that 2 exclusive "a" keypress are considered as 1 "a" keypress. Although I am not able to reroduce this issue if test is ran standalone or in JTree group, but it fails when ran as toplevel "jdk_desktop" testgroup or even whole swing test group. Looking at text navigational algorithm probably done in JDK-4908142 (although I am not sure if this is done for that bug or subsequently revised) https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java#L3804 it seems if a subsequent key press comes after a predefined timefactor after the previous keypress, it is considered as a fresh/new keypress and not part of ongoing string search ie, if 2nd "a" comes after the predefined timefactor from 1st "a', then seacrh algorithm will search for "ad" and not "aad" as can be seen here https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java#L3815 I am not sure why macos12 will take so long for 2nd "a" keypress but the logs corraborates that it does take more than "timefactor" time what is set now, which is 1000. 1st "a" keypress, we have time 1639400688049 lastTime 0 typedString a 2nd "a" keypress, we have time 1639400691150 lastTime 1639400688049 typedString a [which is diff of 3101] So, proposed fix is to configure "Tree.timeFactor" to 5000 to workaround this macos12 issue. It pass when full desktop tests is run in macos12 and also test passes in all platforms. ------------- Commit messages: - Fix - Merge master - 8278348: [macos12] javax/swing/JTree/4908142/bug4908142.java fails in macos12 Changes: https://git.openjdk.java.net/jdk/pull/6826/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6826&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278348 Stats: 19 lines in 2 files changed: 13 ins; 2 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/6826.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6826/head:pull/6826 PR: https://git.openjdk.java.net/jdk/pull/6826 From duke at openjdk.java.net Tue Dec 14 06:49:18 2021 From: duke at openjdk.java.net (Yanli Sang) Date: Tue, 14 Dec 2021 06:49:18 GMT Subject: RFR: 8262297: ImageIO.write() method will throw IndexOutOfBoundsException [v5] In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 10:05:31 GMT, Jayathirth D V wrote: >> Masanori Yano has updated the pull request incrementally with one additional commit since the last revision: >> >> 8262297: ImageIO.write() method will throw IndexOutOfBoundsException > > This change has caused regression : https://bugs.openjdk.java.net/browse/JDK-8278047 > So this change will be reverted for further analysis. @jayathirthrao @masyano @prrace @AlanBateman We also meet the same issue in PNGImageWriter.write, Do you have any idea how to fix it ? Thanks in advance. at java.desktop/javax.imageio.ImageWriter.write(ImageWriter.java:613) at java.desktop/com.sun.imageio.plugins.png.PNGImageWriter.write(PNGImageWriter.java:1283) at java.desktop/com.sun.imageio.plugins.png.PNGImageWriter.write_IDAT(PNGImageWriter.java:1050) at java.desktop/com.sun.imageio.plugins.png.IDATOutputStream.finish(PNGImageWriter.java:273) at java.desktop/com.sun.imageio.plugins.png.IDATOutputStream.deflate(PNGImageWriter.java:248) at java.desktop/com.sun.imageio.plugins.png.IDATOutputStream.finishChunk(PNGImageWriter.java:200) at java.desktop/javax.imageio.stream.FileCacheImageOutputStream.seek(FileCacheImageOutputStream.java:170) java.lang.IndexOutOfBoundsException ------------- PR: https://git.openjdk.java.net/jdk/pull/6151 From myano at openjdk.java.net Tue Dec 14 10:08:12 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Tue, 14 Dec 2021 10:08:12 GMT Subject: RFR: 8277463: JFileChooser with Metal L&F doesn't show non-canonical UNC path in - Look in In-Reply-To: References: Message-ID: On Fri, 10 Dec 2021 10:05:04 GMT, Prasanta Sadhukhan wrote: >> I would like to fix the bug reported in JDK-8277463. >> >> As reporter's investigation, ShellFolder.getNormalizedFile() returns incorrect value for non-canonical Windows UNC path. getNormalizedFile() is used for symbolic link path, but Windows environment does not handle symbolic link. And, getCanonicalFile() returns correct path for a directory link in Windows which is made with `mklink` command. So getNormalizedFile() should perform to return getCanonicalFile() like WindowsFileChooserUI.addItem() at Windows environment. > > I am not able to reproduce the issue even without the fix. How did you reproduce? > I tried "\\\< mypcname>\dir.." and I could see "Documents" folder in "Look In" combobox of filechooser..It supposed to be empty for bug to be reproduced.. > If I put in \\\< mypcname> in Windows Run prompt, I get no folder btw so no "dir" is present in my \\\< mypcname> folder actually and it does not allow me to create one in that \\\< mypcname> folder @prsadhuk The valid shared folder is required to reproduce this bug. If you don't have valid shared folders, "Look in" combobox shows "Documents" correctly. Please try to make a valid shared folder and sub directory. e.g. `\..` ------------- PR: https://git.openjdk.java.net/jdk/pull/6796 From myano at openjdk.java.net Tue Dec 14 11:49:16 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Tue, 14 Dec 2021 11:49:16 GMT Subject: RFR: 7001973: java/awt/Graphics2D/CopyAreaOOB.java fails [v2] In-Reply-To: References: Message-ID: On Tue, 26 Oct 2021 04:52:37 GMT, Sergey Bylokhov wrote: >> Masanori Yano 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 four additional commits since the last revision: >> >> - 7001973: java/awt/Graphics2D/CopyAreaOOB.java fails >> - Merge branch 'master' of https://github.com/masyano/jdk into 7001973 >> - 7001973: java/awt/Graphics2D/CopyAreaOOB.java fails >> - 7001973: java/awt/Graphics2D/CopyAreaOOB.java fails > > I'll check it, let me some time. @mrserb I have tested on MacOS. The drawing result has no problem, and passed with no Exception. Please review this PR again. ------------- PR: https://git.openjdk.java.net/jdk/pull/5491 From myano at openjdk.java.net Tue Dec 14 12:00:13 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Tue, 14 Dec 2021 12:00:13 GMT Subject: RFR: 8275715: D3D pipeline processes multiple PaintEvent at initial drawing [v2] In-Reply-To: References: <-hj0v7RZ0HPpP9GND5csZsZ1Vz7oxaufOAC0-ZygtwM=.6a5ae7a8-52d6-4e3e-a166-2fae2c23dbe0@github.com> <2rBhm1b2wZwnJFYIve6hdNLHFE0iAkGbj1GkDkSOUCs=.726e6e6a-76b6-4657-b44b-dd854769055c@github.com> Message-ID: On Thu, 18 Nov 2021 00:02:30 GMT, Sergey Bylokhov wrote: >> @mrserb Can I hope this fix will be integrated after JDK-8270874 is fixed? > > Yes. @mrserb @prrace JDK 18 has been forked, so please resume the review of this fix. ------------- PR: https://git.openjdk.java.net/jdk/pull/6064 From serb at openjdk.java.net Tue Dec 14 17:02:48 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 14 Dec 2021 17:02:48 GMT Subject: RFR: 8275843: Random crashes while the UI code is executed [v3] In-Reply-To: References: Message-ID: <1k6XJo6V4z78CxcRXL9U5322B21KzszYjj7ek2mP5SE=.8c79c2e2-b79b-45f4-be61-86efcc0b5093@github.com> > Please take a look to one more wagon in this train: > [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795)->[JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931)->[JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579)->[JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392)->[Current issue](https://bugs.openjdk.java.net/browse/JDK-8275843). > > #### The short description: > > We have an inconsistent between xrender java code and the x11 window. The java code thinks that all our windows support only two types of color models: IntRgbX11 and IntArgbPreX11, but the x11 window supports more types. If such inconsistency occurs we render some garbage, or just crash since our "blits" will assume the wrong data layout. This issue was reported and fixed [before](http://hg.openjdk.java.net/jdk/jdk/rev/c53905e7dc57) but it was not realized why the rendering was wrong and that it can cause a crash. The fix is similar to the old one. > > #### The long description: > > * Once upon a time this bug was filed [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) it was about the rendering of colors to the volatile image, the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8176795?focusedCommentId=14138323&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14138323) In short: the volatile images in the xrender use intArgbPre color model, it means that the SunGraphics2D object [convert](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1753) the argb value to the argbPre before passing it to the pipeline, and the xrender pipeline [convert](http://hg.openjdk.java.net/jdk/jdk/rev/e4b03365ddbf) this value to the argbPre one more time -> double-conversion-> the bug is reproduced. The fix for that bug disabled the second conversion in the xrender. but it does not take into account that this code path is u sed for rendering to the ARGB X11 window where the shared code does not convert the color, so the next bug was filed. > * The second bug is [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931), the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8204931?focusedCommentId=14199800&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14199800). In short the bug was about rendering directly to the window and missing color conversion removed previously. The fix for that bug changed the surface type used by the window, so the shared code start to convert the color from ARGB to argbPre, but it does not take into account that we do not control the color model of the window, see how many of them we actually [support](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/unix/classes/sun/java2d/x11/X11SurfaceData.java#L501) Also note in the link above that if we do not recognize the type we do not fallback to something but throw InvalidPipeException, this is because the blits(and other primitives) may use t his type to access the data directly. So the next bug was reported: > * This is the third issue [JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579). The fix for that issue tried to roll back the previous one but does not take into account that the conversion removed by the first issue should be rollback as well, so the last bug was filed. > * The "last" issue is [JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392) rollback the previous one. So the bug reported in the third report come back. > > #### Fix description > > The fix for the current issue contains a few parts: > * Rollback of the [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931) so we will use the proper surface data for the window. > * Return conversion in the xrender pipeline removed by the [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) So we will convert it when we render to the volatile image(argbPre) and to the window(argb). We need to convert in both cases since the xrender API which we use expects the argbPre colors. > * Start to use the [eargb](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1752) value( instead of pixel) stored in the SunGraphics2D so we did not get the double conversion. > > Some tests are updated and one more is added. > > ### Note > I have checked the performance implication of this change and it looks like after this change the sequence window.setvisible(true)/window.dispose() will work 30% faster, this may affect the tests which does not wait enough time to make the window visible. Probably this is the reason why some of our tests became more stable at some point in jdk11. > > > I have tested this by the jck and jdk_desktop tests. But any additional verification/testing is welcome. Sergey Bylokhov 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 ten additional commits since the last revision: - Merge branch 'master' into alpha - Update DrawCustomColorModel.java - Merge branch 'master' into alpha - Merge branch 'master' into alpha - Merge branch 'master' into alpha - Update DrawCustomColorModel.java - fix space - Validate color for the new eargb only - Initial fix ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6199/files - new: https://git.openjdk.java.net/jdk/pull/6199/files/cac8aa81..c2d3db39 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6199&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6199&range=01-02 Stats: 207 lines in 47 files changed: 87 ins; 45 del; 75 mod Patch: https://git.openjdk.java.net/jdk/pull/6199.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6199/head:pull/6199 PR: https://git.openjdk.java.net/jdk/pull/6199 From psadhukhan at openjdk.java.net Tue Dec 14 17:10:08 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 14 Dec 2021 17:10:08 GMT Subject: RFR: 8277463: JFileChooser with Metal L&F doesn't show non-canonical UNC path in - Look in In-Reply-To: References: Message-ID: On Fri, 10 Dec 2021 08:59:55 GMT, Masanori Yano wrote: > I would like to fix the bug reported in JDK-8277463. > > As reporter's investigation, ShellFolder.getNormalizedFile() returns incorrect value for non-canonical Windows UNC path. getNormalizedFile() is used for symbolic link path, but Windows environment does not handle symbolic link. And, getCanonicalFile() returns correct path for a directory link in Windows which is made with `mklink` command. So getNormalizedFile() should perform to return getCanonicalFile() like WindowsFileChooserUI.addItem() at Windows environment. looks ok ------------- Marked as reviewed by psadhukhan (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/6796 From serb at openjdk.java.net Tue Dec 14 18:06:58 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 14 Dec 2021 18:06:58 GMT Subject: Integrated: 8275843: Random crashes while the UI code is executed In-Reply-To: References: Message-ID: On Mon, 1 Nov 2021 20:03:42 GMT, Sergey Bylokhov wrote: > Please take a look to one more wagon in this train: > [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795)->[JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931)->[JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579)->[JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392)->[Current issue](https://bugs.openjdk.java.net/browse/JDK-8275843). > > #### The short description: > > We have an inconsistent between xrender java code and the x11 window. The java code thinks that all our windows support only two types of color models: IntRgbX11 and IntArgbPreX11, but the x11 window supports more types. If such inconsistency occurs we render some garbage, or just crash since our "blits" will assume the wrong data layout. This issue was reported and fixed [before](http://hg.openjdk.java.net/jdk/jdk/rev/c53905e7dc57) but it was not realized why the rendering was wrong and that it can cause a crash. The fix is similar to the old one. > > #### The long description: > > * Once upon a time this bug was filed [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) it was about the rendering of colors to the volatile image, the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8176795?focusedCommentId=14138323&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14138323) In short: the volatile images in the xrender use intArgbPre color model, it means that the SunGraphics2D object [convert](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1753) the argb value to the argbPre before passing it to the pipeline, and the xrender pipeline [convert](http://hg.openjdk.java.net/jdk/jdk/rev/e4b03365ddbf) this value to the argbPre one more time -> double-conversion-> the bug is reproduced. The fix for that bug disabled the second conversion in the xrender. but it does not take into account that this code path is u sed for rendering to the ARGB X11 window where the shared code does not convert the color, so the next bug was filed. > * The second bug is [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931), the description can be found [here](https://bugs.openjdk.java.net/browse/JDK-8204931?focusedCommentId=14199800&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14199800). In short the bug was about rendering directly to the window and missing color conversion removed previously. The fix for that bug changed the surface type used by the window, so the shared code start to convert the color from ARGB to argbPre, but it does not take into account that we do not control the color model of the window, see how many of them we actually [support](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/unix/classes/sun/java2d/x11/X11SurfaceData.java#L501) Also note in the link above that if we do not recognize the type we do not fallback to something but throw InvalidPipeException, this is because the blits(and other primitives) may use t his type to access the data directly. So the next bug was reported: > * This is the third issue [JDK-8214579](https://bugs.openjdk.java.net/browse/JDK-8214579). The fix for that issue tried to roll back the previous one but does not take into account that the conversion removed by the first issue should be rollback as well, so the last bug was filed. > * The "last" issue is [JDK-8227392](https://bugs.openjdk.java.net/browse/JDK-8227392) rollback the previous one. So the bug reported in the third report come back. > > #### Fix description > > The fix for the current issue contains a few parts: > * Rollback of the [JDK-8204931](https://bugs.openjdk.java.net/browse/JDK-8204931) so we will use the proper surface data for the window. > * Return conversion in the xrender pipeline removed by the [JDK-8176795](https://bugs.openjdk.java.net/browse/JDK-8176795) So we will convert it when we render to the volatile image(argbPre) and to the window(argb). We need to convert in both cases since the xrender API which we use expects the argbPre colors. > * Start to use the [eargb](https://github.com/openjdk/jdk/blob/603bba282a089928fd23f8da23a7c1b2d52944ef/src/java.desktop/share/classes/sun/java2d/SunGraphics2D.java#L1752) value( instead of pixel) stored in the SunGraphics2D so we did not get the double conversion. > > Some tests are updated and one more is added. > > ### Note > I have checked the performance implication of this change and it looks like after this change the sequence window.setvisible(true)/window.dispose() will work 30% faster, this may affect the tests which does not wait enough time to make the window visible. Probably this is the reason why some of our tests became more stable at some point in jdk11. > > > I have tested this by the jck and jdk_desktop tests. But any additional verification/testing is welcome. This pull request has now been integrated. Changeset: a9c1acbb Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/a9c1acbb8aec46e4a488b7c77bb6318af87747f6 Stats: 141 lines in 6 files changed: 91 ins; 19 del; 31 mod 8275843: Random crashes while the UI code is executed Reviewed-by: azvegint ------------- PR: https://git.openjdk.java.net/jdk/pull/6199 From serb at openjdk.java.net Wed Dec 15 00:46:57 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 15 Dec 2021 00:46:57 GMT Subject: RFR: 8278348: [macos12] javax/swing/JTree/4908142/bug4908142.java fails in macos12 In-Reply-To: References: Message-ID: On Tue, 14 Dec 2021 05:44:17 GMT, Prasanta Sadhukhan wrote: > Test seem to be failing in macos12.0.1 (although it does not seem to affect 12.1) due to keypresses of "a", "a", "d" is not selecting "aad" but "ade" which seems to point to the fact that 2 exclusive "a" keypress are considered as 1 "a" keypress. > Although I am not able to reroduce this issue if test is ran standalone or in JTree group, but it fails when ran as toplevel "jdk_desktop" testgroup or even whole swing test group. > > Looking at text navigational algorithm probably done in JDK-4908142 (although I am not sure if this is done for that bug or subsequently revised) > https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java#L3804 > > it seems if a subsequent key press comes after a predefined timefactor after the previous keypress, it is considered as a fresh/new keypress and not part of ongoing string search ie, if 2nd "a" comes after the predefined timefactor from 1st "a', then seacrh algorithm will search for "ad" and not "aad" as can be seen here > https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java#L3815 > > I am not sure why macos12 will take so long for 2nd "a" keypress but the logs corraborates that it does take more than "timefactor" time what is set now, which is 1000. > 1st "a" keypress, we have time 1639400688049 lastTime 0 typedString a > 2nd "a" keypress, we have time 1639400691150 lastTime 1639400688049 typedString a [which is diff of 3101] > > So, proposed fix is to configure "Tree.timeFactor" to 5000 to workaround this macos12 issue. It pass when full desktop tests is run in macos12 and also test passes in all platforms. Can you please check that the slowness was caused by the receiving events from the cocoa, and not by the posting delayed(for some reason) events by the robot. ------------- PR: https://git.openjdk.java.net/jdk/pull/6826 From serb at openjdk.java.net Wed Dec 15 01:15:59 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 15 Dec 2021 01:15:59 GMT Subject: RFR: 8278050: Armenian text isn't rendered on macOS if text layout is performed In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 10:52:38 GMT, Dmitry Batrak wrote: > The problem is related to the implementation of font fallback on macOS, specifically to the path used when text layout > is performed, i.e. the one using `FontSubstitution` and cascade lists. `CTFontCopyDefaultCascadeListForLanguages`'s output contains an entry for the font, able to render Armenian text ('NotoSansArmenian-Regular'), but `CFont.createCompositeFont` cannot find this font amongst registered fonts, and the entry is skipped, resulting in broken rendering. > System font loading (performed by `CFontManager.loadNativeFonts`) relies on `[NSFontManager availableFontFamilies]`, but its output doesn't contain 'Noto Sans Armenian' (which is a family for 'NotoSansArmenian-Regular' font). 'Noto Sans Armenian' is recognized by `[NSFontManager availableMembersOfFontFamily:]` though, 'NotoSansArmenian-Regular' is contained in `[NSFontManager availableFonts]` output, and the font can be created and used normally, just like any other system font. Not sure why its family is 'hidden', maybe macOS developers wanted to limit the number of options > displayed in font selection drop-downs. > For reference, another cascade list item, ignored in similar way is 'NotoSansZawgyi-Regular'. > > Proposed fix is to create `CFont` objects for cascade list items explicitly, if corresponding fonts are not registered. These objects are re-used between different fonts as their fallback components (to enable caching of char-to-glyph mapping), but are not made available to public font APIs. > I've considered an alternative solution - using `[NSFontManager availableFonts]` instead of > `[NSFontManager availableFontFamilies]` to load system fonts. Two factors complicate it though - `loadNativeFonts` will > take more time (on my machine about 170 additional fonts will be loaded) and the order of font loading will change (which > impacts the selection of 'preferred' plain/bold/italic/bolditalic components in `FontFamily` class). Both factors can be > dealt with, but they make the solution more complicated and prone to regressions. For now, it seems not worth it. > > I've not created a test, as it would rely on macOS providing a fallback font for Armenian script, which is not guaranteed. > Existing tests pass fine with the fix. src/java.desktop/macosx/classes/sun/font/CFontManager.java line 337: > 335: // These fonts are present in [NSFontManager availableFonts] output though, > 336: // and can be accessed in the same way as other system fonts. > 337: return fallbackFonts.computeIfAbsent(fontName, name -> new CFont(name, null)); I would like to clarify why we cannot merge the results of the availableFontFamilies and availableFonts? ------------- PR: https://git.openjdk.java.net/jdk/pull/6633 From serb at openjdk.java.net Wed Dec 15 01:23:59 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 15 Dec 2021 01:23:59 GMT Subject: RFR: 6496103: isFileHidingEnabled return false by default In-Reply-To: <_C3lDw9NYzxbZtUdu44cRMEHaa6NhTV6fJWB-ho59yo=.eeda6bb0-81b0-4f0d-9c3b-58fbaa1c433d@github.com> References: <_C3lDw9NYzxbZtUdu44cRMEHaa6NhTV6fJWB-ho59yo=.eeda6bb0-81b0-4f0d-9c3b-58fbaa1c433d@github.com> Message-ID: On Thu, 9 Dec 2021 09:40:38 GMT, Tejesh R wrote: > The default value of this property is derived from native platform. The same is updated in the documentation. src/java.desktop/share/classes/javax/swing/JFileChooser.java line 1416: > 1414: * Returns true if hidden files are not shown in the file chooser; > 1415: * otherwise, returns false. The default value of this property is derived from native platform, > 1416: * unless set explicitly by the developer. Looks like the rest of the file uses the terms "by the programmer" and "This default depends on the operating system.", also please split the long line up to 80 chars. ------------- PR: https://git.openjdk.java.net/jdk/pull/6780 From serb at openjdk.java.net Wed Dec 15 01:40:01 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 15 Dec 2021 01:40:01 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v5] In-Reply-To: References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> <70BX5SXk_YBwACbsXf3aMS4KytQQoxkwNhXuuRgOYgo=.4e15bbad-05b2-456a-965d-b9c20b9c6303@github.com> <_yyT1DE1iec1ea6SsjCE-wT6fBrkBrws9Co61mbukNs=.572220ae-c3a4-4363-864a-bcfcc51c0e73@github.com> Message-ID: On Wed, 8 Dec 2021 13:09:26 GMT, Alexey Ivanov wrote: >> I'm not sure this fix is going in the right direction. Isn't the doc saying that if you want to use one of these components as the cell of a JTable it should implement this interface ? >> And the problem with JListBox is that it is actually just called JList ? > > @prrace Shall we update `TableCellEditor` Javadoc to _?Adds to CellEditor the extensions necessary to configure an editor in a table.?_ to make it similar to `TreeCellEditor`? Isn't this is another way around? The doc says that the object implementing this interface can be used "as an editor of values for components such as XXX", and it does not say that the XXX class should support the CellTableEditor? For example, the DefaultCellEditor class can be used as an editor for JComboBox/JCheckBox/JTextField. ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From serb at openjdk.java.net Wed Dec 15 01:49:09 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 15 Dec 2021 01:49:09 GMT Subject: RFR: 8190264: JScrollBar ignores its border when using macOS Mac OS X Aqua look and feel [v10] In-Reply-To: References: Message-ID: On Wed, 8 Dec 2021 20:52:42 GMT, Alisen Chung wrote: >> Adjusted the AquaLF scrollbar to account for border inset settings when dragging the thumb and clicking on the track. > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > removed todo comment test/jdk/java/awt/Scrollbar/AquaLFScrollbarTest/ScrollBarBorderTest.java line 40: > 38: * @run main ScrollBarBorderTest > 39: */ > 40: public class ScrollBarBorderTest { The test does not have a platform limitation, does it mean it works fine and can catch similar bugs for other L&Fs? If yes it would be useful to iterate all installed L&F. You can take a look an example in the ButtonGroupLayoutTraversalTest test. test/jdk/java/awt/Scrollbar/AquaLFScrollbarTest/ScrollBarBorderTest.java line 140: > 138: } > 139: } > 140: } A newline at the end of the file should be added. ------------- PR: https://git.openjdk.java.net/jdk/pull/6374 From duke at openjdk.java.net Wed Dec 15 02:29:15 2021 From: duke at openjdk.java.net (lawrence.andrews) Date: Wed, 15 Dec 2021 02:29:15 GMT Subject: RFR: 8278828 : java/awt/a11y/AccessibleTextTest.java's createTextArea() just shows instructions on the UI Message-ID: 1) Test scenario was just showing test instruction with JTextArea. So added the JTextArea as the instruction and method says. 2) JTextArea is filled with contents so that and an Emoji character making sure that screen reader can read Emoji also. 3) Now user can user arrow keys to navigate the JTextArea and screen reader can read it. @shurymury Attached the screen shot of the test UI which contains JTextArea along with the instruction. Screen Shot 2021-12-14 at 7 09 14 PM ------------- Commit messages: - Added JTextArea createTextArea() in AccessibleTextTest.java Changes: https://git.openjdk.java.net/jdk/pull/6844/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6844&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278828 Stats: 9 lines in 1 file changed: 9 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/6844.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6844/head:pull/6844 PR: https://git.openjdk.java.net/jdk/pull/6844 From duke at openjdk.java.net Wed Dec 15 05:36:01 2021 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 15 Dec 2021 05:36:01 GMT Subject: RFR: 6462028: MaskFormatter API documentation refers to getDisplayValue [v5] In-Reply-To: References: <-SOfUt64IAtAG0_rLAwkmMCCd81ZaPuTuF5ORNYuIOs=.fd151cd5-71c7-4e21-bd62-aeec7d296e76@github.com> <62NcR6AEhkTmMH9YnM_KnoK_quyX1RlSC6nFc-dyg4U=.c078dcec-9805-4004-9d34-6eb4ae1635c7@github.com> Message-ID: On Mon, 6 Dec 2021 17:16:20 GMT, Phil Race wrote: >> src/java.desktop/share/classes/javax/swing/text/MaskFormatter.java line 103: >> >>> 101: * MaskFormatter formatter = new MaskFormatter("###-####"); >>> 102: * formatter.setPlaceholderCharacter('_'); >>> 103: * formatter.getDisplayValue(tf, "123"); >> >> This code is part of an example, without this line, the following lines of documentation do not make sense. Probably, `getDisplayValue` should be replaced with `valueToString`. You should check that and ensure the sample and the expected output, as discussed in the following sentences, is correct. > > I agree. Simply deleting this line solves nothing. The example needs to be reviewed and the text needs to say something correct and useful. @prrace The PR has been reviewed and approved by @prsadhuk and @aivanov-jdk...... Can I go ahead and integrate it? ------------- PR: https://git.openjdk.java.net/jdk/pull/6556 From duke at openjdk.java.net Wed Dec 15 06:29:43 2021 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 15 Dec 2021 06:29:43 GMT Subject: RFR: 6496103: isFileHidingEnabled return false by default [v2] In-Reply-To: <_C3lDw9NYzxbZtUdu44cRMEHaa6NhTV6fJWB-ho59yo=.eeda6bb0-81b0-4f0d-9c3b-58fbaa1c433d@github.com> References: <_C3lDw9NYzxbZtUdu44cRMEHaa6NhTV6fJWB-ho59yo=.eeda6bb0-81b0-4f0d-9c3b-58fbaa1c433d@github.com> Message-ID: <6ZrzvASjvTYEe1dazchVcggakWgIN_6-SFxCyHJdl58=.fc97f95f-6ba2-476c-835b-0850b533d5bb@github.com> > The default value of this property is derived from native platform. The same is updated in the documentation. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: 6496103: isFileHidingEnabled return false by default ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6780/files - new: https://git.openjdk.java.net/jdk/pull/6780/files/d05f425b..f173600e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6780&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6780&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/6780.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6780/head:pull/6780 PR: https://git.openjdk.java.net/jdk/pull/6780 From duke at openjdk.java.net Wed Dec 15 06:29:46 2021 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 15 Dec 2021 06:29:46 GMT Subject: RFR: 6496103: isFileHidingEnabled return false by default [v2] In-Reply-To: References: <_C3lDw9NYzxbZtUdu44cRMEHaa6NhTV6fJWB-ho59yo=.eeda6bb0-81b0-4f0d-9c3b-58fbaa1c433d@github.com> Message-ID: <_1B7etqqNdNJ3-ko8rVwgxn8q8X6aGdY_d3rSTJSDOI=.76a14d6c-db9d-487d-98c0-869ced810842@github.com> On Wed, 15 Dec 2021 01:20:45 GMT, Sergey Bylokhov wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> 6496103: isFileHidingEnabled return false by default > > src/java.desktop/share/classes/javax/swing/JFileChooser.java line 1416: > >> 1414: * Returns true if hidden files are not shown in the file chooser; >> 1415: * otherwise, returns false. The default value of this property is derived from native platform, >> 1416: * unless set explicitly by the developer. > > Looks like the rest of the file uses the terms "by the programmer" and "This default depends on the operating system.", > also please split the long line up to 80 chars. Sure @mrserb , updated the PR. ------------- PR: https://git.openjdk.java.net/jdk/pull/6780 From dbatrak at openjdk.java.net Wed Dec 15 08:52:00 2021 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Wed, 15 Dec 2021 08:52:00 GMT Subject: RFR: 8278050: Armenian text isn't rendered on macOS if text layout is performed In-Reply-To: References: Message-ID: On Wed, 15 Dec 2021 01:13:04 GMT, Sergey Bylokhov wrote: > I would like to clarify why we cannot merge the results of the availableFontFamilies and availableFonts? We can do it, if everyone is OK with increasing the scope of the change, due to the following factors: * The number of fonts advertised via `GraphicsEnvironment.getAllFonts` and `GraphicsEnvironment.getAvailableFontFamilyNames` will increase, so a potential Java application showing a font chooser combo-box will display more fonts there, than a native macOS application. Not sure whether that's a good or a bad thing, but that's a change in behaviour that will occur. * As the number of loaded fonts will increase, the execution time of `CFontManager.loadNativeFonts` will also increase, introducing a certain regression in Java UI application startup time. Ideally, this should be fixed simultaneously, e.g. by adjusting `sun.font.FontFamily` logic to perform style resolution lazily (when the particular family is accessed), not at the time `loadNativeFonts` is executed. * `[NSFontManager availableFonts]` returns the fonts in alphabetical order, while `NSFontManager availableMembersOfFontFamily:]` (used currently) uses font weight to sort the results. The order in which fonts are processed during `loadNativeFonts` impacts the resulting resolution of fonts into styles in `FontFamily`. So, to keep the currently used approach, an additional fonts sorting would need to be introduced - that can be done, e.g. as part of lazy resolution in `FontFamily` mentioned above. Even though it can make sense to implement all of the above (which JetBrains Runtime already does), I'd rather not do everything in one go. For now, what I'd like to achieve is to switch to `CTFontCopyDefaultCascadeListForLanguages`-based font fallback, as mentioned above. And current change, while having a value of its own, is a necessary step towards that. If OpenJDK will ever switch to using `[NSFontManager availableFonts]`, as a sole source of system fonts or in addition to `[NSFontManager availableFontFamilies]`, this change can just be reverted. ------------- PR: https://git.openjdk.java.net/jdk/pull/6633 From asemenov at openjdk.java.net Wed Dec 15 12:57:22 2021 From: asemenov at openjdk.java.net (Artem Semenov) Date: Wed, 15 Dec 2021 12:57:22 GMT Subject: [jdk18] RFR: 8278604 SwingSet2 table demo does not have accessible description set for images Message-ID: SwingSet2 demo is often used to check accessibility for different Swing components and has some shortcomings. The major one is that images within the table demo do not have accessible description set which makes accessibility perform differently on different platforms when navigating the table with screen narrator enabled. This is the next step after the solution [JDK-8277497](https://bugs.openjdk.java.net/browse/JDK-8277497), in which we forwarded the description from the icon into the label description so that this fix was possible. ------------- Commit messages: - 8278604 SwingSet2 table demo does not have accessible description set for images Changes: https://git.openjdk.java.net/jdk18/pull/31/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk18&pr=31&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278604 Stats: 9 lines in 1 file changed: 9 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk18/pull/31.diff Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/31/head:pull/31 PR: https://git.openjdk.java.net/jdk18/pull/31 From ant at openjdk.java.net Wed Dec 15 13:28:00 2021 From: ant at openjdk.java.net (Anton Tarasov) Date: Wed, 15 Dec 2021 13:28:00 GMT Subject: [jdk18] RFR: 8278604 SwingSet2 table demo does not have accessible description set for images In-Reply-To: References: Message-ID: On Wed, 15 Dec 2021 12:43:40 GMT, Artem Semenov wrote: > SwingSet2 demo is often used to check accessibility for different Swing components and has some shortcomings. The major one is that images within the table demo do not have accessible description set which makes accessibility perform differently on different platforms when navigating the table with screen narrator enabled. > > This is the next step after the solution [JDK-8277497](https://bugs.openjdk.java.net/browse/JDK-8277497), in which we forwarded the description from the icon into the label description so that this fix was possible. Marked as reviewed by ant (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk18/pull/31 From vdyakov at openjdk.java.net Wed Dec 15 16:37:59 2021 From: vdyakov at openjdk.java.net (Victor Dyakov) Date: Wed, 15 Dec 2021 16:37:59 GMT Subject: RFR: 8278612: test/jdk/java/awt/dnd/RemoveDropTargetCrashTest crashes with VoiceOver on macOS In-Reply-To: References: Message-ID: On Mon, 13 Dec 2021 16:50:00 GMT, Anton Tarasov wrote: > ? VoiceOver on macOS @forantar please re-submit at 18 forked ------------- PR: https://git.openjdk.java.net/jdk/pull/6816 From aivanov at openjdk.java.net Wed Dec 15 16:49:01 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 15 Dec 2021 16:49:01 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v5] In-Reply-To: References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> <70BX5SXk_YBwACbsXf3aMS4KytQQoxkwNhXuuRgOYgo=.4e15bbad-05b2-456a-965d-b9c20b9c6303@github.com> <_yyT1DE1iec1ea6SsjCE-wT6fBrkBrws9Co61mbukNs=.572220ae-c3a4-4363-864a-bcfcc51c0e73@github.com> Message-ID: On Wed, 15 Dec 2021 01:36:38 GMT, Sergey Bylokhov wrote: >> @prrace Shall we update `TableCellEditor` Javadoc to _?Adds to CellEditor the extensions necessary to configure an editor in a table.?_ to make it similar to `TreeCellEditor`? > > Isn't this is another way around? The doc says that the object implementing this interface can be used "as an editor of values for components such as XXX", and it does not say that the XXX class should support the CellTableEditor? > For example, the DefaultCellEditor class can be used as an editor for JComboBox/JCheckBox/JTextField. Hm? It's not the other way around. `DefaultCellEditor` implements `TableCellEditor`; the interface defines the `getTableCellEditorComponent` method that returns the _real component_ which will be used as the value editor. So yeah, you're absolutely right: the current statement in the doc seems wrong. I'm for changing the Javadoc for `TableCellEditor` to be similar to `TreeCellEditor`: _?Adds to CellEditor the extensions necessary to configure an editor in a table.?_ The object that implements the interface is not necessarily the editor for values. `DefaultCellEditor` is the perfect example: it's not an editor itself, it's not even a component, all it does is configures a delegate, a `JComponent`, which serves as the editor. ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From psadhukhan at openjdk.java.net Wed Dec 15 17:38:58 2021 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 15 Dec 2021 17:38:58 GMT Subject: RFR: 8278348: [macos12] javax/swing/JTree/4908142/bug4908142.java fails in macos12 In-Reply-To: References: Message-ID: On Tue, 14 Dec 2021 05:44:17 GMT, Prasanta Sadhukhan wrote: > Test seem to be failing in macos12.0.1 (although it does not seem to affect 12.1) due to keypresses of "a", "a", "d" is not selecting "aad" but "ade" which seems to point to the fact that 2 exclusive "a" keypress are considered as 1 "a" keypress. > Although I am not able to reroduce this issue if test is ran standalone or in JTree group, but it fails when ran as toplevel "jdk_desktop" testgroup or even whole swing test group. > > Looking at text navigational algorithm probably done in JDK-4908142 (although I am not sure if this is done for that bug or subsequently revised) > https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java#L3804 > > it seems if a subsequent key press comes after a predefined timefactor after the previous keypress, it is considered as a fresh/new keypress and not part of ongoing string search ie, if 2nd "a" comes after the predefined timefactor from 1st "a', then seacrh algorithm will search for "ad" and not "aad" as can be seen here > https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java#L3815 > > I am not sure why macos12 will take so long for 2nd "a" keypress but the logs corraborates that it does take more than "timefactor" time what is set now, which is 1000. > 1st "a" keypress, we have time 1639400688049 lastTime 0 typedString a > 2nd "a" keypress, we have time 1639400691150 lastTime 1639400688049 typedString a [which is diff of 3101] > > So, proposed fix is to configure "Tree.timeFactor" to 5000 to workaround this macos12 issue. It pass when full desktop tests is run in macos12 and also test passes in all platforms. As per the logs I have put in CRobot.m#Java_sun_lwawt_macosx_CRobot_keyEvent we get 1st "a" keypress, 2021-12-15 17:27:30.721 java[3040:167835] java keyCode 41 2021-12-15 17:27:30.721 java[3040:167835] Before autoDelay CFAbsoluteTimeGetCurrent 661282050.721198 2nd "a" keypress 2021-12-15 17:27:33.865 java[3040:167835] java keyCode 41 2021-12-15 17:27:33.865 java[3040:167835] Before autoDelay CFAbsoluteTimeGetCurrent 661282053.865368 ==> difference of 3.144 "d" keypress 2021-12-15 17:27:33.994 java[3040:167835] java keyCode 44 2021-12-15 17:27:33.994 java[3040:167835] Before autoDelay CFAbsoluteTimeGetCurrent 661282053.994263 ==> difference of 0.128 ------------- PR: https://git.openjdk.java.net/jdk/pull/6826 From duke at openjdk.java.net Wed Dec 15 18:03:02 2021 From: duke at openjdk.java.net (Andrey Turbanov) Date: Wed, 15 Dec 2021 18:03:02 GMT Subject: RFR: 8274898: Cleanup usages of StringBuffer in jdk tools modules In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 06:53:13 GMT, Andrey Turbanov wrote: > StringBuffer is a legacy synchronized class. StringBuilder is a direct replacement to StringBuffer which generally have better performance > @turbanoff Only [Committers](https://openjdk.java.net/bylaws#committer) are allowed to sponsor changes. But I am a Committer ? ------------- PR: https://git.openjdk.java.net/jdk/pull/5433 From duke at openjdk.java.net Wed Dec 15 19:32:04 2021 From: duke at openjdk.java.net (Andrey Turbanov) Date: Wed, 15 Dec 2021 19:32:04 GMT Subject: Integrated: 8274898: Cleanup usages of StringBuffer in jdk tools modules In-Reply-To: References: Message-ID: On Thu, 9 Sep 2021 06:53:13 GMT, Andrey Turbanov wrote: > StringBuffer is a legacy synchronized class. StringBuilder is a direct replacement to StringBuffer which generally have better performance This pull request has now been integrated. Changeset: 04dbdd36 Author: Andrey Turbanov Committer: Serguei Spitsyn URL: https://git.openjdk.java.net/jdk/commit/04dbdd36dd04bf40737cb8c2f13d5b75303d2b1a Stats: 8 lines in 3 files changed: 0 ins; 0 del; 8 mod 8274898: Cleanup usages of StringBuffer in jdk tools modules Reviewed-by: sspitsyn, lmesnik ------------- PR: https://git.openjdk.java.net/jdk/pull/5433 From dholmes at openjdk.java.net Wed Dec 15 21:41:02 2021 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 15 Dec 2021 21:41:02 GMT Subject: RFR: 8274898: Cleanup usages of StringBuffer in jdk tools modules In-Reply-To: References: Message-ID: On Wed, 15 Dec 2021 17:59:54 GMT, Andrey Turbanov wrote: > > @turbanoff Only [Committers](https://openjdk.java.net/bylaws#committer) are allowed to sponsor changes. > > But I am a Committer ? You can't "sponsor" your own change. I suspect your Committer status changed after the bot initially checked your status way back in September. Not sure how often the bot will recheck that. ------------- PR: https://git.openjdk.java.net/jdk/pull/5433 From serb at openjdk.java.net Wed Dec 15 23:02:02 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 15 Dec 2021 23:02:02 GMT Subject: RFR: 8277463: JFileChooser with Metal L&F doesn't show non-canonical UNC path in - Look in In-Reply-To: References: Message-ID: <1APEWt6EfSMXZSLa9JNxgLwQpdtfpOBE1VBgXCUntxM=.83285e41-fd61-452d-b3bf-7da6ce4f432b@github.com> On Fri, 10 Dec 2021 08:59:55 GMT, Masanori Yano wrote: > I would like to fix the bug reported in JDK-8277463. > > As reporter's investigation, ShellFolder.getNormalizedFile() returns incorrect value for non-canonical Windows UNC path. getNormalizedFile() is used for symbolic link path, but Windows environment does not handle symbolic link. And, getCanonicalFile() returns correct path for a directory link in Windows which is made with `mklink` command. So getNormalizedFile() should perform to return getCanonicalFile() like WindowsFileChooserUI.addItem() at Windows environment. src/java.desktop/share/classes/sun/awt/shell/ShellFolder.java line 301: > 299: if (f.equals(canonical) || OSInfo.getOSType() == OSInfo.OSType.WINDOWS) { > 300: // path of f doesn't contain symbolic links > 301: return canonical; Is it possible that the code below was used when the "Libraries" or some "virtual folders" were navigated? test/jdk/javax/swing/JFileChooser/8277463/UNCFileChooserTest.java line 105: > 103: throw new RuntimeException("Enter the directory path to test."); > 104: } > 105: UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); The test might be executed under some non-default L&F and switching it here might cause some issues for the instruction dialog which will not be updated to use the metal. So it is better to set metal at the start of the test. ------------- PR: https://git.openjdk.java.net/jdk/pull/6796 From serb at openjdk.java.net Wed Dec 15 23:06:58 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 15 Dec 2021 23:06:58 GMT Subject: RFR: 8278828 : java/awt/a11y/AccessibleTextTest.java's createTextArea() just shows instructions on the UI In-Reply-To: References: Message-ID: On Wed, 15 Dec 2021 02:21:35 GMT, lawrence.andrews wrote: > 1) Test scenario was just showing test instruction with JTextArea. So added the JTextArea as the instruction and method says. > 2) JTextArea is filled with contents so that and an Emoji character making sure that screen reader can read Emoji also. > 3) Now user can user arrow keys to navigate the JTextArea and screen reader can read it. > > @shurymury > > Attached the screen shot of the test UI which contains JTextArea along with the instruction. > Screen Shot 2021-12-14 at 7 09 14 PM @savoptik please take a look. ------------- PR: https://git.openjdk.java.net/jdk/pull/6844 From serb at openjdk.java.net Wed Dec 15 23:10:07 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 15 Dec 2021 23:10:07 GMT Subject: RFR: 8278348: [macos12] javax/swing/JTree/4908142/bug4908142.java fails in macos12 In-Reply-To: References: Message-ID: On Tue, 14 Dec 2021 05:44:17 GMT, Prasanta Sadhukhan wrote: > Test seem to be failing in macos12.0.1 (although it does not seem to affect 12.1) due to keypresses of "a", "a", "d" is not selecting "aad" but "ade" which seems to point to the fact that 2 exclusive "a" keypress are considered as 1 "a" keypress. > Although I am not able to reroduce this issue if test is ran standalone or in JTree group, but it fails when ran as toplevel "jdk_desktop" testgroup or even whole swing test group. > > Looking at text navigational algorithm probably done in JDK-4908142 (although I am not sure if this is done for that bug or subsequently revised) > https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java#L3804 > > it seems if a subsequent key press comes after a predefined timefactor after the previous keypress, it is considered as a fresh/new keypress and not part of ongoing string search ie, if 2nd "a" comes after the predefined timefactor from 1st "a', then seacrh algorithm will search for "ad" and not "aad" as can be seen here > https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicTreeUI.java#L3815 > > I am not sure why macos12 will take so long for 2nd "a" keypress but the logs corraborates that it does take more than "timefactor" time what is set now, which is 1000. > 1st "a" keypress, we have time 1639400688049 lastTime 0 typedString a > 2nd "a" keypress, we have time 1639400691150 lastTime 1639400688049 typedString a [which is diff of 3101] > > So, proposed fix is to configure "Tree.timeFactor" to 5000 to workaround this macos12 issue. It pass when full desktop tests is run in macos12 and also test passes in all platforms. Does it mean that 3.144 after the first press is a delay caused by some code in the robot? ------------- PR: https://git.openjdk.java.net/jdk/pull/6826 From serb at openjdk.java.net Wed Dec 15 23:14:59 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 15 Dec 2021 23:14:59 GMT Subject: RFR: 6496103: isFileHidingEnabled return false by default [v2] In-Reply-To: <_1B7etqqNdNJ3-ko8rVwgxn8q8X6aGdY_d3rSTJSDOI=.76a14d6c-db9d-487d-98c0-869ced810842@github.com> References: <_C3lDw9NYzxbZtUdu44cRMEHaa6NhTV6fJWB-ho59yo=.eeda6bb0-81b0-4f0d-9c3b-58fbaa1c433d@github.com> <_1B7etqqNdNJ3-ko8rVwgxn8q8X6aGdY_d3rSTJSDOI=.76a14d6c-db9d-487d-98c0-869ced810842@github.com> Message-ID: On Wed, 15 Dec 2021 06:25:54 GMT, Tejesh R wrote: >> src/java.desktop/share/classes/javax/swing/JFileChooser.java line 1416: >> >>> 1414: * Returns true if hidden files are not shown in the file chooser; >>> 1415: * otherwise, returns false. The default value of this property is derived from native platform, >>> 1416: * unless set explicitly by the developer. >> >> Looks like the rest of the file uses the terms "by the programmer" and "This default depends on the operating system.", >> also please split the long line up to 80 chars. > > Sure @mrserb , updated the PR. Not sure the "native" is needed in the new version, any other thoughts from anyone? ------------- PR: https://git.openjdk.java.net/jdk/pull/6780 From prr at openjdk.java.net Wed Dec 15 23:53:06 2021 From: prr at openjdk.java.net (Phil Race) Date: Wed, 15 Dec 2021 23:53:06 GMT Subject: RFR: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box [v10] In-Reply-To: References: Message-ID: On Fri, 19 Nov 2021 19:09:54 GMT, Jeremy wrote: >> This removes code that relied on consulting the Bezier control points to calculate the Rectangle2D bounding box. Instead it's pretty straight-forward to convert the Bezier control points into the x & y parametric equations. At their most complex these equations are cubic polynomials, so calculating their extrema is just a matter of applying the quadratic formula to calculate their extrema. (Or in path segments that are quadratic/linear/constant: we do even less work.) >> >> The bug writeup indicated they wanted Path2D#getBounds2D() to be more accurate/concise. They didn't explicitly say they wanted CubicCurve2D and QuadCurve2D to become more accurate too. But a preexisting unit test failed when Path2D#getBounds2D() was updated and those other classes weren't. At this point I considered either: >> A. Updating CubicCurve2D and QuadCurve2D to use the new more accurate getBounds2D() or >> B. Updating the unit test to forgive the discrepancy. >> >> I chose A. Which might technically be seen as scope creep, but it feels like a more holistic/better approach. >> >> Other shapes in java.awt.geom should not require updating, because they already identify concise bounds. >> >> This also includes a new unit test (in Path2D/UnitTest.java) that fails without the changes in this commit. > > Jeremy has updated the pull request incrementally with one additional commit since the last revision: > > 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box > > Addressing code review feedback: "Use BigDecomal.setScale(40) to ascertain precision." > > The geom.* unit tests passed before & after this change. > > https://github.com/openjdk/jdk/pull/6227#discussion_r752908494 There seems to be a number of things to discuss aside from the maths - You are changing the signature of public API src/java.desktop/share/classes/java/awt/geom/Path2D.java public final synchronized Rectangle2D getBounds2D() => public Rectangle2D getBounds2D() { So no longer final, and no longer synchronized. This means a CSR is required and we need to think about it .. the intention was that the subclass not over-ride. And why remove synchronized ? I am fairly sure it was there to make sure no one was mutating the Path whilst bounds are being calculated. And you are using getPathIterator(AffineTransform) and the docs for that say it isn't thread safe. So I think this implementation needs to be thought about very carefully. - You are adding a new public static method public static Rectangle2D getBounds2D(final PathIterator pi); Is this really necessary ? It is just for the benefit of the public API caller so can be package private. - For me it doesn't build because of a doclint error src/java.desktop/share/classes/java/awt/geom/Path2D.java:2102: warning: no @param for pi public static Rectangle2D getBounds2D(final PathIterator pi) { ^ error: warnings found and -Werror specified Fixing that I find that the updated UnitTest.java fail with a build with these changes :- % java UnitTest Exception in thread "main" java.lang.RuntimeException: the shape must not intersect anything above its bounds at UnitTest.testGetBounds2D(UnitTest.java:1396) at UnitTest.testBounds(UnitTest.java:1302) at UnitTest.test(UnitTest.java:1175) at UnitTest.main(UnitTest.java:1435) Then we have some even more difficult questions. The control points may not be within the bounds of the curve which is of course the premise of the bug report. The specification (javadoc) isn't very forthcoming on whether it is allowed to not include them .. ie is it expected they should be ? And it appears we have JCK tests which expect they ARE included. So as it is this change would not pass the existing TCK/JCK. Which means we'd have to be 100% sure about this change in behaviour and be able to justify it. FWIW unless the spec explicitly says they are, in some place I've overlooked, then I'd say its a quality-of-implementation thing as to how tight the bounds are, and the new behaviour is allowed by spec. Applications however might still find this a behaviourally incompatible change .. and could potentially see undesirable consequences - even as other applications see better consequences. So perhaps new API that defines tighter bounds might be the way to address this .. but I am far from being sure about that. ------------- PR: https://git.openjdk.java.net/jdk/pull/6227 From serb at openjdk.java.net Thu Dec 16 01:27:56 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 16 Dec 2021 01:27:56 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v9] In-Reply-To: References: <49gYRPX_QAzZcEsFovkzHbBn2I28lXo-3fYDHmYSUD0=.cf6525da-c24b-406f-ad90-2eabcbd840c3@github.com> Message-ID: <6JyL0M3JjEdq2EBPO49TYQUhLx2wj1yjQE4iO_JeCfI=.45c694ba-8556-4b03-b6a7-d9ff93e14cf0@github.com> On Mon, 13 Dec 2021 17:54:19 GMT, Liam Miller-Cushon wrote: > I'm happy to update this change to scrap the test if there's agreement that's the best resolution. I disagree to do that. First, the test is quite important to check the broken serialization form, see the initial bug report. Second, the test proved to be useful since it found two additional bugs. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From cushon at openjdk.java.net Thu Dec 16 01:36:59 2021 From: cushon at openjdk.java.net (Liam Miller-Cushon) Date: Thu, 16 Dec 2021 01:36:59 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v9] In-Reply-To: <49gYRPX_QAzZcEsFovkzHbBn2I28lXo-3fYDHmYSUD0=.cf6525da-c24b-406f-ad90-2eabcbd840c3@github.com> References: <49gYRPX_QAzZcEsFovkzHbBn2I28lXo-3fYDHmYSUD0=.cf6525da-c24b-406f-ad90-2eabcbd840c3@github.com> Message-ID: On Fri, 10 Dec 2021 17:03:49 GMT, Liam Miller-Cushon wrote: >> This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). > > Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision: > > Add a few more missing calls to LookAndFeel.uninstallColors Ok! So is the idea to wait for a separate fix for [JDK-8278620](https://bugs.openjdk.java.net/browse/JDK-8278620), and then update the checked-in serialized objects and re-enable the test? What do you think of the suggestion to simplify the test to write out the objects and then read them in, without persistent serialization, since there was some discussion about that being explicitly unsupported? I'm still not sure how that would be achieved with the current test, since it relies on modifications to `DragGestureEvent` and `DragGestureRecognize` to serialize the objects? ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From serb at openjdk.java.net Thu Dec 16 05:20:53 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 16 Dec 2021 05:20:53 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v5] In-Reply-To: References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> <70BX5SXk_YBwACbsXf3aMS4KytQQoxkwNhXuuRgOYgo=.4e15bbad-05b2-456a-965d-b9c20b9c6303@github.com> <_yyT1DE1iec1ea6SsjCE-wT6fBrkBrws9Co61mbukNs=.572220ae-c3a4-4363-864a-bcfcc51c0e73@github.com> Message-ID: On Wed, 15 Dec 2021 16:46:17 GMT, Alexey Ivanov wrote: > The object that implements the interface is not necessarily the editor for values. DefaultCellEditor is the perfect example: it's not an editor itself, it's not even a component, all it does is configures a delegate, a JComponent, which serves as the editor. My thoughts about this. The object which implements the interface is always the "editor", even if it is not a component. I guess you are mixing it with the other classes like "JEditorPane/JTextField/etc". The current spec: >This interface defines the method any object that would like to be an editor of values for components such as JListBox, JComboBox, JTree, or JTable needs to implement. This means that the application may have some values/data stored in the JComboBox/JTree/JTable and the application may create a cell editor by implementing the TableCellEditor. That editor then could be used as a cell editor in the "main" JTable. So the next statement in the description of this PR is not completely right: > "CellTableEditor Interface doesn't support JComboBox and JTree components" The JComboBox and other classes do not have to implement/support that interface. ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From serb at openjdk.java.net Thu Dec 16 05:38:56 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 16 Dec 2021 05:38:56 GMT Subject: RFR: 8278050: Armenian text isn't rendered on macOS if text layout is performed In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 10:52:38 GMT, Dmitry Batrak wrote: > The problem is related to the implementation of font fallback on macOS, specifically to the path used when text layout > is performed, i.e. the one using `FontSubstitution` and cascade lists. `CTFontCopyDefaultCascadeListForLanguages`'s output contains an entry for the font, able to render Armenian text ('NotoSansArmenian-Regular'), but `CFont.createCompositeFont` cannot find this font amongst registered fonts, and the entry is skipped, resulting in broken rendering. > System font loading (performed by `CFontManager.loadNativeFonts`) relies on `[NSFontManager availableFontFamilies]`, but its output doesn't contain 'Noto Sans Armenian' (which is a family for 'NotoSansArmenian-Regular' font). 'Noto Sans Armenian' is recognized by `[NSFontManager availableMembersOfFontFamily:]` though, 'NotoSansArmenian-Regular' is contained in `[NSFontManager availableFonts]` output, and the font can be created and used normally, just like any other system font. Not sure why its family is 'hidden', maybe macOS developers wanted to limit the number of options > displayed in font selection drop-downs. > For reference, another cascade list item, ignored in similar way is 'NotoSansZawgyi-Regular'. > > Proposed fix is to create `CFont` objects for cascade list items explicitly, if corresponding fonts are not registered. These objects are re-used between different fonts as their fallback components (to enable caching of char-to-glyph mapping), but are not made available to public font APIs. > I've considered an alternative solution - using `[NSFontManager availableFonts]` instead of > `[NSFontManager availableFontFamilies]` to load system fonts. Two factors complicate it though - `loadNativeFonts` will > take more time (on my machine about 170 additional fonts will be loaded) and the order of font loading will change (which > impacts the selection of 'preferred' plain/bold/italic/bolditalic components in `FontFamily` class). Both factors can be > dealt with, but they make the solution more complicated and prone to regressions. For now, it seems not worth it. > > I've not created a test, as it would rely on macOS providing a fallback font for Armenian script, which is not guaranteed. > Existing tests pass fine with the fix. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6633 From serb at openjdk.java.net Thu Dec 16 05:38:57 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 16 Dec 2021 05:38:57 GMT Subject: RFR: 8278050: Armenian text isn't rendered on macOS if text layout is performed In-Reply-To: References: Message-ID: On Wed, 15 Dec 2021 08:49:04 GMT, Dmitry Batrak wrote: >> src/java.desktop/macosx/classes/sun/font/CFontManager.java line 337: >> >>> 335: // These fonts are present in [NSFontManager availableFonts] output though, >>> 336: // and can be accessed in the same way as other system fonts. >>> 337: return fallbackFonts.computeIfAbsent(fontName, name -> new CFont(name, null)); >> >> I would like to clarify why we cannot merge the results of the availableFontFamilies and availableFonts? > >> I would like to clarify why we cannot merge the results of the availableFontFamilies and availableFonts? > > We can do it, if everyone is OK with increasing the scope of the change, due to the following factors: > * The number of fonts advertised via `GraphicsEnvironment.getAllFonts` and `GraphicsEnvironment.getAvailableFontFamilyNames` will increase, so a potential Java application showing a font chooser combo-box will display more fonts there, than a native macOS application. Not sure whether that's a good or a bad thing, but that's a change in behaviour that will occur. > * As the number of loaded fonts will increase, the execution time of `CFontManager.loadNativeFonts` will also increase, introducing a certain regression in Java UI application startup time. Ideally, this should be fixed simultaneously, e.g. by adjusting `sun.font.FontFamily` logic to perform style resolution lazily (when the particular family is accessed), not at the time `loadNativeFonts` is executed. > * `[NSFontManager availableFonts]` returns the fonts in alphabetical order, while `NSFontManager availableMembersOfFontFamily:]` (used currently) uses font weight to sort the results. The order in which fonts are processed during `loadNativeFonts` impacts the resulting resolution of fonts into styles in `FontFamily`. So, to keep the currently used approach, an additional fonts sorting would need to be introduced - that can be done, e.g. as part of lazy resolution in `FontFamily` mentioned above. > > Even though it can make sense to implement all of the above (which JetBrains Runtime already does), I'd rather not do everything in one go. For now, what I'd like to achieve is to switch to `CTFontCopyDefaultCascadeListForLanguages`-based font fallback, as mentioned above. And current change, while having a value of its own, is a necessary step towards that. > If OpenJDK will ever switch to using `[NSFontManager availableFonts]`, as a sole source of system fonts or in addition to `[NSFontManager availableFontFamilies]`, this change can just be reverted. Ok, let's investigate that possibility separately. ------------- PR: https://git.openjdk.java.net/jdk/pull/6633 From duke at openjdk.java.net Thu Dec 16 06:51:57 2021 From: duke at openjdk.java.net (Tejesh R) Date: Thu, 16 Dec 2021 06:51:57 GMT Subject: RFR: 6496103: isFileHidingEnabled return false by default [v2] In-Reply-To: References: <_C3lDw9NYzxbZtUdu44cRMEHaa6NhTV6fJWB-ho59yo=.eeda6bb0-81b0-4f0d-9c3b-58fbaa1c433d@github.com> <_1B7etqqNdNJ3-ko8rVwgxn8q8X6aGdY_d3rSTJSDOI=.76a14d6c-db9d-487d-98c0-869ced810842@github.com> Message-ID: On Wed, 15 Dec 2021 23:11:34 GMT, Sergey Bylokhov wrote: >> Sure @mrserb , updated the PR. > > Not sure the "native" is needed in the new version, any other thoughts from anyone? Yeah, "native OS" and "OS" gives same meaning I guess.. ------------- PR: https://git.openjdk.java.net/jdk/pull/6780 From dbatrak at openjdk.java.net Thu Dec 16 07:18:00 2021 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Thu, 16 Dec 2021 07:18:00 GMT Subject: Integrated: 8278050: Armenian text isn't rendered on macOS if text layout is performed In-Reply-To: References: Message-ID: On Wed, 1 Dec 2021 10:52:38 GMT, Dmitry Batrak wrote: > The problem is related to the implementation of font fallback on macOS, specifically to the path used when text layout > is performed, i.e. the one using `FontSubstitution` and cascade lists. `CTFontCopyDefaultCascadeListForLanguages`'s output contains an entry for the font, able to render Armenian text ('NotoSansArmenian-Regular'), but `CFont.createCompositeFont` cannot find this font amongst registered fonts, and the entry is skipped, resulting in broken rendering. > System font loading (performed by `CFontManager.loadNativeFonts`) relies on `[NSFontManager availableFontFamilies]`, but its output doesn't contain 'Noto Sans Armenian' (which is a family for 'NotoSansArmenian-Regular' font). 'Noto Sans Armenian' is recognized by `[NSFontManager availableMembersOfFontFamily:]` though, 'NotoSansArmenian-Regular' is contained in `[NSFontManager availableFonts]` output, and the font can be created and used normally, just like any other system font. Not sure why its family is 'hidden', maybe macOS developers wanted to limit the number of options > displayed in font selection drop-downs. > For reference, another cascade list item, ignored in similar way is 'NotoSansZawgyi-Regular'. > > Proposed fix is to create `CFont` objects for cascade list items explicitly, if corresponding fonts are not registered. These objects are re-used between different fonts as their fallback components (to enable caching of char-to-glyph mapping), but are not made available to public font APIs. > I've considered an alternative solution - using `[NSFontManager availableFonts]` instead of > `[NSFontManager availableFontFamilies]` to load system fonts. Two factors complicate it though - `loadNativeFonts` will > take more time (on my machine about 170 additional fonts will be loaded) and the order of font loading will change (which > impacts the selection of 'preferred' plain/bold/italic/bolditalic components in `FontFamily` class). Both factors can be > dealt with, but they make the solution more complicated and prone to regressions. For now, it seems not worth it. > > I've not created a test, as it would rely on macOS providing a fallback font for Armenian script, which is not guaranteed. > Existing tests pass fine with the fix. This pull request has now been integrated. Changeset: 0bddd8af Author: Dmitry Batrak URL: https://git.openjdk.java.net/jdk/commit/0bddd8af61b6c731f16b857c09de57ceefd72d06 Stats: 18 lines in 2 files changed: 16 ins; 0 del; 2 mod 8278050: Armenian text isn't rendered on macOS if text layout is performed Reviewed-by: prr, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/6633 From kizune at openjdk.java.net Thu Dec 16 08:22:05 2021 From: kizune at openjdk.java.net (Alexander Zuev) Date: Thu, 16 Dec 2021 08:22:05 GMT Subject: [jdk18] RFR: 8278604 SwingSet2 table demo does not have accessible description set for images In-Reply-To: References: Message-ID: <3nbz5jwFvbr6sbDJZIc0f6euga6ZXXOFKH5JySBczkU=.041f0b47-b24d-426f-84d2-4f3167631f1d@github.com> On Wed, 15 Dec 2021 12:43:40 GMT, Artem Semenov wrote: > SwingSet2 demo is often used to check accessibility for different Swing components and has some shortcomings. The major one is that images within the table demo do not have accessible description set which makes accessibility perform differently on different platforms when navigating the table with screen narrator enabled. > > This is the next step after the solution [JDK-8277497](https://bugs.openjdk.java.net/browse/JDK-8277497), in which we forwarded the description from the icon into the label description so that this fix was possible. Marked as reviewed by kizune (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk18/pull/31 From asemenov at openjdk.java.net Thu Dec 16 08:38:00 2021 From: asemenov at openjdk.java.net (Artem Semenov) Date: Thu, 16 Dec 2021 08:38:00 GMT Subject: RFR: 8278828 : java/awt/a11y/AccessibleTextTest.java's createTextArea() just shows instructions on the UI In-Reply-To: References: Message-ID: On Wed, 15 Dec 2021 02:21:35 GMT, lawrence.andrews wrote: > 1) Test scenario was just showing test instruction with JTextArea. So added the JTextArea as the instruction and method says. > 2) JTextArea is filled with contents so that and an Emoji character making sure that screen reader can read Emoji also. > 3) Now user can user arrow keys to navigate the JTextArea and screen reader can read it. > > @shurymury > > Attached the screen shot of the test UI which contains JTextArea along with the instruction. > Screen Shot 2021-12-14 at 7 09 14 PM test/jdk/java/awt/a11y/AccessibleTextTest.java line 142: > 140: panel.setLayout(new FlowLayout()); > 141: JTextArea textArea = new JTextArea(value); > 142: panel.add(textArea); Hello. @mrserb Thanks for the invitation. This addition seems redundant to me. This is a test for a non-editable JTextArea. In it, the instruction is the same as the test. If you press "Pass", the next test will appear, which has a multi-line text editor. This will also be a JTextArea, but already editable. ------------- PR: https://git.openjdk.java.net/jdk/pull/6844 From duke at openjdk.java.net Thu Dec 16 10:08:02 2021 From: duke at openjdk.java.net (Tejesh R) Date: Thu, 16 Dec 2021 10:08:02 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v5] In-Reply-To: References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> <70BX5SXk_YBwACbsXf3aMS4KytQQoxkwNhXuuRgOYgo=.4e15bbad-05b2-456a-965d-b9c20b9c6303@github.com> <_yyT1DE1iec1ea6SsjCE-wT6fBrkBrws9Co61mbukNs=.572220ae-c3a4-4363-864a-bcfcc51c0e73@github.com> Message-ID: On Thu, 16 Dec 2021 05:18:04 GMT, Sergey Bylokhov wrote: >> Hm? It's not the other way around. `DefaultCellEditor` implements `TableCellEditor`; the interface defines the `getTableCellEditorComponent` method that returns the _real component_ which will be used as the value editor. >> >> So yeah, you're absolutely right: the current statement in the doc seems wrong. >> >> I'm for changing the Javadoc for `TableCellEditor` to be similar to `TreeCellEditor`: _?Adds to CellEditor the extensions necessary to configure an editor in a table.?_ >> >> The object that implements the interface is not necessarily the editor for values. `DefaultCellEditor` is the perfect example: it's not an editor itself, it's not even a component, all it does is configures a delegate, a `JComponent`, which serves as the editor. > >> The object that implements the interface is not necessarily the editor for values. DefaultCellEditor is the perfect example: it's not an editor itself, it's not even a component, all it does is configures a delegate, a JComponent, which serves as the editor. > > My thoughts about this. The object which implements the interface is always the "editor", even if it is not a component. I guess you are mixing it with the other classes like "JEditorPane/JTextField/etc". > > The current spec: > >>This interface defines the method any object that would like to be > an editor of values for components such as JListBox, > JComboBox, JTree, or JTable > needs to implement. > > This means that the application may have some values/data stored in the JComboBox/JTree/JTable and the application may create a cell editor by implementing the TableCellEditor. That editor then could be used as a cell editor in the "main" JTable. > > So the next statement in the description of this PR is not completely right: >> "CellTableEditor Interface doesn't support JComboBox and JTree components" > > The JComboBox and other classes do not have to implement/support that interface. Yeah, if u refer this example page [https://bip.weizmann.ac.il/course/prog2/tutorial/uiswing/components/example-1dot4/ColorEditor.java], the interface is used for a cell in a table which has a button in turn invokes "JColorChooser" class. Which means the interface is used to store a particular value while the cell in is editor mode......? ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From duke at openjdk.java.net Thu Dec 16 10:32:00 2021 From: duke at openjdk.java.net (Tejesh R) Date: Thu, 16 Dec 2021 10:32:00 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v5] In-Reply-To: References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> <70BX5SXk_YBwACbsXf3aMS4KytQQoxkwNhXuuRgOYgo=.4e15bbad-05b2-456a-965d-b9c20b9c6303@github.com> <_yyT1DE1iec1ea6SsjCE-wT6fBrkBrws9Co61mbukNs=.572220ae-c3a4-4363-864a-bcfcc51c0e73@github.com> Message-ID: On Thu, 16 Dec 2021 10:04:49 GMT, Tejesh R wrote: >>> The object that implements the interface is not necessarily the editor for values. DefaultCellEditor is the perfect example: it's not an editor itself, it's not even a component, all it does is configures a delegate, a JComponent, which serves as the editor. >> >> My thoughts about this. The object which implements the interface is always the "editor", even if it is not a component. I guess you are mixing it with the other classes like "JEditorPane/JTextField/etc". >> >> The current spec: >> >>>This interface defines the method any object that would like to be >> an editor of values for components such as JListBox, >> JComboBox, JTree, or JTable >> needs to implement. >> >> This means that the application may have some values/data stored in the JComboBox/JTree/JTable and the application may create a cell editor by implementing the TableCellEditor. That editor then could be used as a cell editor in the "main" JTable. >> >> So the next statement in the description of this PR is not completely right: >>> "CellTableEditor Interface doesn't support JComboBox and JTree components" >> >> The JComboBox and other classes do not have to implement/support that interface. > > Yeah, if u refer this example page [https://bip.weizmann.ac.il/course/prog2/tutorial/uiswing/components/example-1dot4/ColorEditor.java], the interface is used for a cell in a table which has a button in turn invokes "JColorChooser" class. Which means the interface is used to store a particular value while the cell in is editor mode......? After going on through the example, what I felt is "Adds to CellEditor the extensions necessary to configure an editor in a tree" is little generic description than the updated PR Definition. ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From duke at openjdk.java.net Thu Dec 16 11:25:44 2021 From: duke at openjdk.java.net (Jeremy) Date: Thu, 16 Dec 2021 11:25:44 GMT Subject: RFR: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box [v11] In-Reply-To: References: Message-ID: > This removes code that relied on consulting the Bezier control points to calculate the Rectangle2D bounding box. Instead it's pretty straight-forward to convert the Bezier control points into the x & y parametric equations. At their most complex these equations are cubic polynomials, so calculating their extrema is just a matter of applying the quadratic formula to calculate their extrema. (Or in path segments that are quadratic/linear/constant: we do even less work.) > > The bug writeup indicated they wanted Path2D#getBounds2D() to be more accurate/concise. They didn't explicitly say they wanted CubicCurve2D and QuadCurve2D to become more accurate too. But a preexisting unit test failed when Path2D#getBounds2D() was updated and those other classes weren't. At this point I considered either: > A. Updating CubicCurve2D and QuadCurve2D to use the new more accurate getBounds2D() or > B. Updating the unit test to forgive the discrepancy. > > I chose A. Which might technically be seen as scope creep, but it feels like a more holistic/better approach. > > Other shapes in java.awt.geom should not require updating, because they already identify concise bounds. > > This also includes a new unit test (in Path2D/UnitTest.java) that fails without the changes in this commit. Jeremy has updated the pull request incrementally with five additional commits since the last revision: - 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box Fixing compilation error now that Path2D#getBounds is not public - 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box Fixing unit test failures introduced with b3e84a5e4281c2bb9be1c7e1d751ef3593cc387c . (The likely explanation for why this went unaddressed previously is: I probably didn't correctly execute unit tests after this change. A less likely explanation might be: the Path2D/UnitTest class uses random numbers each session, so it's possible results passed in that session and failed in others.) - 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box Adding missing @param tag. This is in response to prrace's code review feedback: > For me it doesn't build because of a doclint error > src/java.desktop/share/classes/java/awt/geom/Path2D.java:2102: > warning: no @param for pi > public static Rectangle2D getBounds2D(final PathIterator pi) { > ^ > error: warnings found and -Werror specified https://github.com/openjdk/jdk/pull/6227#issuecomment-995305817 - 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box Make the new getBounds2D(PathIterator) method package private. This is in response to prrace's code review feedback: > public static Rectangle2D getBounds2D(final PathIterator pi); > > Is this really necessary ? It is just for the benefit of the > public API caller so can be package private. https://github.com/openjdk/jdk/pull/6227#issuecomment-995305817 Personally (having written custom java.awt.Shape classes) I think this method would be of general use (so it could be public), but if that's the minority opinion: I'm happy to convert it to package private for now. If we ever want to discuss making it public then that could be a separate PR/conversation. - 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box Restore the "final" and "synchronized" modifiers for this method. I don't think these were removed on purpose; the intent behind this PR is not related to the modifiers of the method. This is in response to prrace's code review comment: > So no longer final, and no longer synchronized. > This means a CSR is required and we need to think about it .. the > intention was that the subclass not over-ride. > And why remove synchronized ? I am fairly sure it was there to make > sure no one was mutating the Path whilst bounds are being calculated. > And you are using getPathIterator(AffineTransform) and the docs for > that say it isn't thread safe. > So I think this implementation needs to be thought about very carefully. https://github.com/openjdk/jdk/pull/6227#issuecomment-995305817 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6227/files - new: https://git.openjdk.java.net/jdk/pull/6227/files/76805330..d79f067d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6227&range=10 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6227&range=09-10 Stats: 9 lines in 3 files changed: 5 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/6227.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6227/head:pull/6227 PR: https://git.openjdk.java.net/jdk/pull/6227 From lbourges at openjdk.java.net Thu Dec 16 11:28:55 2021 From: lbourges at openjdk.java.net (Laurent =?UTF-8?B?Qm91cmfDqHM=?=) Date: Thu, 16 Dec 2021 11:28:55 GMT Subject: RFR: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box [v10] In-Reply-To: References: Message-ID: On Fri, 19 Nov 2021 19:09:54 GMT, Jeremy wrote: >> This removes code that relied on consulting the Bezier control points to calculate the Rectangle2D bounding box. Instead it's pretty straight-forward to convert the Bezier control points into the x & y parametric equations. At their most complex these equations are cubic polynomials, so calculating their extrema is just a matter of applying the quadratic formula to calculate their extrema. (Or in path segments that are quadratic/linear/constant: we do even less work.) >> >> The bug writeup indicated they wanted Path2D#getBounds2D() to be more accurate/concise. They didn't explicitly say they wanted CubicCurve2D and QuadCurve2D to become more accurate too. But a preexisting unit test failed when Path2D#getBounds2D() was updated and those other classes weren't. At this point I considered either: >> A. Updating CubicCurve2D and QuadCurve2D to use the new more accurate getBounds2D() or >> B. Updating the unit test to forgive the discrepancy. >> >> I chose A. Which might technically be seen as scope creep, but it feels like a more holistic/better approach. >> >> Other shapes in java.awt.geom should not require updating, because they already identify concise bounds. >> >> This also includes a new unit test (in Path2D/UnitTest.java) that fails without the changes in this commit. > > Jeremy has updated the pull request incrementally with one additional commit since the last revision: > > 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box > > Addressing code review feedback: "Use BigDecomal.setScale(40) to ascertain precision." > > The geom.* unit tests passed before & after this change. > > https://github.com/openjdk/jdk/pull/6227#discussion_r752908494 Last changes look good and I agree the synchronization is mandatory. Good job ------------- PR: https://git.openjdk.java.net/jdk/pull/6227 From dmitry.batrak at jetbrains.com Thu Dec 16 14:13:30 2021 From: dmitry.batrak at jetbrains.com (Dmitry Batrak) Date: Thu, 16 Dec 2021 17:13:30 +0300 Subject: macOS font fallback implementation discussion Message-ID: Hello, I'm working on modifications to JDK's font fallback implementation on macOS - first to be tested in JetBrains Runtime, and then planned for submission into OpenJDK - and I'd like to discuss the overall approach now, way before the pull-request stage. Currently, OpenJDK uses two macOS system functions to implement font fallback: `JRSFontCreateFallbackFontForCharacters` and `CTFontCopyDefaultCascadeListForLanguages`. Using two different functions in different code paths is a source of inconsistencies, and, I believe, it's generally agreed that some unified approach should be used instead. For the past 5 years, JetBrains Runtime solved this problem by using `JRSFontCreateFallbackFontForCharacters` exclusively for all code paths. But, as discussed previously [1], it's not a preferred solution (e.g. due to JDK-8024281). The obvious remaining alternative is to use `CTFontCopyDefaultCascadeListForLanguages` exclusively. It seems to work quite fine (see e.g. [2] for implementation details), a runtime build using such an approach is already used internally in the company. The only shortcoming I see is the smaller Unicode repertoire coverage. Taking, for example, 'Menlo' as a base font, with `JRSFontCreateFallbackFontForCharacters` used for fallback, we get about 72k Unicode code points covered, while with `CTFontCopyDefaultCascadeListForLanguages` - only about 60k. This is apparently due to a larger set of fonts used by `JRSFontCreateFallbackFontForCharacters` - investigation shows it can even use fonts installed by the user. Code points 'omitted' by the new approach belong to quite exotic scripts, e.g. the largest missing 'blocks' are for cuneiform and Egyptian hieroglyphs (each of them accounting for about 1k code points). So, I believe, it shouldn't be a significant problem, at least for our use cases, but this waits to be confirmed or denied in a public testing. What are your thoughts on this? Is such a regression in behaviour acceptable, or is it a no-go for OpenJDK, and the approach should be improved? To be more precise, switching to `CTFontCopyDefaultCascadeListForLanguages` for font fallback in a straightforward manner will make certain characters not renderable with plain `Graphics.drawString` call, while currently they are not renderable only in cases font has layout attributes (ligatures or kerning), or text layout is requested explicitly (via `Font.layoutGlyphVector` or using `TextLayout` class). Of course, we are talking about font fallback situation only - by selecting a font supporting those characters specifically, it is always possible to render the characters. Speaking of options to improve the coverage, the simplest one is, of course, extending the cascade list with additional fonts. Either some hardcoded list of them can be used, or a subset of the fonts available on the system selected by some criteria. E.g. using all 'Noto Sans *' fonts (there are about 100 of them on my macOS system) reduces the coverage gap to about 1k code points. This option is quite easy to implement, but it will require revisiting if future macOS versions will switch to some other fonts for fallback. Another possible option is to use `CTFontCreateForString` function, which is basically the same as `JRSFontCreateFallbackFontForCharacters`, but is a part of the public Core Text API. It can be used in addition to cascade list or as a sole source of font fallback information (as, I believe, it does use the same cascade list internally). This will require using a 'dynamic' variant of `CompositeFont`, which is populated during its usage, but that worked OK in JetBrains Runtime with `JRSFontCreateFallbackFontForCharacters`. A more extreme option would be to scan all available fonts, if the cascade list doesn't contain a suitable one, but I guess it might cause problems with performance. What do you think about it? Did I miss some viable options? Does it make sense to go beyond the default cascade list at all, at least in the initial version? [1] https://mail.openjdk.java.net/pipermail/2d-dev/2017-February/008205.html [2] https://github.com/JB-Dmitry/jdk/commits/macFontFallback Best regards, Dmitry Batrak From duke at openjdk.java.net Thu Dec 16 14:21:58 2021 From: duke at openjdk.java.net (lawrence.andrews) Date: Thu, 16 Dec 2021 14:21:58 GMT Subject: RFR: 8278828 : java/awt/a11y/AccessibleTextTest.java's createTextArea() just shows instructions on the UI In-Reply-To: References: Message-ID: On Thu, 16 Dec 2021 08:32:40 GMT, Artem Semenov wrote: >> 1) Test scenario was just showing test instruction with JTextArea. So added the JTextArea as the instruction and method says. >> 2) JTextArea is filled with contents so that and an Emoji character making sure that screen reader can read Emoji also. >> 3) Now user can user arrow keys to navigate the JTextArea and screen reader can read it. >> >> @shurymury >> >> Attached the screen shot of the test UI which contains JTextArea along with the instruction. >> Screen Shot 2021-12-14 at 7 09 14 PM > > test/jdk/java/awt/a11y/AccessibleTextTest.java line 142: > >> 140: panel.setLayout(new FlowLayout()); >> 141: JTextArea textArea = new JTextArea(value); >> 142: panel.add(textArea); > > Hello. @mrserb Thanks for the invitation. > This addition seems redundant to me. This is a test for a non-editable JTextArea. In it, the instruction is the same as the test. > If you press "Pass", the next test will appear, which has a multi-line text editor. This will also be a JTextArea, but already editable. Hi @savoptik, a) The test createTextArea() does not have JTextArea . I have attached the screen shot of the test https://bugs.openjdk.java.net/browse/JDK-8278828 b) The test does not say its a non-editable JTextArea. Even the exception String also say as follows exceptionString = "Simple text area test failed!"; . c) If user press "Pass" to see the next test then there is no need of createTextArea() . Correct me if I am wrong? ------------- PR: https://git.openjdk.java.net/jdk/pull/6844 From dbatrak at openjdk.java.net Thu Dec 16 15:59:19 2021 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Thu, 16 Dec 2021 15:59:19 GMT Subject: RFR: 8278908: [macOS] Unexpected text normalization on pasting from clipboard Message-ID: The fix just removes the explicit normalization of text obtained from system clipboard in JDK code, as I've found no good justification for such a normalization, at least for the latest macOS version. The same fix was performed in JetBrains Runtime by a user's request more than 4 years ago, and we didn't receive any related complaints from our users ever since. ------------- Commit messages: - fix Changes: https://git.openjdk.java.net/jdk/pull/6866/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6866&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278908 Stats: 11 lines in 2 files changed: 0 ins; 9 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/6866.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6866/head:pull/6866 PR: https://git.openjdk.java.net/jdk/pull/6866 From duke at openjdk.java.net Thu Dec 16 18:33:37 2021 From: duke at openjdk.java.net (Jeremy) Date: Thu, 16 Dec 2021 18:33:37 GMT Subject: RFR: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box [v12] In-Reply-To: References: Message-ID: > This removes code that relied on consulting the Bezier control points to calculate the Rectangle2D bounding box. Instead it's pretty straight-forward to convert the Bezier control points into the x & y parametric equations. At their most complex these equations are cubic polynomials, so calculating their extrema is just a matter of applying the quadratic formula to calculate their extrema. (Or in path segments that are quadratic/linear/constant: we do even less work.) > > The bug writeup indicated they wanted Path2D#getBounds2D() to be more accurate/concise. They didn't explicitly say they wanted CubicCurve2D and QuadCurve2D to become more accurate too. But a preexisting unit test failed when Path2D#getBounds2D() was updated and those other classes weren't. At this point I considered either: > A. Updating CubicCurve2D and QuadCurve2D to use the new more accurate getBounds2D() or > B. Updating the unit test to forgive the discrepancy. > > I chose A. Which might technically be seen as scope creep, but it feels like a more holistic/better approach. > > Other shapes in java.awt.geom should not require updating, because they already identify concise bounds. > > This also includes a new unit test (in Path2D/UnitTest.java) that fails without the changes in this commit. Jeremy has updated the pull request incrementally with one additional commit since the last revision: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box This is a second follow-up response to prrace's code review feedback about method modifiers. This commit more carefully preserves the getBounds2D() method modifiers for all 3 classes: the Path2D.Double, the Path2D.Float, and the Path2D itself. It is possible (if unlikely) that someone previously extended the Path2D class and overrode getBounds2D(), because the Path2D#getBounds2D() method was *not* final. So with this commit: any such existing code will not break. Meanwhile the subclasses (Double and Float) preserve their previous modifiers (final, synchronized). This is in response to prrace's code review: > You are changing the signature of public API > src/java.desktop/share/classes/java/awt/geom/Path2D.java > public final synchronized Rectangle2D getBounds2D() => public Rectangle2D getBounds2D() { > > So no longer final, and no longer synchronized. > This means a CSR is required and we need to think about it .. > the intention was that the subclass not over-ride. > And why remove synchronized ? I am fairly sure it was there to > make sure no one was mutating the Path whilst > bounds are being calculated. > And you are using getPathIterator(AffineTransform) and the docs > for that say it isn't thread safe. > So I think this implementation needs to be thought about very carefully. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6227/files - new: https://git.openjdk.java.net/jdk/pull/6227/files/d79f067d..faeb2419 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6227&range=11 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6227&range=10-11 Stats: 24 lines in 1 file changed: 16 ins; 8 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/6227.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6227/head:pull/6227 PR: https://git.openjdk.java.net/jdk/pull/6227 From duke at openjdk.java.net Thu Dec 16 18:37:05 2021 From: duke at openjdk.java.net (duke) Date: Thu, 16 Dec 2021 18:37:05 GMT Subject: Withdrawn: 8225777: java/awt/Mixing/MixingOnDialog.java fails on Ubuntu In-Reply-To: References: Message-ID: On Wed, 20 Oct 2021 12:05:57 GMT, Alexander Zvegintsev wrote: > Looks like the test started failing after increasing of window's title height in Ubuntu theme: > > ![image](https://user-images.githubusercontent.com/77687766/138088503-f380bcb2-1ffc-4d58-b6b2-2efc56b7975c.png) > So the click happens on windows title instead of the button. > > For example, macOS has smaller window title height, which allows test to pass. > > > Fix moves buttons away from window title. > ![image](https://user-images.githubusercontent.com/77687766/138088880-a9d1ec38-cde2-437e-80b9-5b7bdf73fd6b.png) > > Testing is green. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/6040 From asemenov at openjdk.java.net Thu Dec 16 19:26:00 2021 From: asemenov at openjdk.java.net (Artem Semenov) Date: Thu, 16 Dec 2021 19:26:00 GMT Subject: RFR: 8278828 : java/awt/a11y/AccessibleTextTest.java's createTextArea() just shows instructions on the UI In-Reply-To: References: Message-ID: On Thu, 16 Dec 2021 14:18:37 GMT, lawrence.andrews wrote: >> test/jdk/java/awt/a11y/AccessibleTextTest.java line 142: >> >>> 140: panel.setLayout(new FlowLayout()); >>> 141: JTextArea textArea = new JTextArea(value); >>> 142: panel.add(textArea); >> >> Hello. @mrserb Thanks for the invitation. >> This addition seems redundant to me. This is a test for a non-editable JTextArea. In it, the instruction is the same as the test. >> If you press "Pass", the next test will appear, which has a multi-line text editor. This will also be a JTextArea, but already editable. > > Hi @savoptik, > a) The test createTextArea() does not have JTextArea . I have attached the screen shot of the test https://bugs.openjdk.java.net/browse/JDK-8278828 > b) The test does not say its a non-editable JTextArea. Even the exception String also say as follows > exceptionString = "Simple text area test failed!"; . > c) If user press "Pass" to see the next test then there is no need of createTextArea() . Correct me if I am wrong? a) The test createTextArea() does not have JTextArea . YES, createTextArea () does not create a JTextArea, but the instruction field itself is not editable JTextArea. Take a look at the AccessibleComponentTest to be sure. b) The test does not say its a non-editable JTextArea. Even the exception String also say as follows exceptionString = "Simple text area test failed!"; . Yes, the instructions do not indicate that this is not an editable JTextArea, you can supplement the instructions. As well as an exception String. c) If user press "Pass" to see the next test then there is no need of createTextArea() . There is a need.This test tries to cover all cases and possible configurations of various text components: single-line, multi-line, editable, non-editable - and various possible combinations. It is also convenient to use them when developing and debugging native implementations of a11y, for which they were created by me. ------------- PR: https://git.openjdk.java.net/jdk/pull/6844 From duke at openjdk.java.net Thu Dec 16 21:42:05 2021 From: duke at openjdk.java.net (=?UTF-8?B?0KHQtdGA0LPQtdC5?= =?UTF-8?B?IA==?= =?UTF-8?B?0KbRi9C/0LDQvdC+0LI=?=) Date: Thu, 16 Dec 2021 21:42:05 GMT Subject: Integrated: 8277868: Use Comparable.compare() instead of surrogate code In-Reply-To: References: Message-ID: <5ZOhPiacNs5fjMH_6weWYlaPWVSqPMvRAXY2iT_6T68=.3e2499b4-45e6-497c-b5c0-d549d7c324e2@github.com> On Fri, 26 Nov 2021 12:46:59 GMT, ?????? ??????? wrote: > Instead of something like > > long x; > long y; > return (x < y) ? -1 : ((x == y) ? 0 : 1); > > we can use `return Long.compare(x, y);` > > All replacements are done with IDE. This pull request has now been integrated. Changeset: 20db7800 Author: Sergey Tsypanov Committer: Roger Riggs URL: https://git.openjdk.java.net/jdk/commit/20db7800a657b311eeac504a2bbae4adbc209dbf Stats: 77 lines in 12 files changed: 2 ins; 54 del; 21 mod 8277868: Use Comparable.compare() instead of surrogate code Reviewed-by: rriggs, aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/6575 From duke at openjdk.java.net Thu Dec 16 23:52:30 2021 From: duke at openjdk.java.net (Jeremy) Date: Thu, 16 Dec 2021 23:52:30 GMT Subject: RFR: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box [v10] In-Reply-To: References: Message-ID: On Wed, 15 Dec 2021 23:49:24 GMT, Phil Race wrote: >> Jeremy has updated the pull request incrementally with one additional commit since the last revision: >> >> 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box >> >> Addressing code review feedback: "Use BigDecomal.setScale(40) to ascertain precision." >> >> The geom.* unit tests passed before & after this change. >> >> https://github.com/openjdk/jdk/pull/6227#discussion_r752908494 > > There seems to be a number of things to discuss aside from the maths > > - You are changing the signature of public API > src/java.desktop/share/classes/java/awt/geom/Path2D.java > public final synchronized Rectangle2D getBounds2D() => public Rectangle2D getBounds2D() { > > So no longer final, and no longer synchronized. > This means a CSR is required and we need to think about it .. the intention was that the subclass not over-ride. > And why remove synchronized ? I am fairly sure it was there to make sure no one was mutating the Path whilst > bounds are being calculated. > And you are using getPathIterator(AffineTransform) and the docs for that say it isn't thread safe. > So I think this implementation needs to be thought about very carefully. > > - You are adding a new public static method > > public static Rectangle2D getBounds2D(final PathIterator pi); > > Is this really necessary ? It is just for the benefit of the public API caller so can be package private. > > - For me it doesn't build because of a doclint error > > src/java.desktop/share/classes/java/awt/geom/Path2D.java:2102: warning: no @param for pi > public static Rectangle2D getBounds2D(final PathIterator pi) { > ^ > error: warnings found and -Werror specified > > Fixing that I find that the updated UnitTest.java fail with a build with these changes :- > > % java UnitTest > Exception in thread "main" java.lang.RuntimeException: the shape must not intersect anything above its bounds > at UnitTest.testGetBounds2D(UnitTest.java:1396) > at UnitTest.testBounds(UnitTest.java:1302) > at UnitTest.test(UnitTest.java:1175) > at UnitTest.main(UnitTest.java:1435) > > Then we have some even more difficult questions. > The control points may not be within the bounds of the curve which is of course the premise of the bug report. > The specification (javadoc) isn't very forthcoming on whether it is allowed to not include them .. ie is it expected they should be ? > And it appears we have JCK tests which expect they ARE included. So as it is this change would not pass the existing TCK/JCK. > Which means we'd have to be 100% sure about this change in behaviour and be able to justify it. > FWIW unless the spec explicitly says they are, in some place I've overlooked, > then I'd say its a quality-of-implementation thing as to how tight the bounds are, and the new behaviour is allowed by spec. > Applications however might still find this a behaviourally incompatible change .. and could potentially see undesirable consequences - > even as other applications see better consequences. > So perhaps new API that defines tighter bounds might be the way to address this .. but I am far from being sure about that. @prrace thanks for your feedback. The first several points you raised were bugs/problems that I believe I have addressed just now. Specifically: 1. The method signatures were not meant to change, so the method modifiers are restored. 2. I see no reason why the new Path2D#getBounds2D() can't be package private for now. So that's updated. (If we ever want to change that: that can be a separate ticket/PR.) 3. The missing @param tag is fixed 4. The unit test failure you observed is fixed. (That's actually a new unit test. Although your point stands that existing tests had to be modified to adjust for this new behavior.) Regarding bigger issues, you wrote: > The specification (javadoc) isn't very forthcoming on whether [the bounding box] is allowed to not include > [control points] .. ie is it expected they should be ? I would argue the crux of the Shape#getBounds2D() contract is this phrase: "the Shape lies entirely within the indicated Rectangle2D". And by "Shape" the original authors probably mean "the defining outline" (a phrase referenced in the second paragraph of the javadoc). If instead the word "Shape" is interpreted as "all the points in the path, including control points" then (I think?) that means the Area class suddenly violates the contract. (Because it has always returned a very tight bounding box that (I think?) disregards control points.) And if we "fix" the Area class so its getBounds2D() method can intentionally return more empty space: that seems antithetical to the intent of the original ticket under consideration. So as of this writing: A. There should be no changed (or new) public method signatures in this PR. B. IMO there is no need to review an interface change for the Shape#getBounds2D() method -- or the Path2D#getBounds2D() method. What do you think? I'm happy to proceed with a CSR if you think this requires further consideration, I just wanted to double-check. ------------- PR: https://git.openjdk.java.net/jdk/pull/6227 From prr at openjdk.java.net Fri Dec 17 02:46:48 2021 From: prr at openjdk.java.net (Phil Race) Date: Fri, 17 Dec 2021 02:46:48 GMT Subject: RFR: 8278937: JCK test for java_awt/geom/Line2D.Float fails after 8277868 Message-ID: This reverts the uses of Float.compare() and Double.compare() made by the fix for 8277868 since it appears clear that for better or worse they are not 100% compatible with the previous code. These uses are all in the desktop module For comparison the original changes are here : https://github.com/openjdk/jdk/pull/6575/files ------------- Commit messages: - 8278937: JCK test for java_awt/geom/Line2D.Float fails after 8277868 - 8278937: JCK test for java_awt/geom/Line2D.Float fails after 8277868 Changes: https://git.openjdk.java.net/jdk/pull/6875/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6875&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278937 Stats: 20 lines in 3 files changed: 17 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/6875.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6875/head:pull/6875 PR: https://git.openjdk.java.net/jdk/pull/6875 From jdv at openjdk.java.net Fri Dec 17 04:37:24 2021 From: jdv at openjdk.java.net (Jayathirth D V) Date: Fri, 17 Dec 2021 04:37:24 GMT Subject: RFR: 8278937: JCK test for java_awt/geom/Line2D.Float fails after 8277868 In-Reply-To: References: Message-ID: <2M4uaipX38pvCX-Kd9a6Mdqui70YS1UTcdnyVhgWBmo=.9fce553d-4e15-4ccb-85f8-a6dd225b94c3@github.com> On Fri, 17 Dec 2021 02:40:04 GMT, Phil Race wrote: > This reverts the uses of Float.compare() and Double.compare() made by the fix for 8277868 > since it appears clear that for better or worse they are not 100% compatible with the previous code. > These uses are all in the desktop module > > For comparison the original changes are here : https://github.com/openjdk/jdk/pull/6575/files Marked as reviewed by jdv (Reviewer). Looks like some precision differences in fractional numbers is causing this. As mentioned in JBS, i think these differences might not apply for Integer comparison. LGTM. ------------- PR: https://git.openjdk.java.net/jdk/pull/6875 From kcr at openjdk.java.net Fri Dec 17 12:15:24 2021 From: kcr at openjdk.java.net (Kevin Rushforth) Date: Fri, 17 Dec 2021 12:15:24 GMT Subject: RFR: 8278937: JCK test for java_awt/geom/Line2D.Float fails after 8277868 In-Reply-To: References: Message-ID: On Fri, 17 Dec 2021 02:40:04 GMT, Phil Race wrote: > This reverts the uses of Float.compare() and Double.compare() made by the fix for 8277868 > since it appears clear that for better or worse they are not 100% compatible with the previous code. > These uses are all in the desktop module > > For comparison the original changes are here : https://github.com/openjdk/jdk/pull/6575/files Looks good. I can confirm that the correctly reverts the changes from JDK-8277868 in `java.desktop`. ------------- Marked as reviewed by kcr (Author). PR: https://git.openjdk.java.net/jdk/pull/6875 From kcr at openjdk.java.net Fri Dec 17 13:08:25 2021 From: kcr at openjdk.java.net (Kevin Rushforth) Date: Fri, 17 Dec 2021 13:08:25 GMT Subject: [jdk18] RFR: 8278604 SwingSet2 table demo does not have accessible description set for images In-Reply-To: References: Message-ID: On Wed, 15 Dec 2021 13:24:53 GMT, Anton Tarasov wrote: >> SwingSet2 demo is often used to check accessibility for different Swing components and has some shortcomings. The major one is that images within the table demo do not have accessible description set which makes accessibility perform differently on different platforms when navigating the table with screen narrator enabled. >> >> This is the next step after the solution [JDK-8277497](https://bugs.openjdk.java.net/browse/JDK-8277497), in which we forwarded the description from the icon into the label description so that this fix was possible. > > Marked as reviewed by ant (Reviewer). > /reviewer credit @forantar @azuev-java @pankaj-bansal @savoptik For future reference, the `/reviewer credit` command is not the way to request a review, but rather is a way to credit additional reviewers who have made significant review comments, but have not formally reviewed it in the GitHub PR. ------------- PR: https://git.openjdk.java.net/jdk18/pull/31 From rriggs at openjdk.java.net Fri Dec 17 15:06:27 2021 From: rriggs at openjdk.java.net (Roger Riggs) Date: Fri, 17 Dec 2021 15:06:27 GMT Subject: RFR: 8277868: Use Comparable.compare() instead of surrogate code [v6] In-Reply-To: References: Message-ID: On Thu, 9 Dec 2021 13:03:39 GMT, ?????? ??????? wrote: >> Instead of something like >> >> long x; >> long y; >> return (x < y) ? -1 : ((x == y) ? 0 : 1); >> >> we can use `return Long.compare(x, y);` >> >> All replacements are done with IDE. > > ?????? ??????? has updated the pull request incrementally with two additional commits since the last revision: > > - 8277868: Use Long.compare() for mostSigBits as well > - Revert "8277868: Adjust JavaDoc of UUID" > > This reverts commit f3b95d0e247cf6452955f4f24684fd60d5cb8902. As it turns out replacing the code was not 100% equivalent and a test failure resulted. See https://bugs.openjdk.java.net/browse/JDK-8278937 Double.compare and the original code handle the non-numeric forms of Double differently. ------------- PR: https://git.openjdk.java.net/jdk/pull/6575 From rriggs at openjdk.java.net Fri Dec 17 15:08:26 2021 From: rriggs at openjdk.java.net (Roger Riggs) Date: Fri, 17 Dec 2021 15:08:26 GMT Subject: RFR: 8278937: JCK test for java_awt/geom/Line2D.Float fails after 8277868 In-Reply-To: References: Message-ID: On Fri, 17 Dec 2021 02:40:04 GMT, Phil Race wrote: > This reverts the uses of Float.compare() and Double.compare() made by the fix for 8277868 > since it appears clear that for better or worse they are not 100% compatible with the previous code. > These uses are all in the desktop module > > For comparison the original changes are here : https://github.com/openjdk/jdk/pull/6575/files Marked as reviewed by rriggs (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6875 From prr at openjdk.java.net Fri Dec 17 15:13:24 2021 From: prr at openjdk.java.net (Phil Race) Date: Fri, 17 Dec 2021 15:13:24 GMT Subject: Integrated: 8278937: JCK test for java_awt/geom/Line2D.Float fails after 8277868 In-Reply-To: References: Message-ID: On Fri, 17 Dec 2021 02:40:04 GMT, Phil Race wrote: > This reverts the uses of Float.compare() and Double.compare() made by the fix for 8277868 > since it appears clear that for better or worse they are not 100% compatible with the previous code. > These uses are all in the desktop module > > For comparison the original changes are here : https://github.com/openjdk/jdk/pull/6575/files This pull request has now been integrated. Changeset: e45e0b05 Author: Phil Race URL: https://git.openjdk.java.net/jdk/commit/e45e0b05b9e8da8da72bf227cede319fa207a551 Stats: 20 lines in 3 files changed: 17 ins; 0 del; 3 mod 8278937: JCK test for java_awt/geom/Line2D.Float fails after 8277868 Reviewed-by: jdv, kcr, rriggs ------------- PR: https://git.openjdk.java.net/jdk/pull/6875 From prr at openjdk.java.net Fri Dec 17 18:55:35 2021 From: prr at openjdk.java.net (Phil Race) Date: Fri, 17 Dec 2021 18:55:35 GMT Subject: RFR: 6462028: MaskFormatter API documentation refers to getDisplayValue [v5] In-Reply-To: References: <-SOfUt64IAtAG0_rLAwkmMCCd81ZaPuTuF5ORNYuIOs=.fd151cd5-71c7-4e21-bd62-aeec7d296e76@github.com> Message-ID: On Thu, 9 Dec 2021 13:31:34 GMT, Tejesh R wrote: >> MaskFormatter API doesn't have getDisplayValue method, hence removed from Documentation. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > 6462028:MaskFormatter API documentation refers to getDisplayValue Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/6556 From duke at openjdk.java.net Fri Dec 17 18:56:52 2021 From: duke at openjdk.java.net (Aleksandr Veselov) Date: Fri, 17 Dec 2021 18:56:52 GMT Subject: RFR: 8278609: accessibility frame is misplaced on a secondary monitor on macOS Message-ID: Use primary screen instead of window main screen to properly convert mouse position from screen coordinates to window ones. ------------- Commit messages: - Replace [] syntax with `objectAtIndex` call - 8278609: accessibility frame is misplaced on a secondary monitor on macOS Changes: https://git.openjdk.java.net/jdk/pull/6815/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6815&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278609 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/6815.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6815/head:pull/6815 PR: https://git.openjdk.java.net/jdk/pull/6815 From serb at openjdk.java.net Fri Dec 17 18:56:53 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 17 Dec 2021 18:56:53 GMT Subject: RFR: 8278609: accessibility frame is misplaced on a secondary monitor on macOS In-Reply-To: References: Message-ID: On Mon, 13 Dec 2021 15:33:48 GMT, Aleksandr Veselov wrote: > Use primary screen instead of window main screen to properly convert mouse position from screen coordinates to window ones. src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.m line 795: > 793: point.y += size.height; > 794: > 795: point.y = [[NSScreen screens][0] frame].size.height - point.y; isn't the objectAtIndex is widely used than [] in our code base? ------------- PR: https://git.openjdk.java.net/jdk/pull/6815 From duke at openjdk.java.net Fri Dec 17 18:56:56 2021 From: duke at openjdk.java.net (Aleksandr Veselov) Date: Fri, 17 Dec 2021 18:56:56 GMT Subject: RFR: 8278609: accessibility frame is misplaced on a secondary monitor on macOS In-Reply-To: References: Message-ID: On Mon, 13 Dec 2021 20:01:29 GMT, Sergey Bylokhov wrote: >> Use primary screen instead of window main screen to properly convert mouse position from screen coordinates to window ones. > > src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.m line 795: > >> 793: point.y += size.height; >> 794: >> 795: point.y = [[NSScreen screens][0] frame].size.height - point.y; > > isn't the objectAtIndex is widely used than [] in our code base? Fixed ------------- PR: https://git.openjdk.java.net/jdk/pull/6815 From prr at openjdk.java.net Fri Dec 17 18:59:24 2021 From: prr at openjdk.java.net (Phil Race) Date: Fri, 17 Dec 2021 18:59:24 GMT Subject: RFR: JDK-8275923: Override the LPR path using a system property In-Reply-To: References: Message-ID: On Wed, 20 Oct 2021 20:38:17 GMT, Rolf van Kleef wrote: > On some select systems, the LPR binary may be placed elsewhere (for example at `/app/bin/lpr`). For that reason, we need to be able to override this value. This proposal also allows overriding the LP's path, as it could experience similar difficulties. Updates more or less along the lines above might make this acceptable 1) The hardcoded location is tried first REGARDLESS of whether the property is set 2) The property is only read ONCE - in something like a static initializer for the class or some mechanism that has the same effect. 3) The property name is as described above. ------------- PR: https://git.openjdk.java.net/jdk/pull/6052 From aivanov at openjdk.java.net Fri Dec 17 18:59:26 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 17 Dec 2021 18:59:26 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v5] In-Reply-To: References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> <70BX5SXk_YBwACbsXf3aMS4KytQQoxkwNhXuuRgOYgo=.4e15bbad-05b2-456a-965d-b9c20b9c6303@github.com> <_yyT1DE1iec1ea6SsjCE-wT6fBrkBrws9Co61mbukNs=.572220ae-c3a4-4363-864a-bcfcc51c0e73@github.com> Message-ID: On Thu, 16 Dec 2021 10:28:58 GMT, Tejesh R wrote: >> Yeah, if u refer this example page [https://bip.weizmann.ac.il/course/prog2/tutorial/uiswing/components/example-1dot4/ColorEditor.java], the interface is used for a cell in a table which has a button in turn invokes "JColorChooser" class. Which means the interface is used to store a particular value while the cell in is editor mode......? > > After going on through the example, what I felt is "Adds to CellEditor the extensions necessary to configure an editor in a tree" is little generic description than the updated PR Definition. > > The object that implements the interface is not necessarily the editor for values. DefaultCellEditor is the perfect example: it's not an editor itself, it's not even a component, all it does is configures a delegate, a JComponent, which serves as the editor. > > My thoughts about this. The object which implements the interface is always the "editor", even if it is not a component. I guess you are mixing it with the other classes like "JEditorPane/JTextField/etc". No, I don't mix them. It's called CellEditor, however, it's actually CellEditor-provider: the implementation of the interface *provides a component* which is used as the editor for cell values. Or do I miss anything? What I mean is that this editor object defines the implementation of how an instance of `JTable` acquires an editor component. In that sense it's an editor. Probably, this part of the discussion is off-topic as we're discussing the terms. Let's discuss the spec. > The current spec: > > > This interface defines the method any object that would like to be > > an editor of values for components such as `JListBox`, > > `JComboBox`, `JTree`, or `JTable` > > needs to implement. > > This means that the application may have some values/data stored in the JComboBox/JTree/JTable and the application may create a cell editor by implementing the TableCellEditor. That editor then could be used as a cell editor in the "main" JTable. Why does the interface reference this? The application can store and display data in any component. Moreover the statement in the Javadoc is wrong: This interface defines the method that can create an editor for `JTable` only. The returned component is of type `Component`, therefore it can be any component. > So the next statement in the description of this PR is not completely right: > > > "CellTableEditor Interface doesn't support JComboBox and JTree components" > > The JComboBox and other classes do not have to implement/support that interface. No, they don't. At the same time `TableCellEditor` interface can't be used to return a cell editor for `JComboBox` and for `JTree` components. These components use `ComboBoxEditor` and `TreeCellEditor` correspondingly. ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From vdyakov at openjdk.java.net Fri Dec 17 19:05:26 2021 From: vdyakov at openjdk.java.net (Victor Dyakov) Date: Fri, 17 Dec 2021 19:05:26 GMT Subject: RFR: 8278609: accessibility frame is misplaced on a secondary monitor on macOS In-Reply-To: References: Message-ID: On Mon, 13 Dec 2021 15:33:48 GMT, Aleksandr Veselov wrote: > Use primary screen instead of window main screen to properly convert mouse position from screen coordinates to window ones. please re-submit against 18 repo ------------- PR: https://git.openjdk.java.net/jdk/pull/6815 From prr at openjdk.java.net Fri Dec 17 19:05:28 2021 From: prr at openjdk.java.net (Phil Race) Date: Fri, 17 Dec 2021 19:05:28 GMT Subject: RFR: 8278050: Armenian text isn't rendered on macOS if text layout is performed In-Reply-To: References: Message-ID: On Thu, 16 Dec 2021 05:35:47 GMT, Sergey Bylokhov wrote: >>> I would like to clarify why we cannot merge the results of the availableFontFamilies and availableFonts? >> >> We can do it, if everyone is OK with increasing the scope of the change, due to the following factors: >> * The number of fonts advertised via `GraphicsEnvironment.getAllFonts` and `GraphicsEnvironment.getAvailableFontFamilyNames` will increase, so a potential Java application showing a font chooser combo-box will display more fonts there, than a native macOS application. Not sure whether that's a good or a bad thing, but that's a change in behaviour that will occur. >> * As the number of loaded fonts will increase, the execution time of `CFontManager.loadNativeFonts` will also increase, introducing a certain regression in Java UI application startup time. Ideally, this should be fixed simultaneously, e.g. by adjusting `sun.font.FontFamily` logic to perform style resolution lazily (when the particular family is accessed), not at the time `loadNativeFonts` is executed. >> * `[NSFontManager availableFonts]` returns the fonts in alphabetical order, while `NSFontManager availableMembersOfFontFamily:]` (used currently) uses font weight to sort the results. The order in which fonts are processed during `loadNativeFonts` impacts the resulting resolution of fonts into styles in `FontFamily`. So, to keep the currently used approach, an additional fonts sorting would need to be introduced - that can be done, e.g. as part of lazy resolution in `FontFamily` mentioned above. >> >> Even though it can make sense to implement all of the above (which JetBrains Runtime already does), I'd rather not do everything in one go. For now, what I'd like to achieve is to switch to `CTFontCopyDefaultCascadeListForLanguages`-based font fallback, as mentioned above. And current change, while having a value of its own, is a necessary step towards that. >> If OpenJDK will ever switch to using `[NSFontManager availableFonts]`, as a sole source of system fonts or in addition to `[NSFontManager availableFontFamilies]`, this change can just be reverted. > > Ok, let's investigate that possibility separately. I have a plan to re-do a lot of this code. Things like lazily loading the fonts would be good since right now we take a big hit especially right after reboot . But we shouldn't be enumerating (to the API) fonts that are not enumerated in FontBook. A tricky aspect is that we have had a couple of bugs like this where we are doing fall back essentially using the standard way of doing it that doesn't get as many glyphs as what you get from the JRS code. Getting away from the JRS code is part of the idea but it needs to be done carefully. I don't mind you looking into it (obviously not today) but equally I don't promise not to obsolete whatever you do with whatever I do .. ------------- PR: https://git.openjdk.java.net/jdk/pull/6633 From aivanov at openjdk.java.net Fri Dec 17 19:08:30 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 17 Dec 2021 19:08:30 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v5] In-Reply-To: References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> <70BX5SXk_YBwACbsXf3aMS4KytQQoxkwNhXuuRgOYgo=.4e15bbad-05b2-456a-965d-b9c20b9c6303@github.com> <_yyT1DE1iec1ea6SsjCE-wT6fBrkBrws9Co61mbukNs=.572220ae-c3a4-4363-864a-bcfcc51c0e73@github.com> Message-ID: On Fri, 17 Dec 2021 18:56:37 GMT, Alexey Ivanov wrote: >> After going on through the example, what I felt is "Adds to CellEditor the extensions necessary to configure an editor in a tree" is little generic description than the updated PR Definition. > >> > The object that implements the interface is not necessarily the editor for values. DefaultCellEditor is the perfect example: it's not an editor itself, it's not even a component, all it does is configures a delegate, a JComponent, which serves as the editor. >> >> My thoughts about this. The object which implements the interface is always the "editor", even if it is not a component. I guess you are mixing it with the other classes like "JEditorPane/JTextField/etc". > > No, I don't mix them. It's called CellEditor, however, it's actually CellEditor-provider: the implementation of the interface *provides a component* which is used as the editor for cell values. Or do I miss anything? > > What I mean is that this editor object defines the implementation of how an instance of `JTable` acquires an editor component. In that sense it's an editor. > > Probably, this part of the discussion is off-topic as we're discussing the terms. > > Let's discuss the spec. > >> The current spec: >> >> > This interface defines the method any object that would like to be >> > an editor of values for components such as `JListBox`, >> > `JComboBox`, `JTree`, or `JTable` >> > needs to implement. >> >> This means that the application may have some values/data stored in the JComboBox/JTree/JTable and the application may create a cell editor by implementing the TableCellEditor. That editor then could be used as a cell editor in the "main" JTable. > > Why does the interface reference this? The application can store and display data in any component. > > Moreover the statement in the Javadoc is wrong: This interface defines the method that can create an editor for `JTable` only. The returned component is of type `Component`, therefore it can be any component. > >> So the next statement in the description of this PR is not completely right: >> >> > "CellTableEditor Interface doesn't support JComboBox and JTree components" >> >> The JComboBox and other classes do not have to implement/support that interface. > > No, they don't. At the same time `TableCellEditor` interface can't be used to return a cell editor for `JComboBox` and for `JTree` components. These components use `ComboBoxEditor` and `TreeCellEditor` correspondingly. > After going on through the example, what I felt is "Adds to CellEditor the extensions necessary to configure an editor in a tree" is little generic description than the updated PR Definition. The interface is generic, so the generic description fits well. I still find the proposed version quite hard to parse. In my first comment, I suggested rephrasing the Javadoc to make it clearer and easier to understand. ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From prr at openjdk.java.net Fri Dec 17 19:13:25 2021 From: prr at openjdk.java.net (Phil Race) Date: Fri, 17 Dec 2021 19:13:25 GMT Subject: RFR: 8278908: [macOS] Unexpected text normalization on pasting from clipboard In-Reply-To: References: Message-ID: On Thu, 16 Dec 2021 15:53:26 GMT, Dmitry Batrak wrote: > The fix just removes the explicit normalization of text obtained from system clipboard in JDK code, as I've found no > good justification for such a normalization, at least for the latest macOS version. > The same fix was performed in JetBrains Runtime by a user's request more than 4 years ago, and we didn't receive any > related complaints from our users ever since. I don't know much at all about this code and DnD / clipboard java->java, and java<->native and the differences per platform but I see an update to a test which very deliberately tests the behaviour you are affecting. And that test runs on all platforms but you are only updating macOS .. hmm. I'd like to know why. I'd also like to know that all the scenarios work on all platforms and also why someone previously was so sure the existing code was right ... ------------- PR: https://git.openjdk.java.net/jdk/pull/6866 From asemenov at openjdk.java.net Fri Dec 17 19:35:27 2021 From: asemenov at openjdk.java.net (Artem Semenov) Date: Fri, 17 Dec 2021 19:35:27 GMT Subject: [jdk18] Integrated: 8278604 SwingSet2 table demo does not have accessible description set for images In-Reply-To: References: Message-ID: On Wed, 15 Dec 2021 12:43:40 GMT, Artem Semenov wrote: > SwingSet2 demo is often used to check accessibility for different Swing components and has some shortcomings. The major one is that images within the table demo do not have accessible description set which makes accessibility perform differently on different platforms when navigating the table with screen narrator enabled. > > This is the next step after the solution [JDK-8277497](https://bugs.openjdk.java.net/browse/JDK-8277497), in which we forwarded the description from the icon into the label description so that this fix was possible. This pull request has now been integrated. Changeset: 8fbe1724 Author: Artem Semenov URL: https://git.openjdk.java.net/jdk18/commit/8fbe1724e0f783132a65c45503addad9d98a329e Stats: 9 lines in 1 file changed: 9 ins; 0 del; 0 mod 8278604: SwingSet2 table demo does not have accessible description set for images 8278526: [macos] Screen reader reads SwingSet2 JTable row selection as null, dimmed row for last column Reviewed-by: ant, kizune, pbansal ------------- PR: https://git.openjdk.java.net/jdk18/pull/31 From dbatrak at openjdk.java.net Fri Dec 17 20:16:30 2021 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Fri, 17 Dec 2021 20:16:30 GMT Subject: RFR: 8278908: [macOS] Unexpected text normalization on pasting from clipboard In-Reply-To: References: Message-ID: On Thu, 16 Dec 2021 15:53:26 GMT, Dmitry Batrak wrote: > The fix just removes the explicit normalization of text obtained from system clipboard in JDK code, as I've found no > good justification for such a normalization, at least for the latest macOS version. > The same fix was performed in JetBrains Runtime by a user's request more than 4 years ago, and we didn't receive any > related complaints from our users ever since. The test doesn't check the normalization logic in `CDataTransferer.m`, it actually tests that the string is unchanged during transfer through clipboard. The test just prepares the initial string so that it won't be affected by the normalization. So it looks like that normalization in test was added to make the test pass on all platforms, including macOS. The test would pass even after the change I've made to `CDataTransferer.m`. I'm making a modification to it, so that it would now verify that even a non-normalized string passes through clipboard unchanged. The test keeps passing on Windows, Linux and macOS after the change. ------------- PR: https://git.openjdk.java.net/jdk/pull/6866 From prr at openjdk.java.net Fri Dec 17 21:46:21 2021 From: prr at openjdk.java.net (Phil Race) Date: Fri, 17 Dec 2021 21:46:21 GMT Subject: RFR: 6496103: isFileHidingEnabled return false by default [v2] In-Reply-To: <6ZrzvASjvTYEe1dazchVcggakWgIN_6-SFxCyHJdl58=.fc97f95f-6ba2-476c-835b-0850b533d5bb@github.com> References: <_C3lDw9NYzxbZtUdu44cRMEHaa6NhTV6fJWB-ho59yo=.eeda6bb0-81b0-4f0d-9c3b-58fbaa1c433d@github.com> <6ZrzvASjvTYEe1dazchVcggakWgIN_6-SFxCyHJdl58=.fc97f95f-6ba2-476c-835b-0850b533d5bb@github.com> Message-ID: <-r0KAdQiWUNyV7YEyvQADMreqAAoxy8tlVplIiN0Mts=.8d1c66c8-2b93-492c-bdcc-f6578beb78b4@github.com> On Wed, 15 Dec 2021 06:29:43 GMT, Tejesh R wrote: >> The default value of this property is derived from native platform. The same is updated in the documentation. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > 6496103: isFileHidingEnabled return false by default src/java.desktop/share/classes/javax/swing/JFileChooser.java line 1416: > 1414: * Returns true if hidden files are not shown in the file chooser; > 1415: * otherwise, returns false. The default value of this property is derived > 1416: * from native Operating System, unless set explicitly by the programmer. Is this true on all platforms ? The bug report seems concerned only about windows. Should the wording be "The default value of this property may be derived from the underlying operating system" ie "is" -> "may be" (and some other slight wording change). If we REALLY will always get it from the O/S, including on Linux, macOS and whatever else .. then it is OK otherwise the new wording would be better. "unless set explicitly by the programmer." hmm, well if you set it, it isn't the default, so there's no need to say that, is there ? ------------- PR: https://git.openjdk.java.net/jdk/pull/6780 From aivanov at openjdk.java.net Fri Dec 17 22:00:26 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 17 Dec 2021 22:00:26 GMT Subject: RFR: 8277817: java/awt/dnd/BadSerializationTest/BadSerializationTest.java failed: ClassNotFoundException: com.apple.laf.AquaImageFactory$SystemColorProxy [v9] In-Reply-To: <49gYRPX_QAzZcEsFovkzHbBn2I28lXo-3fYDHmYSUD0=.cf6525da-c24b-406f-ad90-2eabcbd840c3@github.com> References: <49gYRPX_QAzZcEsFovkzHbBn2I28lXo-3fYDHmYSUD0=.cf6525da-c24b-406f-ad90-2eabcbd840c3@github.com> Message-ID: On Fri, 10 Dec 2021 17:03:49 GMT, Liam Miller-Cushon wrote: >> This change updates the serialized objects used by `java/awt/dnd/BadSerializationTest/BadSerializationTest.java` using a similar approach to the previous fix in [JDK-8039082](https://bugs.openjdk.java.net/browse/JDK-8039082). > > Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision: > > Add a few more missing calls to LookAndFeel.uninstallColors I see the problem: the constructors do not allow setting invalid values to the fields. This is what the *special version of JDK* refers to, the build where the checks for invalid values are removed from the constructors. It explains why the serialized form can't be obtained by writing an object out, it's impossible to create such an object. I wonder if it's possible to modify the value of the field using reflection via `setAccessible(true)`. With strong encapsulation, it may not work. If it works, the objects with invalid can be serialized on the fly. ------------- PR: https://git.openjdk.java.net/jdk/pull/6603 From prr at openjdk.java.net Fri Dec 17 22:22:24 2021 From: prr at openjdk.java.net (Phil Race) Date: Fri, 17 Dec 2021 22:22:24 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v5] In-Reply-To: References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> Message-ID: On Thu, 9 Dec 2021 13:31:38 GMT, Tejesh R wrote: >> JListBox is invalid component. CellTableEditor Interface doesn't support JComboBox and JTree components. Hence its removed from Documentation. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > 6465404: some problems in CellEditor related API docs src/java.desktop/share/classes/javax/swing/table/TableCellEditor.java line 34: > 32: /** > 33: * This interface defines the method any object that would like to be > 34: * an editor of values for the {@code JTable} component needs to implement. "This interface must be implemented to provide an editor of cell values for a {@code JTable}" ? ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From duke at openjdk.java.net Mon Dec 20 06:51:26 2021 From: duke at openjdk.java.net (Tejesh R) Date: Mon, 20 Dec 2021 06:51:26 GMT Subject: RFR: 6496103: isFileHidingEnabled return false by default [v2] In-Reply-To: <-r0KAdQiWUNyV7YEyvQADMreqAAoxy8tlVplIiN0Mts=.8d1c66c8-2b93-492c-bdcc-f6578beb78b4@github.com> References: <_C3lDw9NYzxbZtUdu44cRMEHaa6NhTV6fJWB-ho59yo=.eeda6bb0-81b0-4f0d-9c3b-58fbaa1c433d@github.com> <6ZrzvASjvTYEe1dazchVcggakWgIN_6-SFxCyHJdl58=.fc97f95f-6ba2-476c-835b-0850b533d5bb@github.com> <-r0KAdQiWUNyV7YEyvQADMreqAAoxy8tlVplIiN0Mts=.8d1c66c8-2b93-492c-bdcc-f6578beb78b4@github.com> Message-ID: <8A0M2nAriO6kWE6BQ-D9eSpjLjfjkrvBFhgorV0wdjs=.cc7ad0cc-9377-4db5-9d80-84265ed8ff15@github.com> On Fri, 17 Dec 2021 21:42:57 GMT, Phil Race wrote: > If we REALLY will always get it from the O/S, including on Linux, macOS and whatever else .. then it is OK otherwise the new wording would be better. Haven't checked in Linux or macOS...... Yeah, I think no need to explicitly mention about setting it by programmer...... Sure will update the PR based on your feedback @prrace ....... ------------- PR: https://git.openjdk.java.net/jdk/pull/6780 From duke at openjdk.java.net Mon Dec 20 06:54:56 2021 From: duke at openjdk.java.net (Tejesh R) Date: Mon, 20 Dec 2021 06:54:56 GMT Subject: RFR: 6496103: isFileHidingEnabled return false by default [v3] In-Reply-To: <_C3lDw9NYzxbZtUdu44cRMEHaa6NhTV6fJWB-ho59yo=.eeda6bb0-81b0-4f0d-9c3b-58fbaa1c433d@github.com> References: <_C3lDw9NYzxbZtUdu44cRMEHaa6NhTV6fJWB-ho59yo=.eeda6bb0-81b0-4f0d-9c3b-58fbaa1c433d@github.com> Message-ID: > The default value of this property is derived from native platform. The same is updated in the documentation. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: 6496103: isFileHidingEnabled return false by default ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6780/files - new: https://git.openjdk.java.net/jdk/pull/6780/files/f173600e..df57ab4f Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6780&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6780&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/6780.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6780/head:pull/6780 PR: https://git.openjdk.java.net/jdk/pull/6780 From duke at openjdk.java.net Mon Dec 20 09:34:30 2021 From: duke at openjdk.java.net (Aleksandr Veselov) Date: Mon, 20 Dec 2021 09:34:30 GMT Subject: RFR: 8278609: accessibility frame is misplaced on a secondary monitor on macOS In-Reply-To: References: Message-ID: On Mon, 13 Dec 2021 15:33:48 GMT, Aleksandr Veselov wrote: > Use primary screen instead of window main screen to properly convert mouse position from screen coordinates to window ones. Changes moved to [jdk18/48](https://github.com/openjdk/jdk18/pull/48), closing ------------- PR: https://git.openjdk.java.net/jdk/pull/6815 From duke at openjdk.java.net Mon Dec 20 09:34:30 2021 From: duke at openjdk.java.net (Aleksandr Veselov) Date: Mon, 20 Dec 2021 09:34:30 GMT Subject: Withdrawn: 8278609: accessibility frame is misplaced on a secondary monitor on macOS In-Reply-To: References: Message-ID: <03T8HbxApMW_RPqjyJkjJ7xaOWH-auPtt8KGKo41bp0=.7878f4e7-eedd-49d6-abe2-a27b9c58e426@github.com> On Mon, 13 Dec 2021 15:33:48 GMT, Aleksandr Veselov wrote: > Use primary screen instead of window main screen to properly convert mouse position from screen coordinates to window ones. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/6815 From duke at openjdk.java.net Mon Dec 20 09:34:55 2021 From: duke at openjdk.java.net (Aleksandr Veselov) Date: Mon, 20 Dec 2021 09:34:55 GMT Subject: [jdk18] RFR: 8278609: accessibility frame is misplaced on a secondary monitor on macOS Message-ID: Use primary screen instead of window main screen to properly convert mouse position from screen coordinates to window ones. Copy of [jdk/6815](https://github.com/openjdk/jdk/pull/6815) ------------- Commit messages: - 8278609: accessibility frame is misplaced on a secondary monitor on macOS Changes: https://git.openjdk.java.net/jdk18/pull/48/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk18&pr=48&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278609 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/jdk18/pull/48.diff Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/48/head:pull/48 PR: https://git.openjdk.java.net/jdk18/pull/48 From ant at openjdk.java.net Mon Dec 20 09:34:56 2021 From: ant at openjdk.java.net (Anton Tarasov) Date: Mon, 20 Dec 2021 09:34:56 GMT Subject: [jdk18] RFR: 8278609: accessibility frame is misplaced on a secondary monitor on macOS In-Reply-To: References: Message-ID: <2R_cGjYxargTsThFSBMu93I-3BZIue3HTF1f_F93F7k=.0fea22a0-6d4d-4d07-8377-9b73e5d1691c@github.com> On Mon, 20 Dec 2021 09:26:31 GMT, Aleksandr Veselov wrote: > Use primary screen instead of window main screen to properly convert mouse position from screen coordinates to window ones. > > Copy of [jdk/6815](https://github.com/openjdk/jdk/pull/6815) Marked as reviewed by ant (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk18/pull/48 From myano at openjdk.java.net Mon Dec 20 09:36:15 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Mon, 20 Dec 2021 09:36:15 GMT Subject: RFR: 8277463: JFileChooser with Metal L&F doesn't show non-canonical UNC path in - Look in [v2] In-Reply-To: References: Message-ID: > I would like to fix the bug reported in JDK-8277463. > > As reporter's investigation, ShellFolder.getNormalizedFile() returns incorrect value for non-canonical Windows UNC path. getNormalizedFile() is used for symbolic link path, but Windows environment does not handle symbolic link. And, getCanonicalFile() returns correct path for a directory link in Windows which is made with `mklink` command. So getNormalizedFile() should perform to return getCanonicalFile() like WindowsFileChooserUI.addItem() at Windows environment. Masanori Yano has updated the pull request incrementally with one additional commit since the last revision: 8277463: JFileChooser with Metal L&F doesn't show non-canonical UNC path in - Look in ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6796/files - new: https://git.openjdk.java.net/jdk/pull/6796/files/5775b5f6..3e163ff9 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6796&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6796&range=00-01 Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/6796.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6796/head:pull/6796 PR: https://git.openjdk.java.net/jdk/pull/6796 From myano at openjdk.java.net Mon Dec 20 09:36:18 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Mon, 20 Dec 2021 09:36:18 GMT Subject: RFR: 8277463: JFileChooser with Metal L&F doesn't show non-canonical UNC path in - Look in [v2] In-Reply-To: <1APEWt6EfSMXZSLa9JNxgLwQpdtfpOBE1VBgXCUntxM=.83285e41-fd61-452d-b3bf-7da6ce4f432b@github.com> References: <1APEWt6EfSMXZSLa9JNxgLwQpdtfpOBE1VBgXCUntxM=.83285e41-fd61-452d-b3bf-7da6ce4f432b@github.com> Message-ID: On Wed, 15 Dec 2021 03:50:11 GMT, Sergey Bylokhov wrote: >> Masanori Yano has updated the pull request incrementally with one additional commit since the last revision: >> >> 8277463: JFileChooser with Metal L&F doesn't show non-canonical UNC path in - Look in > > test/jdk/javax/swing/JFileChooser/8277463/UNCFileChooserTest.java line 105: > >> 103: throw new RuntimeException("Enter the directory path to test."); >> 104: } >> 105: UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); > > The test might be executed under some non-default L&F and switching it here might cause some issues for the instruction dialog which will not be updated to use the metal. So it is better to set metal at the start of the test. I fixed the test as it was pointed out to me. ------------- PR: https://git.openjdk.java.net/jdk/pull/6796 From myano at openjdk.java.net Mon Dec 20 09:30:27 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Mon, 20 Dec 2021 09:30:27 GMT Subject: RFR: 8277463: JFileChooser with Metal L&F doesn't show non-canonical UNC path in - Look in In-Reply-To: <1APEWt6EfSMXZSLa9JNxgLwQpdtfpOBE1VBgXCUntxM=.83285e41-fd61-452d-b3bf-7da6ce4f432b@github.com> References: <1APEWt6EfSMXZSLa9JNxgLwQpdtfpOBE1VBgXCUntxM=.83285e41-fd61-452d-b3bf-7da6ce4f432b@github.com> Message-ID: On Wed, 15 Dec 2021 22:58:39 GMT, Sergey Bylokhov wrote: >> I would like to fix the bug reported in JDK-8277463. >> >> As reporter's investigation, ShellFolder.getNormalizedFile() returns incorrect value for non-canonical Windows UNC path. getNormalizedFile() is used for symbolic link path, but Windows environment does not handle symbolic link. And, getCanonicalFile() returns correct path for a directory link in Windows which is made with `mklink` command. So getNormalizedFile() should perform to return getCanonicalFile() like WindowsFileChooserUI.addItem() at Windows environment. > > src/java.desktop/share/classes/sun/awt/shell/ShellFolder.java line 301: > >> 299: if (f.equals(canonical) || OSInfo.getOSType() == OSInfo.OSType.WINDOWS) { >> 300: // path of f doesn't contain symbolic links >> 301: return canonical; > > Is it possible that the code below was used when the "Libraries" or some "virtual folders" were navigated? Yes. I traced with debugger. Even after this fix, JFileChooser displays and can navigate "Libraries" and "Recent". The paths of these folders are expressed as "::{CLSID}", that can be handled correctly only with Win32ShellFolder class. And, if "Videos" is selected, the path is canonicalized. (e.g. C:\Users\User\Videos) ------------- PR: https://git.openjdk.java.net/jdk/pull/6796 From ant at openjdk.java.net Mon Dec 20 09:55:41 2021 From: ant at openjdk.java.net (Anton Tarasov) Date: Mon, 20 Dec 2021 09:55:41 GMT Subject: [jdk18] RFR: 8278609: [macos] accessibility frame is misplaced on a secondary monitor on macOS In-Reply-To: References: Message-ID: On Mon, 20 Dec 2021 09:26:31 GMT, Aleksandr Veselov wrote: > Use primary screen instead of window main screen to properly convert mouse position from screen coordinates to window ones. > > Copy of [jdk/6815](https://github.com/openjdk/jdk/pull/6815) @azuev-java please review. ------------- PR: https://git.openjdk.java.net/jdk18/pull/48 From duke at openjdk.java.net Mon Dec 20 09:56:25 2021 From: duke at openjdk.java.net (Tejesh R) Date: Mon, 20 Dec 2021 09:56:25 GMT Subject: Integrated: 6462028: MaskFormatter API documentation refers to getDisplayValue In-Reply-To: <-SOfUt64IAtAG0_rLAwkmMCCd81ZaPuTuF5ORNYuIOs=.fd151cd5-71c7-4e21-bd62-aeec7d296e76@github.com> References: <-SOfUt64IAtAG0_rLAwkmMCCd81ZaPuTuF5ORNYuIOs=.fd151cd5-71c7-4e21-bd62-aeec7d296e76@github.com> Message-ID: On Thu, 25 Nov 2021 09:54:47 GMT, Tejesh R wrote: > MaskFormatter API doesn't have getDisplayValue method, hence removed from Documentation. This pull request has now been integrated. Changeset: 31fbb872 Author: TejeshR13 Committer: Jayathirth D V URL: https://git.openjdk.java.net/jdk/commit/31fbb8723e973d4217c80cccba90b2dceb6fa792 Stats: 9 lines in 1 file changed: 3 ins; 0 del; 6 mod 6462028: MaskFormatter API documentation refers to getDisplayValue Reviewed-by: psadhukhan, aivanov, prr ------------- PR: https://git.openjdk.java.net/jdk/pull/6556 From kizune at openjdk.java.net Mon Dec 20 11:23:33 2021 From: kizune at openjdk.java.net (Alexander Zuev) Date: Mon, 20 Dec 2021 11:23:33 GMT Subject: [jdk18] RFR: 8278609: [macos] accessibility frame is misplaced on a secondary monitor on macOS In-Reply-To: References: Message-ID: <8MagsvbqqWMhsN5uFkjwPOuHEjfd8hAqd7Loxtd28gw=.26d70cf0-06aa-4d33-84cb-f977e7f02544@github.com> On Mon, 20 Dec 2021 09:26:31 GMT, Aleksandr Veselov wrote: > Use primary screen instead of window main screen to properly convert mouse position from screen coordinates to window ones. > > Copy of [jdk/6815](https://github.com/openjdk/jdk/pull/6815) Looks good. ------------- Marked as reviewed by kizune (Reviewer). PR: https://git.openjdk.java.net/jdk18/pull/48 From duke at openjdk.java.net Mon Dec 20 11:44:34 2021 From: duke at openjdk.java.net (Aleksandr Veselov) Date: Mon, 20 Dec 2021 11:44:34 GMT Subject: [jdk18] Integrated: 8278609: [macos] accessibility frame is misplaced on a secondary monitor on macOS In-Reply-To: References: Message-ID: On Mon, 20 Dec 2021 09:26:31 GMT, Aleksandr Veselov wrote: > Use primary screen instead of window main screen to properly convert mouse position from screen coordinates to window ones. > > Copy of [jdk/6815](https://github.com/openjdk/jdk/pull/6815) This pull request has now been integrated. Changeset: ad128284 Author: Aleksandr Veselov Committer: Anton Tarasov URL: https://git.openjdk.java.net/jdk18/commit/ad1282842c5eefdad151afe6f4db97a09d643546 Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod 8278609: [macos] accessibility frame is misplaced on a secondary monitor on macOS Reviewed-by: ant, kizune ------------- PR: https://git.openjdk.java.net/jdk18/pull/48 From serb at openjdk.java.net Tue Dec 21 02:03:15 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 21 Dec 2021 02:03:15 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v5] In-Reply-To: References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> <70BX5SXk_YBwACbsXf3aMS4KytQQoxkwNhXuuRgOYgo=.4e15bbad-05b2-456a-965d-b9c20b9c6303@github.com> <_yyT1DE1iec1ea6SsjCE-wT6fBrkBrws9Co61mbukNs=.572220ae-c3a4-4363-864a-bcfcc51c0e73@github.com> Message-ID: On Fri, 17 Dec 2021 19:04:56 GMT, Alexey Ivanov wrote: >>> > The object that implements the interface is not necessarily the editor for values. DefaultCellEditor is the perfect example: it's not an editor itself, it's not even a component, all it does is configures a delegate, a JComponent, which serves as the editor. >>> >>> My thoughts about this. The object which implements the interface is always the "editor", even if it is not a component. I guess you are mixing it with the other classes like "JEditorPane/JTextField/etc". >> >> No, I don't mix them. It's called CellEditor, however, it's actually CellEditor-provider: the implementation of the interface *provides a component* which is used as the editor for cell values. Or do I miss anything? >> >> What I mean is that this editor object defines the implementation of how an instance of `JTable` acquires an editor component. In that sense it's an editor. >> >> Probably, this part of the discussion is off-topic as we're discussing the terms. >> >> Let's discuss the spec. >> >>> The current spec: >>> >>> > This interface defines the method any object that would like to be >>> > an editor of values for components such as `JListBox`, >>> > `JComboBox`, `JTree`, or `JTable` >>> > needs to implement. >>> >>> This means that the application may have some values/data stored in the JComboBox/JTree/JTable and the application may create a cell editor by implementing the TableCellEditor. That editor then could be used as a cell editor in the "main" JTable. >> >> Why does the interface reference this? The application can store and display data in any component. >> >> Moreover the statement in the Javadoc is wrong: This interface defines the method that can create an editor for `JTable` only. The returned component is of type `Component`, therefore it can be any component. >> >>> So the next statement in the description of this PR is not completely right: >>> >>> > "CellTableEditor Interface doesn't support JComboBox and JTree components" >>> >>> The JComboBox and other classes do not have to implement/support that interface. >> >> No, they don't. At the same time `TableCellEditor` interface can't be used to return a cell editor for `JComboBox` and for `JTree` components. These components use `ComboBoxEditor` and `TreeCellEditor` correspondingly. > >> After going on through the example, what I felt is "Adds to CellEditor the extensions necessary to configure an editor in a tree" is little generic description than the updated PR Definition. > > The interface is generic, so the generic description fits well. > > I still find the proposed version quite hard to parse. In my first comment, I suggested rephrasing the Javadoc to make it clearer and easier to understand. > No, they don't. At the same time `TableCellEditor` interface can't be used to return a cell editor for `JComboBox` and for `JTree` components. These components use `ComboBoxEditor` and `TreeCellEditor` correspondingly. Right the TableCellEditor should not be used as a JComboBox/JTree editor, it is only for JTable. But the objects implemented TableCellEditor interface can be used to modify the values stored as the JComboBox/JTree when the user edits the cell of the table. So the user selects the cell -> the TableCellEditor is activated for editing that cell -> if the data for the cell may be stored as a list then the JComboBox could be shown -> the user may change/edit the current value of the cell using JComboBox and its values? And the list of components in the spec is just an example of what components can be used by the TableCellEditor. At least this is how I read it, might be wrong. ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From serb at openjdk.java.net Tue Dec 21 05:31:16 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 21 Dec 2021 05:31:16 GMT Subject: RFR: 8277463: JFileChooser with Metal L&F doesn't show non-canonical UNC path in - Look in [v2] In-Reply-To: References: <1APEWt6EfSMXZSLa9JNxgLwQpdtfpOBE1VBgXCUntxM=.83285e41-fd61-452d-b3bf-7da6ce4f432b@github.com> Message-ID: On Mon, 20 Dec 2021 09:32:24 GMT, Masanori Yano wrote: >> test/jdk/javax/swing/JFileChooser/8277463/UNCFileChooserTest.java line 105: >> >>> 103: throw new RuntimeException("Enter the directory path to test."); >>> 104: } >>> 105: UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel"); >> >> The test might be executed under some non-default L&F and switching it here might cause some issues for the instruction dialog which will not be updated to use the metal. So it is better to set metal at the start of the test. > > I fixed the test as it was pointed out to me. Now it cannot be compiled due to "unreported exception java.lang.ClassNotFoundException; must be caught or declared to be thrown" from the setLookAndFeel(); Note that the new version still has a race, the invokeLater/setLookAndFeel can be executed later than the code in the showOpenDialog(), so the code in showOpenDialog may use the wrong L&F properties, can we move the showOpenDialog to the EDT as well? ------------- PR: https://git.openjdk.java.net/jdk/pull/6796 From aivanov at openjdk.java.net Tue Dec 21 15:28:50 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 21 Dec 2021 15:28:50 GMT Subject: [jdk18] RFR: 8278472: Invalid value set to CANDIDATEFORM structure Message-ID: According to the Windows API reference, `dwStyle` of [`CANDIDATEFORM`](https://docs.microsoft.com/en-us/windows/win32/api/imm/ns-imm-candidateform) structure should be set to `CFS_CANDIDATEPOS` or `CFS_EXCLUDE`. So, `CFS_POINT` is wrong here. There are two instances in `AwtComponent::SetCandidateWindow` in [`awt_Component.cpp`](https://github.com/openjdk/jdk/blob/f90425a1cbbc686045c87086af586e62f05f6c49/src/java.desktop/windows/native/libawt/windows/awt_Component.cpp#L3914) where the incorrect value is used. I've created the PR for jdk18 as it's a low-risk fix. If it's inappropriate at this time, I'll open the PR for mainline jdk. ------------- Commit messages: - 8278472: Invalid value set to CANDIDATEFORM structure Changes: https://git.openjdk.java.net/jdk18/pull/54/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk18&pr=54&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278472 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk18/pull/54.diff Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/54/head:pull/54 PR: https://git.openjdk.java.net/jdk18/pull/54 From jwilhelm at openjdk.java.net Tue Dec 21 19:59:51 2021 From: jwilhelm at openjdk.java.net (Jesper Wilhelmsson) Date: Tue, 21 Dec 2021 19:59:51 GMT Subject: RFR: Merge jdk18 Message-ID: <2qAXnV7AsRJ0Z5Of9gkLOHIACVFGRfrl3MVhJsfpSew=.b02d2da2-3ce5-497d-a979-4e602c3834be@github.com> Forwardport JDK 18 -> JDK 19 ------------- Commit messages: - Merge - 8278627: Shenandoah: TestHeapDump test failed - 8279074: ProblemList compiler/codecache/jmx/PoolsIndependenceTest.java on macosx-aarch64 - 8278044: ObjectInputStream methods invoking the OIF.CFG.getSerialFilterFactory() silent about error cases. - 8278087: Deserialization filter and filter factory property error reporting under specified - 8279011: JFR: JfrChunkWriter incorrectly handles int64_t chunk size as size_t - 8274323: compiler/codegen/aes/TestAESMain.java failed with "Error: invalid offset: -1434443640" after 8273297 - 8278609: [macos] accessibility frame is misplaced on a secondary monitor on macOS - 8278413: C2 crash when allocating array of size too large - 8278970: [macos] SigningPackageTest is failed with runtime exception - ... and 9 more: https://git.openjdk.java.net/jdk/compare/f31dead6...d5d5bad9 The webrevs contain the adjustments done while merging with regards to each parent branch: - master: https://webrevs.openjdk.java.net/?repo=jdk&pr=6911&range=00.0 - jdk18: https://webrevs.openjdk.java.net/?repo=jdk&pr=6911&range=00.1 Changes: https://git.openjdk.java.net/jdk/pull/6911/files Stats: 1086 lines in 80 files changed: 695 ins; 107 del; 284 mod Patch: https://git.openjdk.java.net/jdk/pull/6911.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6911/head:pull/6911 PR: https://git.openjdk.java.net/jdk/pull/6911 From aivanov at openjdk.java.net Tue Dec 21 20:39:16 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 21 Dec 2021 20:39:16 GMT Subject: RFR: 6496103: isFileHidingEnabled return false by default [v3] In-Reply-To: References: <_C3lDw9NYzxbZtUdu44cRMEHaa6NhTV6fJWB-ho59yo=.eeda6bb0-81b0-4f0d-9c3b-58fbaa1c433d@github.com> Message-ID: On Mon, 20 Dec 2021 06:54:56 GMT, Tejesh R wrote: >> The default value of this property is derived from native platform. The same is updated in the documentation. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > 6496103: isFileHidingEnabled return false by default src/java.desktop/share/classes/javax/swing/JFileChooser.java line 1416: > 1414: * Returns true if hidden files are not shown in the file chooser; > 1415: * otherwise, returns false. The default value of this property may be > 1416: * derived from the underlying Operating System. Should true and false be marked up as `{@code true}` and `{@code false}`? Probably not, for consistency with other methods in the JFileChooser class. ------------- PR: https://git.openjdk.java.net/jdk/pull/6780 From aivanov at openjdk.java.net Tue Dec 21 21:04:22 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 21 Dec 2021 21:04:22 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v5] In-Reply-To: References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> <70BX5SXk_YBwACbsXf3aMS4KytQQoxkwNhXuuRgOYgo=.4e15bbad-05b2-456a-965d-b9c20b9c6303@github.com> <_yyT1DE1iec1ea6SsjCE-wT6fBrkBrws9Co61mbukNs=.572220ae-c3a4-4363-864a-bcfcc51c0e73@github.com> Message-ID: On Tue, 21 Dec 2021 02:00:32 GMT, Sergey Bylokhov wrote: >>> After going on through the example, what I felt is "Adds to CellEditor the extensions necessary to configure an editor in a tree" is little generic description than the updated PR Definition. >> >> The interface is generic, so the generic description fits well. >> >> I still find the proposed version quite hard to parse. In my first comment, I suggested rephrasing the Javadoc to make it clearer and easier to understand. > >> No, they don't. At the same time `TableCellEditor` interface can't be used to return a cell editor for `JComboBox` and for `JTree` components. These components use `ComboBoxEditor` and `TreeCellEditor` correspondingly. > > Right the TableCellEditor should not be used as a JComboBox/JTree editor, it is only for JTable. But the objects implemented TableCellEditor interface can be used to modify the values stored as the JComboBox/JTree when the user edits the cell of the table. So the user selects the cell -> the TableCellEditor is activated for editing that cell -> if the data for the cell may be stored as a list then the JComboBox could be shown -> the user may change/edit the current value of the cell using JComboBox and its values? And the list of components in the spec is just an example of what components can be used by the TableCellEditor. > > At least this is how I read it, might be wrong. I agree it probably referred to components which can be used as an editor. `DefaultEditorCell` supports three components: `JCheckBox`, `JComboBox`, and `JTextField`. > But the objects implemented TableCellEditor interface can be used to modify the values stored as the JComboBox/JTree when the user edits the cell of the table. And this just adds to the confusion rather than clarifies the purpose of the interface. ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From aivanov at openjdk.java.net Tue Dec 21 21:16:18 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 21 Dec 2021 21:16:18 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v5] In-Reply-To: References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> Message-ID: <3l3-MvcdKypoW9KMcKQDyk5jBw_9OEjfOWBkRDr7wpw=.b84d6330-e300-4601-960b-0ca43996f663@github.com> On Fri, 17 Dec 2021 22:19:46 GMT, Phil Race wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> 6465404: some problems in CellEditor related API docs > > src/java.desktop/share/classes/javax/swing/table/TableCellEditor.java line 34: > >> 32: /** >> 33: * This interface defines the method any object that would like to be >> 34: * an editor of values for the {@code JTable} component needs to implement. > > "This interface must be implemented to provide an editor of cell values for a {@code JTable}" ? Clear and to the point. ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From aivanov at openjdk.java.net Tue Dec 21 21:26:24 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 21 Dec 2021 21:26:24 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v5] In-Reply-To: <3l3-MvcdKypoW9KMcKQDyk5jBw_9OEjfOWBkRDr7wpw=.b84d6330-e300-4601-960b-0ca43996f663@github.com> References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> <3l3-MvcdKypoW9KMcKQDyk5jBw_9OEjfOWBkRDr7wpw=.b84d6330-e300-4601-960b-0ca43996f663@github.com> Message-ID: On Tue, 21 Dec 2021 21:12:57 GMT, Alexey Ivanov wrote: >> src/java.desktop/share/classes/javax/swing/table/TableCellEditor.java line 34: >> >>> 32: /** >>> 33: * This interface defines the method any object that would like to be >>> 34: * an editor of values for the {@code JTable} component needs to implement. >> >> "This interface must be implemented to provide an editor of cell values for a {@code JTable}" ? > > Clear and to the point. I wonder if it makes sense to update the Javadoc for `TreeCellEditor` for consistency. ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From aivanov at openjdk.java.net Tue Dec 21 21:26:25 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 21 Dec 2021 21:26:25 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v5] In-Reply-To: References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> <70BX5SXk_YBwACbsXf3aMS4KytQQoxkwNhXuuRgOYgo=.4e15bbad-05b2-456a-965d-b9c20b9c6303@github.com> <_yyT1DE1iec1ea6SsjCE-wT6fBrkBrws9Co61mbukNs=.572220ae-c3a4-4363-864a-bcfcc51c0e73@github.com> Message-ID: On Tue, 21 Dec 2021 21:01:32 GMT, Alexey Ivanov wrote: >>> No, they don't. At the same time `TableCellEditor` interface can't be used to return a cell editor for `JComboBox` and for `JTree` components. These components use `ComboBoxEditor` and `TreeCellEditor` correspondingly. >> >> Right the TableCellEditor should not be used as a JComboBox/JTree editor, it is only for JTable. But the objects implemented TableCellEditor interface can be used to modify the values stored as the JComboBox/JTree when the user edits the cell of the table. So the user selects the cell -> the TableCellEditor is activated for editing that cell -> if the data for the cell may be stored as a list then the JComboBox could be shown -> the user may change/edit the current value of the cell using JComboBox and its values? And the list of components in the spec is just an example of what components can be used by the TableCellEditor. >> >> At least this is how I read it, might be wrong. > > I agree it probably referred to components which can be used as an editor. `DefaultEditorCell` supports three components: `JCheckBox`, `JComboBox`, and `JTextField`. > >> But the objects implemented TableCellEditor interface can be used to modify the values stored as the JComboBox/JTree when the user edits the cell of the table. > > And this just adds to the confusion rather than clarifies the purpose of the interface. In fact, the `CellEditor` interface describes how the interface can be used for `JTable` and `JTree` and gives `JTextField`, `JCheckBox`, `JComboBox` as the examples of specific editors. ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From aivanov at openjdk.java.net Tue Dec 21 21:30:13 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 21 Dec 2021 21:30:13 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v5] In-Reply-To: References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> Message-ID: On Thu, 9 Dec 2021 13:31:38 GMT, Tejesh R wrote: >> JListBox is invalid component. CellTableEditor Interface doesn't support JComboBox and JTree components. Hence its removed from Documentation. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > 6465404: some problems in CellEditor related API docs Should we add `@see javax.swing.JTable` to the Javadoc? ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From jwilhelm at openjdk.java.net Tue Dec 21 22:02:00 2021 From: jwilhelm at openjdk.java.net (Jesper Wilhelmsson) Date: Tue, 21 Dec 2021 22:02:00 GMT Subject: RFR: Merge jdk18 [v2] In-Reply-To: <2qAXnV7AsRJ0Z5Of9gkLOHIACVFGRfrl3MVhJsfpSew=.b02d2da2-3ce5-497d-a979-4e602c3834be@github.com> References: <2qAXnV7AsRJ0Z5Of9gkLOHIACVFGRfrl3MVhJsfpSew=.b02d2da2-3ce5-497d-a979-4e602c3834be@github.com> Message-ID: <06_kDiLlkp6QNtnHGLkuV7TxzucQtDwRaGLnjWX0dpM=.a14aed52-214c-4723-be0c-6bf07ef3a6e0@github.com> > Forwardport JDK 18 -> JDK 19 Jesper Wilhelmsson has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 96 commits: - Merge - 8279043: Some Security Exception Messages Miss Spaces Reviewed-by: weijun - 8278793: Interpreter(x64) intrinsify Thread.currentThread() Reviewed-by: rkennke, dcubed, dholmes - 8278044: ObjectInputStream methods invoking the OIF.CFG.getSerialFilterFactory() silent about error cases. Reviewed-by: lancea, bpb - 8278087: Deserialization filter and filter factory property error reporting under specified Reviewed-by: lancea, bpb - 8278917: Use Prev Bitmap for recording evac failed objects Reviewed-by: ayang, mli, tschatzl - 8277893: Arraycopy stress tests Reviewed-by: kvn, mli - 8278893: Parallel: Remove GCWorkerDelayMillis Reviewed-by: ayang, mli - 8278953: Clarify Class.getDeclaredConstructor specification Reviewed-by: mchung, alanb - 8277100: Dynamic dump can inadvertently overwrite default CDS archive Reviewed-by: iklam, minqi, dholmes - ... and 86 more: https://git.openjdk.java.net/jdk/compare/1128674d...d5d5bad9 ------------- Changes: https://git.openjdk.java.net/jdk/pull/6911/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6911&range=01 Stats: 18631 lines in 509 files changed: 14435 ins; 3002 del; 1194 mod Patch: https://git.openjdk.java.net/jdk/pull/6911.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6911/head:pull/6911 PR: https://git.openjdk.java.net/jdk/pull/6911 From jwilhelm at openjdk.java.net Tue Dec 21 22:02:03 2021 From: jwilhelm at openjdk.java.net (Jesper Wilhelmsson) Date: Tue, 21 Dec 2021 22:02:03 GMT Subject: Integrated: Merge jdk18 In-Reply-To: <2qAXnV7AsRJ0Z5Of9gkLOHIACVFGRfrl3MVhJsfpSew=.b02d2da2-3ce5-497d-a979-4e602c3834be@github.com> References: <2qAXnV7AsRJ0Z5Of9gkLOHIACVFGRfrl3MVhJsfpSew=.b02d2da2-3ce5-497d-a979-4e602c3834be@github.com> Message-ID: On Tue, 21 Dec 2021 19:50:51 GMT, Jesper Wilhelmsson wrote: > Forwardport JDK 18 -> JDK 19 This pull request has now been integrated. Changeset: 803cb8a7 Author: Jesper Wilhelmsson URL: https://git.openjdk.java.net/jdk/commit/803cb8a76827a21fcf9e033b4ca6a777c509169b Stats: 1086 lines in 80 files changed: 695 ins; 107 del; 284 mod Merge ------------- PR: https://git.openjdk.java.net/jdk/pull/6911 From tnakamura at openjdk.java.net Wed Dec 22 01:40:26 2021 From: tnakamura at openjdk.java.net (Toshio Nakamura) Date: Wed, 22 Dec 2021 01:40:26 GMT Subject: RFR: 8240756: [macos] SwingSet2:TableDemo:Printed Japanese characters were garbled [v3] In-Reply-To: References: Message-ID: On Thu, 21 Oct 2021 00:57:47 GMT, Toshio Nakamura wrote: >> Hi, >> >> Could you review the fix? >> When non-English characters were printed from JTable on MacOS, CTextPipe.doDrawGlyphs was called by OSXSurfaceData.drawGlyphs. However, CTextPipe seems not support glyph with slot number of composite fonts. >> >> The slot data mask of GlyphVector is 0xff000000. In my environment, Japanese font was loaded at slot 4, and glyph data is like [0x40003e5]. Then, unexpected glyph was drawn. > > Toshio Nakamura has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision: > > - 8240756: [macos] SwingSet2:TableDemo:Printed Japanese characters were garbled > - revert previous proposal > - Merge branch 'master' into 8240756 > - 2nd proposal > - Revert previous change > - Merge branch 'master' into 8240756 > merge master > - 8240756: [macos] SwingSet2:TableDemo:Printed Japanese characters were garbled (Adding comment to keep this PR active.) This fix tries to fill a gap between a native API and Composite font, since the native API can work for a single font with GlyphVector. This fix switches an appropriate font from the font list of Composite font of Java codes. I appreciate any comments or advices. ------------- PR: https://git.openjdk.java.net/jdk/pull/3619 From duke at openjdk.java.net Wed Dec 22 10:54:17 2021 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 22 Dec 2021 10:54:17 GMT Subject: RFR: 6496103: isFileHidingEnabled return false by default [v3] In-Reply-To: References: <_C3lDw9NYzxbZtUdu44cRMEHaa6NhTV6fJWB-ho59yo=.eeda6bb0-81b0-4f0d-9c3b-58fbaa1c433d@github.com> Message-ID: On Tue, 21 Dec 2021 20:35:56 GMT, Alexey Ivanov wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> 6496103: isFileHidingEnabled return false by default > > src/java.desktop/share/classes/javax/swing/JFileChooser.java line 1416: > >> 1414: * Returns true if hidden files are not shown in the file chooser; >> 1415: * otherwise, returns false. The default value of this property may be >> 1416: * derived from the underlying Operating System. > > Should true and false be marked up as `{@code true}` and `{@code false}`? > Probably not, for consistency with other methods in the JFileChooser class. @aivanov-jdk Yeah, could have done that, but still lot of places in the same file doesn't have the consistency, so taking it up in another PR will be better I guess.... ------------- PR: https://git.openjdk.java.net/jdk/pull/6780 From myano at openjdk.java.net Wed Dec 22 11:02:22 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Wed, 22 Dec 2021 11:02:22 GMT Subject: RFR: 7001973: java/awt/Graphics2D/CopyAreaOOB.java fails [v2] In-Reply-To: References: Message-ID: On Tue, 26 Oct 2021 04:52:37 GMT, Sergey Bylokhov wrote: >> Masanori Yano 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 four additional commits since the last revision: >> >> - 7001973: java/awt/Graphics2D/CopyAreaOOB.java fails >> - Merge branch 'master' of https://github.com/masyano/jdk into 7001973 >> - 7001973: java/awt/Graphics2D/CopyAreaOOB.java fails >> - 7001973: java/awt/Graphics2D/CopyAreaOOB.java fails > > I'll check it, let me some time. @mrserb Could you please review the above comments? ------------- PR: https://git.openjdk.java.net/jdk/pull/5491 From duke at openjdk.java.net Wed Dec 22 11:13:56 2021 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 22 Dec 2021 11:13:56 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v6] In-Reply-To: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> Message-ID: > JListBox is invalid component. CellTableEditor Interface doesn't support JComboBox and JTree components. Hence its removed from Documentation. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: 6465404: some problems in CellEditor related API docs ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6608/files - new: https://git.openjdk.java.net/jdk/pull/6608/files/d411b906..9face9ec Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6608&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6608&range=04-05 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/6608.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6608/head:pull/6608 PR: https://git.openjdk.java.net/jdk/pull/6608 From duke at openjdk.java.net Wed Dec 22 11:13:57 2021 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 22 Dec 2021 11:13:57 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v5] In-Reply-To: References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> <3l3-MvcdKypoW9KMcKQDyk5jBw_9OEjfOWBkRDr7wpw=.b84d6330-e300-4601-960b-0ca43996f663@github.com> Message-ID: On Tue, 21 Dec 2021 21:23:18 GMT, Alexey Ivanov wrote: >> Clear and to the point. > > I wonder if it makes sense to update the Javadoc for `TreeCellEditor` for consistency. Yeah, this description is clear and to the point. Will updated the PR. ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From duke at openjdk.java.net Wed Dec 22 11:17:16 2021 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 22 Dec 2021 11:17:16 GMT Subject: RFR: 6465404: some problems in CellEditor related API docs [v6] In-Reply-To: References: <15Kvi9XA-JBxlPt7OAn_G3_NWVuWC7T1fZ8w5gJEQtg=.7755e774-4347-41d9-987a-0c02dc78fa84@github.com> <70BX5SXk_YBwACbsXf3aMS4KytQQoxkwNhXuuRgOYgo=.4e15bbad-05b2-456a-965d-b9c20b9c6303@github.com> <_yyT1DE1iec1ea6SsjCE-wT6fBrkBrws9Co61mbukNs=.572220ae-c3a4-4363-864a-bcfcc51c0e73@github.com> Message-ID: On Tue, 21 Dec 2021 21:21:01 GMT, Alexey Ivanov wrote: >> I agree it probably referred to components which can be used as an editor. `DefaultEditorCell` supports three components: `JCheckBox`, `JComboBox`, and `JTextField`. >> >>> But the objects implemented TableCellEditor interface can be used to modify the values stored as the JComboBox/JTree when the user edits the cell of the table. >> >> And this just adds to the confusion rather than clarifies the purpose of the interface. > > In fact, the `CellEditor` interface describes how the interface can be used for `JTable` and `JTree` and gives `JTextField`, `JCheckBox`, `JComboBox` as the examples of specific editors. Hi, I have updated the PR as per latest discussions and Input, any other suggestions or Inputs......? ------------- PR: https://git.openjdk.java.net/jdk/pull/6608 From myano at openjdk.java.net Wed Dec 22 11:33:14 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Wed, 22 Dec 2021 11:33:14 GMT Subject: RFR: 8275715: D3D pipeline processes multiple PaintEvent at initial drawing [v2] In-Reply-To: References: <-hj0v7RZ0HPpP9GND5csZsZ1Vz7oxaufOAC0-ZygtwM=.6a5ae7a8-52d6-4e3e-a166-2fae2c23dbe0@github.com> <2rBhm1b2wZwnJFYIve6hdNLHFE0iAkGbj1GkDkSOUCs=.726e6e6a-76b6-4657-b44b-dd854769055c@github.com> Message-ID: On Thu, 18 Nov 2021 00:02:30 GMT, Sergey Bylokhov wrote: >> @mrserb Can I hope this fix will be integrated after JDK-8270874 is fixed? > > Yes. @mrserb @prrace Could you please review the above comments? ------------- PR: https://git.openjdk.java.net/jdk/pull/6064 From ant at openjdk.java.net Wed Dec 22 12:49:16 2021 From: ant at openjdk.java.net (Anton Tarasov) Date: Wed, 22 Dec 2021 12:49:16 GMT Subject: RFR: 8278612: test/jdk/java/awt/dnd/RemoveDropTargetCrashTest crashes with VoiceOver on macOS In-Reply-To: References: Message-ID: On Mon, 13 Dec 2021 16:50:00 GMT, Anton Tarasov wrote: > ? VoiceOver on macOS Moved to jdk18: https://github.com/openjdk/jdk18/pull/65 ------------- PR: https://git.openjdk.java.net/jdk/pull/6816 From ant at openjdk.java.net Wed Dec 22 12:49:17 2021 From: ant at openjdk.java.net (Anton Tarasov) Date: Wed, 22 Dec 2021 12:49:17 GMT Subject: RFR: 8278612: test/jdk/java/awt/dnd/RemoveDropTargetCrashTest crashes with VoiceOver on macOS In-Reply-To: References: Message-ID: <322EDIQQfRkAYFHAKlBmqJAh0QEyqKHQSXeWhNmX-Qw=.be190956-e68a-42a2-b34f-6793092f26ec@github.com> On Mon, 13 Dec 2021 20:08:11 GMT, Sergey Bylokhov wrote: >> ? VoiceOver on macOS > > src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/TabButtonAccessibility.m line 62: > >> 60: { >> 61: if (fTabGroupAxContext == NULL) { >> 62: id parent = [self parent]; > > Probably we can sanitize all casts to (CommonComponentAccessibility *) via some utility method which will check the type and then cast, so all calling code will get a CommonComponentAccessibility or nil? @mrserb Thanks, I did that. I had to re-submit PR for jdk18, please proceed in https://github.com/openjdk/jdk18/pull/65 ------------- PR: https://git.openjdk.java.net/jdk/pull/6816 From ant at openjdk.java.net Wed Dec 22 12:49:17 2021 From: ant at openjdk.java.net (Anton Tarasov) Date: Wed, 22 Dec 2021 12:49:17 GMT Subject: Withdrawn: 8278612: test/jdk/java/awt/dnd/RemoveDropTargetCrashTest crashes with VoiceOver on macOS In-Reply-To: References: Message-ID: On Mon, 13 Dec 2021 16:50:00 GMT, Anton Tarasov wrote: > ? VoiceOver on macOS This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/6816 From ant at openjdk.java.net Wed Dec 22 12:50:30 2021 From: ant at openjdk.java.net (Anton Tarasov) Date: Wed, 22 Dec 2021 12:50:30 GMT Subject: [jdk18] RFR: 8278612: test/jdk/java/awt/dnd/RemoveDropTargetCrashTest crashes with VoiceOver on macOS Message-ID: 8278612: test/jdk/java/awt/dnd/RemoveDropTargetCrashTest crashes with VoiceOver on macOS ------------- Commit messages: - 8278612: test/jdk/java/awt/dnd/RemoveDropTargetCrashTest crashes with VoiceOver on macOS Changes: https://git.openjdk.java.net/jdk18/pull/65/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk18&pr=65&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8278612 Stats: 28 lines in 3 files changed: 20 ins; 0 del; 8 mod Patch: https://git.openjdk.java.net/jdk18/pull/65.diff Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/65/head:pull/65 PR: https://git.openjdk.java.net/jdk18/pull/65 From serb at openjdk.java.net Wed Dec 22 19:45:16 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 22 Dec 2021 19:45:16 GMT Subject: [jdk18] RFR: 8278612: test/jdk/java/awt/dnd/RemoveDropTargetCrashTest crashes with VoiceOver on macOS In-Reply-To: References: Message-ID: On Wed, 22 Dec 2021 12:42:30 GMT, Anton Tarasov wrote: > 8278612: test/jdk/java/awt/dnd/RemoveDropTargetCrashTest crashes with VoiceOver on macOS Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk18/pull/65 From serb at openjdk.java.net Wed Dec 22 22:08:11 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 22 Dec 2021 22:08:11 GMT Subject: RFR: 8276266: Clean up incorrect client-libs ProblemList.txt entries In-Reply-To: References: <-gLIqdVcPOaZgxCVSkMNQ6FzygLGTk7O710l-Mwc4zc=.8b8a3124-9d44-4893-af45-89c22d49b589@github.com> Message-ID: On Tue, 2 Nov 2021 16:10:43 GMT, Phil Race wrote: >> I am not sure why the macOS-specific JDK-8203047 was closed as a duplicate of x11 specific JDK-8072110? >> The HandleExceptionOnEDT from the JDK-8203047 is not even mentioned in the JDK-8072110. > >> I am not sure why the macOS-specific JDK-8203047 was closed as a duplicate of x11 specific JDK-8072110? >> The HandleExceptionOnEDT from the JDK-8203047 is not even mentioned in the JDK-8072110. > > I don't know. This was done by @prsadhuk - Prasanta can you explain that ? Any updates on that @prrace @prsadhuk? ------------- PR: https://git.openjdk.java.net/jdk/pull/6203 From serb at openjdk.java.net Thu Dec 23 01:44:14 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 23 Dec 2021 01:44:14 GMT Subject: RFR: 8278908: [macOS] Unexpected text normalization on pasting from clipboard In-Reply-To: References: Message-ID: On Thu, 16 Dec 2021 15:53:26 GMT, Dmitry Batrak wrote: > The fix just removes the explicit normalization of text obtained from system clipboard in JDK code, as I've found no > good justification for such a normalization, at least for the latest macOS version. > The same fix was performed in JetBrains Runtime by a user's request more than 4 years ago, and we didn't receive any > related complaints from our users ever since. This code was added by changeset in the macosx-port project and never changed since then, probably the goal was to align behavior with jdk6? See the changeset below , take a look to the usage of CFStringNormalize/Normalizer.normalize, is it possible that both is used for some other reason? https://hg.openjdk.java.net/macosx-port/macosx-port/jdk/rev/dfe77a31519f ------------- PR: https://git.openjdk.java.net/jdk/pull/6866 From myano at openjdk.java.net Thu Dec 23 09:39:59 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Thu, 23 Dec 2021 09:39:59 GMT Subject: RFR: 8277463: JFileChooser with Metal L&F doesn't show non-canonical UNC path in - Look in [v3] In-Reply-To: References: Message-ID: > I would like to fix the bug reported in JDK-8277463. > > As reporter's investigation, ShellFolder.getNormalizedFile() returns incorrect value for non-canonical Windows UNC path. getNormalizedFile() is used for symbolic link path, but Windows environment does not handle symbolic link. And, getCanonicalFile() returns correct path for a directory link in Windows which is made with `mklink` command. So getNormalizedFile() should perform to return getCanonicalFile() like WindowsFileChooserUI.addItem() at Windows environment. Masanori Yano has updated the pull request incrementally with one additional commit since the last revision: 8277463: JFileChooser with Metal L&F doesn't show non-canonical UNC path in - Look in ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/6796/files - new: https://git.openjdk.java.net/jdk/pull/6796/files/3e163ff9..5a164033 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6796&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6796&range=01-02 Stats: 37 lines in 1 file changed: 0 ins; 2 del; 35 mod Patch: https://git.openjdk.java.net/jdk/pull/6796.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6796/head:pull/6796 PR: https://git.openjdk.java.net/jdk/pull/6796 From myano at openjdk.java.net Thu Dec 23 09:40:01 2021 From: myano at openjdk.java.net (Masanori Yano) Date: Thu, 23 Dec 2021 09:40:01 GMT Subject: RFR: 8277463: JFileChooser with Metal L&F doesn't show non-canonical UNC path in - Look in [v3] In-Reply-To: References: <1APEWt6EfSMXZSLa9JNxgLwQpdtfpOBE1VBgXCUntxM=.83285e41-fd61-452d-b3bf-7da6ce4f432b@github.com> Message-ID: On Tue, 21 Dec 2021 05:28:17 GMT, Sergey Bylokhov wrote: >> I fixed the test as it was pointed out to me. > > Now it cannot be compiled due to "unreported exception java.lang.ClassNotFoundException; must be caught or declared to be thrown" from the setLookAndFeel(); Note that the new version still has a race, the invokeLater/setLookAndFeel can be executed later than the code in the showOpenDialog(), so the code in showOpenDialog may use the wrong L&F properties, can we move the showOpenDialog to the EDT as well? Sorry, I've modified the test case. If showOpenDialog() is called on EDT, this test does not exit at judge button pressing. So I would to change createInstructionUI() to call on main thread. This method sets properties and event handlers before showing UI, so does not need call on EDT. ------------- PR: https://git.openjdk.java.net/jdk/pull/6796 From dbatrak at openjdk.java.net Thu Dec 23 10:44:11 2021 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Thu, 23 Dec 2021 10:44:11 GMT Subject: RFR: 8278908: [macOS] Unexpected text normalization on pasting from clipboard In-Reply-To: References: Message-ID: <61H8Rel0r2RtClQn7w91mzovorOlGG0rG8oBYT8zcvs=.a5ddd4dd-0d09-450a-bbab-d1839af3039e@github.com> On Thu, 16 Dec 2021 15:53:26 GMT, Dmitry Batrak wrote: > The fix just removes the explicit normalization of text obtained from system clipboard in JDK code, as I've found no > good justification for such a normalization, at least for the latest macOS version. > The same fix was performed in JetBrains Runtime by a user's request more than 4 years ago, and we didn't receive any > related complaints from our users ever since. Thanks, I didn't know about that repo being available. `CFStringNormalize` in the code is applied to filenames. Removing that explicit normalization doesn't seem to make any existing jtreg test fail (checked `dnd` and `datatransfer` ones), but I wouldn't touch it without a reason (e.g. a user reporting a problem with it). It can be related to file access API implementation, which, AFAIU, is expected to ignore the normalization form when referring to a file by its name on macOS. After the proposed fix, filename can have a different representation in 'plain-text' and 'file-list'/'uri-list' flavors, as seen by a Java app, for a file 'copied' to clipboard e.g. from Finder, but I see no apparent problems with that. ------------- PR: https://git.openjdk.java.net/jdk/pull/6866 From ant at openjdk.java.net Thu Dec 23 17:59:21 2021 From: ant at openjdk.java.net (Anton Tarasov) Date: Thu, 23 Dec 2021 17:59:21 GMT Subject: [jdk18] RFR: 8278612: [macos] test/jdk/java/awt/dnd/RemoveDropTargetCrashTest crashes with VoiceOver on macOS In-Reply-To: References: Message-ID: <3FoYq5FdrHGh-ixz1sYyIEIDj6S9lhvDIjNVlWukPvo=.36ec821d-2a53-48a7-a3ba-364368018fbd@github.com> On Wed, 22 Dec 2021 12:42:30 GMT, Anton Tarasov wrote: > 8278612: [macos] test/jdk/java/awt/dnd/RemoveDropTargetCrashTest crashes with VoiceOver on macOS @azuev-java please review. ------------- PR: https://git.openjdk.java.net/jdk18/pull/65 From duke at openjdk.java.net Fri Dec 24 02:06:18 2021 From: duke at openjdk.java.net (Andrey Turbanov) Date: Fri, 24 Dec 2021 02:06:18 GMT Subject: Integrated: 8274893: Update java.desktop classes to use try-with-resources In-Reply-To: <_2AOzxRXvyozC4AbdieYrNLVEsNdnYJBLM3ExBBpIsA=.a82484c7-8ece-4233-a965-634e9e867cb7@github.com> References: <_2AOzxRXvyozC4AbdieYrNLVEsNdnYJBLM3ExBBpIsA=.a82484c7-8ece-4233-a965-634e9e867cb7@github.com> Message-ID: On Tue, 5 Oct 2021 08:13:53 GMT, Andrey Turbanov wrote: > 8274893: Update java.desktop classes to use try-with-resources This pull request has now been integrated. Changeset: 70c6df6b Author: Andrey Turbanov Committer: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/70c6df6be431fe11c5441986ed04040f9ec3b750 Stats: 227 lines in 24 files changed: 27 ins; 98 del; 102 mod 8274893: Update java.desktop classes to use try-with-resources Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/5817 From serb at openjdk.java.net Fri Dec 24 07:18:16 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 24 Dec 2021 07:18:16 GMT Subject: RFR: 8278908: [macOS] Unexpected text normalization on pasting from clipboard In-Reply-To: <61H8Rel0r2RtClQn7w91mzovorOlGG0rG8oBYT8zcvs=.a5ddd4dd-0d09-450a-bbab-d1839af3039e@github.com> References: <61H8Rel0r2RtClQn7w91mzovorOlGG0rG8oBYT8zcvs=.a5ddd4dd-0d09-450a-bbab-d1839af3039e@github.com> Message-ID: On Thu, 23 Dec 2021 10:41:24 GMT, Dmitry Batrak wrote: > After the proposed fix, filename can have a different representation in 'plain-text' and 'file-list'/'uri-list' flavors, as seen by a Java app, for a file 'copied' to clipboard e.g. from Finder, but I see no apparent problems with that. Since we looking at this code, can you please check if this filenames normalization differs from the native application, it will be useful for the future work. ------------- PR: https://git.openjdk.java.net/jdk/pull/6866 From duke at openjdk.java.net Fri Dec 24 09:59:39 2021 From: duke at openjdk.java.net (Aleksandr Veselov) Date: Fri, 24 Dec 2021 09:59:39 GMT Subject: [jdk18] RFR: 8279227: Access Bridge: Wrong frame position and hit test result on HiDPI display Message-ID: Perform scaling while converting sizes and coordinates to provide correct positions of accessible elements on HiDPI screen and make hit-test work properly. It uses FontRenderContext to receive display scale without API changes. ------------- Commit messages: - 8279227: Access Bridge: Wrong frame position and hit test result on HiDPI display Changes: https://git.openjdk.java.net/jdk18/pull/72/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk18&pr=72&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8279227 Stats: 42 lines in 1 file changed: 42 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk18/pull/72.diff Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/72/head:pull/72 PR: https://git.openjdk.java.net/jdk18/pull/72 From duke at openjdk.java.net Fri Dec 24 12:00:52 2021 From: duke at openjdk.java.net (Aleksandr Veselov) Date: Fri, 24 Dec 2021 12:00:52 GMT Subject: [jdk18] RFR: 8279227: Access Bridge: Wrong frame position and hit test result on HiDPI display [v2] In-Reply-To: References: Message-ID: > Perform scaling while converting sizes and coordinates to provide correct positions of accessible elements on HiDPI screen and make hit-test work properly. It uses FontRenderContext to receive display scale without API changes. Aleksandr Veselov has updated the pull request incrementally with one additional commit since the last revision: Fix missing import ------------- Changes: - all: https://git.openjdk.java.net/jdk18/pull/72/files - new: https://git.openjdk.java.net/jdk18/pull/72/files/b8a20812..4ad508fe Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk18&pr=72&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk18&pr=72&range=00-01 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk18/pull/72.diff Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/72/head:pull/72 PR: https://git.openjdk.java.net/jdk18/pull/72 From dbatrak at openjdk.java.net Fri Dec 24 12:36:15 2021 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Fri, 24 Dec 2021 12:36:15 GMT Subject: RFR: 8278908: [macOS] Unexpected text normalization on pasting from clipboard In-Reply-To: References: Message-ID: On Thu, 16 Dec 2021 15:53:26 GMT, Dmitry Batrak wrote: > The fix just removes the explicit normalization of text obtained from system clipboard in JDK code, as I've found no > good justification for such a normalization, at least for the latest macOS version. > The same fix was performed in JetBrains Runtime by a user's request more than 4 years ago, and we didn't receive any > related complaints from our users ever since. Sure, I just don't know a 'functional' enough approach to check it, like I've done it for text copy/paste. If you mean checking the normalization macOS APIs use when returning filenames, it definitely not NFC. At least, after I rename a file using Finder, its filename is returned in NFD (decomposed) form by both file access APIs (e.g. `readdir` from C library or `NSFileManager` from Foundation framework) and when read from clipboard (for `NSFilenamesPboardType` data type). ------------- PR: https://git.openjdk.java.net/jdk/pull/6866 From ant at openjdk.java.net Fri Dec 24 14:25:11 2021 From: ant at openjdk.java.net (Anton Tarasov) Date: Fri, 24 Dec 2021 14:25:11 GMT Subject: [jdk18] RFR: 8279227: Access Bridge: Wrong frame position and hit test result on HiDPI display [v2] In-Reply-To: References: Message-ID: <8i6mUXhmJE9MnSIhvPMcXAFf7QzDZRfj1iErqjMt2BQ=.0a22b0e1-65fc-4aec-867b-a36135ad9304@github.com> On Fri, 24 Dec 2021 12:00:52 GMT, Aleksandr Veselov wrote: >> Perform scaling while converting sizes and coordinates to provide correct positions of accessible elements on HiDPI screen and make hit-test work properly. It uses FontRenderContext to receive display scale without API changes. > > Aleksandr Veselov has updated the pull request incrementally with one additional commit since the last revision: > > Fix missing import Marked as reviewed by ant (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk18/pull/72 From aivanov at openjdk.java.net Fri Dec 24 16:23:11 2021 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 24 Dec 2021 16:23:11 GMT Subject: [jdk18] RFR: 8279227: Access Bridge: Wrong frame position and hit test result on HiDPI display [v2] In-Reply-To: References: Message-ID: On Fri, 24 Dec 2021 12:00:52 GMT, Aleksandr Veselov wrote: >> Perform scaling while converting sizes and coordinates to provide correct positions of accessible elements on HiDPI screen and make hit-test work properly. It uses FontRenderContext to receive display scale without API changes. > > Aleksandr Veselov has updated the pull request incrementally with one additional commit since the last revision: > > Fix missing import @mrserb take a look ------------- PR: https://git.openjdk.java.net/jdk18/pull/72 From serb at openjdk.java.net Sat Dec 25 00:03:19 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 25 Dec 2021 00:03:19 GMT Subject: [jdk18] RFR: 8279227: Access Bridge: Wrong frame position and hit test result on HiDPI display [v2] In-Reply-To: References: Message-ID: On Fri, 24 Dec 2021 12:00:52 GMT, Aleksandr Veselov wrote: >> Perform scaling while converting sizes and coordinates to provide correct positions of accessible elements on HiDPI screen and make hit-test work properly. It uses FontRenderContext to receive display scale without API changes. > > Aleksandr Veselov has updated the pull request incrementally with one additional commit since the last revision: > > Fix missing import src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java line 1617: > 1615: r.width = (int) Math.ceil(r.width * at.getScaleX()); > 1616: r.height = (int) Math.ceil(r.height * at.getScaleY()); > 1617: } This logic will not work on the multiscreen configs when the monitors have different DPI, the logic should be similar to the SunGraphicsEnvironment.toDeviceSpace(). and probably the round logic should use Region.clipRound as well. src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java line 1768: > 1766: FontMetrics fm = acomp.getFontMetrics(acomp.getFont()); > 1767: if (fm != null) { > 1768: return fm.getFontRenderContext().getTransform(); I am not sure do we really update the FRC for the component when the DPI is changed? ------------- PR: https://git.openjdk.java.net/jdk18/pull/72 From serb at openjdk.java.net Sat Dec 25 03:57:16 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 25 Dec 2021 03:57:16 GMT Subject: [jdk18] RFR: 8279227: Access Bridge: Wrong frame position and hit test result on HiDPI display [v2] In-Reply-To: References: Message-ID: On Fri, 24 Dec 2021 23:57:51 GMT, Sergey Bylokhov wrote: >> Aleksandr Veselov has updated the pull request incrementally with one additional commit since the last revision: >> >> Fix missing import > > src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java line 1617: > >> 1615: r.width = (int) Math.ceil(r.width * at.getScaleX()); >> 1616: r.height = (int) Math.ceil(r.height * at.getScaleY()); >> 1617: } > > This logic will not work on the multiscreen configs when the monitors have different DPI, the logic should be similar to the SunGraphicsEnvironment.toDeviceSpace(). > and probably the round logic should use Region.clipRound as well. If this data will be used in native then we can try to use device->ScaleDownAbsX/Y, etc methods. ------------- PR: https://git.openjdk.java.net/jdk18/pull/72 From duke at openjdk.java.net Sat Dec 25 17:38:49 2021 From: duke at openjdk.java.net (Aleksandr Veselov) Date: Sat, 25 Dec 2021 17:38:49 GMT Subject: [jdk18] RFR: 8279227: Access Bridge: Wrong frame position and hit test result on HiDPI display [v3] In-Reply-To: References: Message-ID: > Perform scaling while converting sizes and coordinates to provide correct positions of accessible elements on HiDPI screen and make hit-test work properly. It uses FontRenderContext to receive display scale without API changes. Aleksandr Veselov has updated the pull request incrementally with one additional commit since the last revision: Pick graphics configuration from env instead of using FRC ------------- Changes: - all: https://git.openjdk.java.net/jdk18/pull/72/files - new: https://git.openjdk.java.net/jdk18/pull/72/files/4ad508fe..52327942 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk18&pr=72&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk18&pr=72&range=01-02 Stats: 159 lines in 1 file changed: 118 ins; 35 del; 6 mod Patch: https://git.openjdk.java.net/jdk18/pull/72.diff Fetch: git fetch https://git.openjdk.java.net/jdk18 pull/72/head:pull/72 PR: https://git.openjdk.java.net/jdk18/pull/72 From duke at openjdk.java.net Sat Dec 25 17:45:15 2021 From: duke at openjdk.java.net (Aleksandr Veselov) Date: Sat, 25 Dec 2021 17:45:15 GMT Subject: [jdk18] RFR: 8279227: Access Bridge: Wrong frame position and hit test result on HiDPI display [v3] In-Reply-To: References: Message-ID: On Sat, 25 Dec 2021 17:38:49 GMT, Aleksandr Veselov wrote: >> Perform scaling while converting sizes and coordinates to provide correct positions of accessible elements on HiDPI screen and make hit-test work properly. It uses FontRenderContext to receive display scale without API changes. > > Aleksandr Veselov has updated the pull request incrementally with one additional commit since the last revision: > > Pick graphics configuration from env instead of using FRC Hi, @mrserb, thanks for the review. Your idea is awesome and I've tried to implement it. It contains some copied code from `sun.java2d` but I can't import necessary methods without adding it to dependencies. But the issue with different scale factors on multi-display configuration is still present, frame size scaling seems to be stuck at primary display's scale factor. `jaccesibilityinspector` shows correctly scaled bounds, may it be an issue with NVDA? ------------- PR: https://git.openjdk.java.net/jdk18/pull/72 From ant at openjdk.java.net Mon Dec 27 15:00:20 2021 From: ant at openjdk.java.net (Anton Tarasov) Date: Mon, 27 Dec 2021 15:00:20 GMT Subject: [jdk18] RFR: 8279227: Access Bridge: Wrong frame position and hit test result on HiDPI display [v3] In-Reply-To: References: Message-ID: On Sat, 25 Dec 2021 17:38:49 GMT, Aleksandr Veselov wrote: >> Perform scaling while converting sizes and coordinates to provide correct positions of accessible elements on HiDPI screen and make hit-test work properly. It uses FontRenderContext to receive display scale without API changes. > > Aleksandr Veselov has updated the pull request incrementally with one additional commit since the last revision: > > Pick graphics configuration from env instead of using FRC src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java line 7363: > 7361: * @param current the default configuration which is checked in the first > 7362: * place > 7363: * @param x the x coordinate of the given point Please specify in which space the coordinates are expected. src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java line 7369: > 7367: public static GraphicsConfiguration getGraphicsConfigurationAtPoint( > 7368: GraphicsConfiguration current, double x, double y) { > 7369: if (current.getBounds().contains(x, y)) { Here you do not translate the bounds to device space. Actually, I'd remove this check at all, as below you duplicate it. Also, when you call the method you pass the default GC, so it seems it does not bring much profit... ------------- PR: https://git.openjdk.java.net/jdk18/pull/72 From ant at openjdk.java.net Mon Dec 27 15:12:17 2021 From: ant at openjdk.java.net (Anton Tarasov) Date: Mon, 27 Dec 2021 15:12:17 GMT Subject: [jdk18] RFR: 8279227: Access Bridge: Wrong frame position and hit test result on HiDPI display [v2] In-Reply-To: References: Message-ID: On Sat, 25 Dec 2021 00:00:03 GMT, Sergey Bylokhov wrote: >> Aleksandr Veselov has updated the pull request incrementally with one additional commit since the last revision: >> >> Fix missing import > > src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java line 1768: > >> 1766: FontMetrics fm = acomp.getFontMetrics(acomp.getFont()); >> 1767: if (fm != null) { >> 1768: return fm.getFontRenderContext().getTransform(); > > I am not sure do we really update the FRC for the component when the DPI is changed? I've checked it - it does not change, which is unexpected... Doesn't it seem like a bug? Actually, the problem is that AccessibleComponent does not provide the component's GC, which is a missing. Ideally would be to add it to the API and then use - because it already contains actual scales for the component. It's a pity to do all that calculations just because we lack API calls... Is it worth trying to fix the font metrics update instead and use it until the new API is ready and available? ------------- PR: https://git.openjdk.java.net/jdk18/pull/72 From serb at openjdk.java.net Mon Dec 27 21:02:17 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 27 Dec 2021 21:02:17 GMT Subject: RFR: 7001973: java/awt/Graphics2D/CopyAreaOOB.java fails [v2] In-Reply-To: References: Message-ID: On Fri, 15 Oct 2021 11:09:26 GMT, Masanori Yano wrote: >> Could you please review the 7001973 fixes? >> >> On Windows, CopyAreaOOB.java fails with a blank window. The cause of this problem is that paint() works one time only. Painting area is not guaranteed when showing a window. >> >> I think this behavior should be removed for purpose of this test (`@summary: Verifies that copyArea() works properly`). Also, this program uses a Robot, but implements waiting logic by itself. This logic should be replaced to Robot API. >> >> This fix works fine in Windows, so this test can be removed from ProblemList.txt. I don't have a Mac environment, so can someone please confirm that this fix will work on Mac? > > Masanori Yano 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 four additional commits since the last revision: > > - 7001973: java/awt/Graphics2D/CopyAreaOOB.java fails > - Merge branch 'master' of https://github.com/masyano/jdk into 7001973 > - 7001973: java/awt/Graphics2D/CopyAreaOOB.java fails > - 7001973: java/awt/Graphics2D/CopyAreaOOB.java fails Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/5491 From duke at openjdk.java.net Mon Dec 27 22:20:19 2021 From: duke at openjdk.java.net (duke) Date: Mon, 27 Dec 2021 22:20:19 GMT Subject: Withdrawn: 8159451: [TEST_BUG] java/awt/Mixing/AWT_Mixing/JMenuBarOverlapping.java In-Reply-To: References: Message-ID: On Fri, 29 Oct 2021 19:54:47 GMT, Alisen Chung wrote: > Added more time to test, removed pixel check during EmbeddedFrame test from OverlappingTestBase. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/6177 From serb at openjdk.java.net Tue Dec 28 08:19:23 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 28 Dec 2021 08:19:23 GMT Subject: [jdk18] RFR: 8279227: Access Bridge: Wrong frame position and hit test result on HiDPI display [v2] In-Reply-To: References: Message-ID: On Mon, 27 Dec 2021 15:08:34 GMT, Anton Tarasov wrote: > I've checked it - it does not change, which is unexpected... Doesn't it seem like a bug? Yes, I think this is a bug. > Actually, the problem is that AccessibleComponent does not provide the component's GC, which is a missing. Ideally would be to add it to the API and then use - because it already contains actual scales for the component. It's a pity to do all that calculations just because we lack API calls... But do we actually need the GC where the component is located, or do we need a GC where the a11y frame should be placed? I am not sure that both are always the same. Note that you can find the screen where the "virtual coordinates are located" and then convert them to the device space. ------------- PR: https://git.openjdk.java.net/jdk18/pull/72 From serb at openjdk.java.net Tue Dec 28 08:25:10 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 28 Dec 2021 08:25:10 GMT Subject: [jdk18] RFR: 8279227: Access Bridge: Wrong frame position and hit test result on HiDPI display [v3] In-Reply-To: References: Message-ID: On Mon, 27 Dec 2021 14:55:10 GMT, Anton Tarasov wrote: >> Aleksandr Veselov has updated the pull request incrementally with one additional commit since the last revision: >> >> Pick graphics configuration from env instead of using FRC > > src/jdk.accessibility/windows/classes/com/sun/java/accessibility/internal/AccessBridge.java line 7363: > >> 7361: * @param current the default configuration which is checked in the first >> 7362: * place >> 7363: * @param x the x coordinate of the given point > > Please specify in which space the coordinates are expected. > Hi, @mrserb, thanks for the review. Your idea is awesome and I've tried to implement it. It contains some copied code from `sun.java2d` but I can't import necessary methods without adding it to dependencies. Probably we can export that to the "jdk.accessibility" module? We already export "sun.awt" the same way. @prrace any thoughts? But it will be good to make sure that it will work on a multiscreen config before doing that. At least need to understand the root cause of that. ------------- PR: https://git.openjdk.java.net/jdk18/pull/72 From ant at openjdk.java.net Tue Dec 28 12:31:26 2021 From: ant at openjdk.java.net (Anton Tarasov) Date: Tue, 28 Dec 2021 12:31:26 GMT Subject: [jdk18] RFR: 8279227: Access Bridge: Wrong frame position and hit test result on HiDPI display [v2] In-Reply-To: References: Message-ID: On Tue, 28 Dec 2021 08:15:56 GMT, Sergey Bylokhov wrote: > But do we actually need the GC where the component is located, or do we need a GC where the a11y frame should be placed? I am not sure that both are always the same. Note that you can find the screen where the "virtual coordinates are located" and then convert them to the device space. Well, in `AccessBridge.getAccessibleContextAt_1(int x, int y, AccessibleContext parent)` we expect [x, y] within the parent bounds and so we can assume [x, y] has the same scaling. However, `AccessBridge.getAccessibleContextAt_2` works with generic [x, y] and there we have to perform generic transformation, indeed... Ok, if we can't avoid it, then I'm ok with the latest version (taking into account my inline comments). Thanks! ------------- PR: https://git.openjdk.java.net/jdk18/pull/72 From duke at openjdk.java.net Wed Dec 29 15:42:13 2021 From: duke at openjdk.java.net (Nikita Gubarkov) Date: Wed, 29 Dec 2021 15:42:13 GMT Subject: RFR: 8269806: Emoji rendering on Linux In-Reply-To: References: Message-ID: <7-Ouq-Oc_pghY1tWwWWd2awhpitBT2RsPVzf7oL-__c=.d158d642-6ccc-4d1c-86de-b7cee319adca@github.com> On Sat, 30 Oct 2021 20:12:00 GMT, Phil Race wrote: >> @prrace could you take a look, please? > > @YaaZ nothing has really happened here in > 2 months. When can we expect an update ? Hi @prrace! By X11 pipeline, do you mean `-Dsun.java2d.xrender=false`? Because I wasn't able to reproduce this on Ubuntu 20.04 ------------- PR: https://git.openjdk.java.net/jdk/pull/4798 From duke at openjdk.java.net Wed Dec 29 19:29:21 2021 From: duke at openjdk.java.net (duke) Date: Wed, 29 Dec 2021 19:29:21 GMT Subject: Withdrawn: JDK-8274977: Remove expandPacked and extendEdge from awt_ImagingLib.c In-Reply-To: <1tSvf8JjhHG7crHsLOqHpNOsCcBziywqBBG6Q4SgYZk=.fec63717-09a4-4812-8e30-bdf86536cf4c@github.com> References: <1tSvf8JjhHG7crHsLOqHpNOsCcBziywqBBG6Q4SgYZk=.fec63717-09a4-4812-8e30-bdf86536cf4c@github.com> Message-ID: <-eVKEHI8j0vLzmsxLjUMEJ4rnYn7vQYuq6W_2Xshrhg=.5e2b5397-40c6-4ec3-b860-b94c8dc3fe7c@github.com> On Fri, 8 Oct 2021 14:25:18 GMT, Matthias Baesken wrote: > Please review this small cleanup change. > Looks like expandPacked and extendEdge from awt_ImagingLib.c are unreferenced/unused and can be removed. > > Thanks, Matthias This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/5866 From serb at openjdk.java.net Wed Dec 29 23:54:15 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 29 Dec 2021 23:54:15 GMT Subject: RFR: 8264666: Reuse Math.multiplyExact/addExact in the LCMSImageLayout class In-Reply-To: <3iYQc9duUeEGRqm3146n4XhLQ_LY6YzXv-f-WgDu9sE=.a0a36297-4ce8-489c-9b50-43aede408e3b@github.com> References: <3iYQc9duUeEGRqm3146n4XhLQ_LY6YzXv-f-WgDu9sE=.a0a36297-4ce8-489c-9b50-43aede408e3b@github.com> Message-ID: On Fri, 2 Apr 2021 23:02:50 GMT, Sergey Bylokhov wrote: > - The hand-crafted methods for addition and multiplication are replaced by the "Math" versions. > - Cleanup: the usage of do/while(false) is removed not now ------------- PR: https://git.openjdk.java.net/jdk/pull/3333 From duke at openjdk.java.net Thu Dec 30 00:54:19 2021 From: duke at openjdk.java.net (duke) Date: Thu, 30 Dec 2021 00:54:19 GMT Subject: Withdrawn: 8185429: [macos] After the dialog is closed, there is no window become active. In-Reply-To: References: Message-ID: On Sun, 10 Oct 2021 21:26:05 GMT, Alisen Chung wrote: > After a modal dialog is closed, its parent window should be pushed to the front and made key. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/5884 From serb at openjdk.java.net Thu Dec 30 10:21:25 2021 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 30 Dec 2021 10:21:25 GMT Subject: RFR: 8279337: The MToolkit is still referenced in a few places Message-ID: The MToolkit (motif toolkit) was removed in jdk7, but it is still referenced in a few places. ------------- Commit messages: - more cases - Delete the mtoolkit Changes: https://git.openjdk.java.net/jdk/pull/6939/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6939&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8279337 Stats: 114 lines in 18 files changed: 5 ins; 57 del; 52 mod Patch: https://git.openjdk.java.net/jdk/pull/6939.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/6939/head:pull/6939 PR: https://git.openjdk.java.net/jdk/pull/6939 From duke at openjdk.java.net Fri Dec 31 04:25:14 2021 From: duke at openjdk.java.net (duke) Date: Fri, 31 Dec 2021 04:25:14 GMT Subject: Withdrawn: 8169474: KeyCharTest: Wrong number of key events: 0 In-Reply-To: <1fyY3RSMw8l0Xjcq3JFZ88qM7ert_bmJcnXPuW9qmNw=.09e8d110-40bd-4654-a268-40033ab93340@github.com> References: <1fyY3RSMw8l0Xjcq3JFZ88qM7ert_bmJcnXPuW9qmNw=.09e8d110-40bd-4654-a268-40033ab93340@github.com> Message-ID: <9A1MXiYrLs3Y44CJQQweV7pXwNPv39qZ9drxRVV37cY=.aeb34872-9e3a-42c5-8c93-a5d0e64a2e8a@github.com> On Thu, 28 Oct 2021 17:02:45 GMT, Alexander Zuev wrote: > When i reproduced the test failures locally on Ubuntu 18 it seems like AWT Frame > that appeared on the screen had not received focus and keyboard events went to the > Window Manager which ignored them for having no meaning in the current context. > Added explicit toFront and requestFocus calls so window gets focused. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/6161 From duke at openjdk.java.net Fri Dec 31 20:14:12 2021 From: duke at openjdk.java.net (Jeremy) Date: Fri, 31 Dec 2021 20:14:12 GMT Subject: RFR: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box [v12] In-Reply-To: References: Message-ID: On Thu, 16 Dec 2021 18:33:37 GMT, Jeremy wrote: >> This removes code that relied on consulting the Bezier control points to calculate the Rectangle2D bounding box. Instead it's pretty straight-forward to convert the Bezier control points into the x & y parametric equations. At their most complex these equations are cubic polynomials, so calculating their extrema is just a matter of applying the quadratic formula to calculate their extrema. (Or in path segments that are quadratic/linear/constant: we do even less work.) >> >> The bug writeup indicated they wanted Path2D#getBounds2D() to be more accurate/concise. They didn't explicitly say they wanted CubicCurve2D and QuadCurve2D to become more accurate too. But a preexisting unit test failed when Path2D#getBounds2D() was updated and those other classes weren't. At this point I considered either: >> A. Updating CubicCurve2D and QuadCurve2D to use the new more accurate getBounds2D() or >> B. Updating the unit test to forgive the discrepancy. >> >> I chose A. Which might technically be seen as scope creep, but it feels like a more holistic/better approach. >> >> Other shapes in java.awt.geom should not require updating, because they already identify concise bounds. >> >> This also includes a new unit test (in Path2D/UnitTest.java) that fails without the changes in this commit. > > Jeremy has updated the pull request incrementally with one additional commit since the last revision: > > 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box > > This is a second follow-up response to prrace's code review feedback about method modifiers. > > This commit more carefully preserves the getBounds2D() method modifiers for all 3 classes: the Path2D.Double, the Path2D.Float, and the Path2D itself. > > It is possible (if unlikely) that someone previously extended the Path2D class and overrode getBounds2D(), because the Path2D#getBounds2D() method was *not* final. So with this commit: any such existing code will not break. Meanwhile the subclasses (Double and Float) preserve their previous modifiers (final, synchronized). > > This is in response to prrace's code review: > > > You are changing the signature of public API > > src/java.desktop/share/classes/java/awt/geom/Path2D.java > > public final synchronized Rectangle2D getBounds2D() => public Rectangle2D getBounds2D() { > > > > So no longer final, and no longer synchronized. > > This means a CSR is required and we need to think about it .. > > the intention was that the subclass not over-ride. > > And why remove synchronized ? I am fairly sure it was there to > > make sure no one was mutating the Path whilst > > bounds are being calculated. > > And you are using getPathIterator(AffineTransform) and the docs > > for that say it isn't thread safe. > > So I think this implementation needs to be thought about very carefully. Philip requested a CSR, but (as I understand it) I'm not authorized to initiate a CSR. If Philip still thinks a CSR is appropriate (see previous comment): can someone on this mailing list help us initiate that? And/or: if this PR doesn't make it out of review, it might be nice to at least add some comments to the openjdk bug detailing this solution for future reference. (That is: if we can't update Path2D.java, then we can give a work-around in the openjdk bug so developers can copy and paste it as needed.) ------------- PR: https://git.openjdk.java.net/jdk/pull/6227 From cushon at google.com Fri Dec 10 16:25:23 2021 From: cushon at google.com (Liam Miller-Cushon) Date: Fri, 10 Dec 2021 16:25:23 -0000 Subject: Adding uninstallColors and uninstallColorsAndFont LookAndFeel Message-ID: Hello, While investigating JDK-8277817 [1], it was discovered that many of the existing callers of LookAndFeel.{installColors,installColorsAndFont} fail to correctly uninstall the installed properties. [1] https://bugs.openjdk.java.net/browse/JDK-8277817 As part of the fix for that bug, I would like to add corresponding uninstallColors and uninstallColorsAndFont methods to LookAndFeel, to make it easier for the affected callers to correctly uninstall properties installed by the existing methods. The draft CSR is available at https://bugs.openjdk.java.net/browse/JDK-8278555 The review showing the fix for JDK-8277817 using the proposed methods is here: https://git.openjdk.java.net/jdk/pull/6603 I'd appreciate any feedback. Liam