From duke at openjdk.java.net Tue Apr 5 20:16:28 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Tue, 5 Apr 2022 20:16:28 GMT Subject: RFR: 8283712 : Create a manual test framework class [v5] In-Reply-To: References: Message-ID: > We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following > 1) Frame which contains test instruction . > 2) Pass & Fail button so that user can mark the test pass or fail > 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. > 4) Disposing of all the frames. > > @aivanov-jdk lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Fixed review comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7966/files - new: https://git.openjdk.java.net/jdk/pull/7966/files/c9e64add..8e8feff5 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7966&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7966&range=03-04 Stats: 87 lines in 2 files changed: 40 ins; 9 del; 38 mod Patch: https://git.openjdk.java.net/jdk/pull/7966.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7966/head:pull/7966 PR: https://git.openjdk.java.net/jdk/pull/7966 From duke at openjdk.java.net Tue Apr 5 20:19:42 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Tue, 5 Apr 2022 20:19:42 GMT Subject: RFR: 8283712 : Create a manual test framework class [v4] In-Reply-To: References: Message-ID: On Mon, 4 Apr 2022 18:59:39 GMT, Phil Race wrote: >> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: >> >> Dispose the Frame based in EDT > > test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 74: > >> 72: f.setLocationRelativeTo(null); >> 73: f.setVisible(true); >> 74: }); > > I don't see where/how this frame is disposed. Added code to dispose the test UI. > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 76: > >> 74: this.timeoutMinutes = timeoutMinutes; >> 75: >> 76: invokeAndWait(() -> { > > This should also be preceded by a check as to whether it is EDT - I thought I suggested something along those lines already - make it so it works either way and the test itself doesn't have to care to make sure it is on or off EDT, and also even it if uses invokeAndWait when it didn't need to it is harmless. Added a check whether the method is called with in EDT else invoke the UI with in EDT. ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From prr at openjdk.java.net Tue Apr 5 20:38:37 2022 From: prr at openjdk.java.net (Phil Race) Date: Tue, 5 Apr 2022 20:38:37 GMT Subject: RFR: 8283712 : Create a manual test framework class [v5] In-Reply-To: References: Message-ID: On Tue, 5 Apr 2022 20:16:28 GMT, lawrence.andrews wrote: >> We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following >> 1) Frame which contains test instruction . >> 2) Pass & Fail button so that user can mark the test pass or fail >> 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. >> 4) Disposing of all the frames. >> >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Fixed review comments Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From aivanov at openjdk.java.net Tue Apr 5 21:01:45 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 5 Apr 2022 21:01:45 GMT Subject: RFR: 8283712 : Create a manual test framework class [v4] In-Reply-To: References: Message-ID: On Mon, 28 Mar 2022 17:06:41 GMT, lawrence.andrews wrote: >> We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following >> 1) Frame which contains test instruction . >> 2) Pass & Fail button so that user can mark the test pass or fail >> 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. >> 4) Disposing of all the frames. >> >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Dispose the Frame based in EDT The ability to have instructions as HTML text (hosted in `JEditorPane`) would make the solution more flexible. Obviously, we shouldn't implement everything we can think of. Yet we should still think about possible advanced features. test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 48: > 46: static PrintLatinCJKTest testInstance = new PrintLatinCJKTest(); > 47: static String info = > 48: "To test 8022536, if a remote printer is the system default, \n"+ It's unclear to me whether a remote printer is required for the test. We should probably clarify the test instructions. Yet I haven't looked into the bug for which the test was written. test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 91: > 89: public static void main(String[] args) throws InterruptedException, InvocationTargetException { > 90: PassFailJFrame passFailJFrame = new PassFailJFrame("Test Instruction" + > 91: "Frame", info, 7, 30, 3); This already breaks the threading rules of Swing: every access to Swing components must be done on EDT. The thing is `PassFailJFrame` extends `JFrame`, thus super constructor (the inherited one from `JFrame`) will be called on main thread. It's not what we want, isn't it? I'd suggest not to extend `JFrame` at all. We're not developing new functionality to `JFrame` but build UI using Swing components. As a benefit, you'll be able to initialise GUI on EDT if the constructor is called on another thread. I support Phil that the framework should document threading and mark methods which are allowed to be called on any thread. Probably all the methods should allow for it. test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 93: > 91: "Frame", info, 7, 30, 3); > 92: PrintLatinCJKTest.showFrame(); > 93: passFailJFrame.awaitAndCheck(); I believe `awaitAndCheck()` is the method that must be called from the main thread. It waits until the test is completed. If it was called on EDT, it would block the event queue. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 42: > 40: private final CountDownLatch latch = new CountDownLatch(1); > 41: private boolean failed = false; > 42: private String testFailedReason; These two are accessed by EDT and main thread. The boolean field should be declared `volatile` or use `AtomicBoolean`. The same applies for `testFailedReason`. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 45: > 43: private JTextArea instructionsText; > 44: private final int maxRowLength; > 45: private final int maxStringLength; These aren't needed as fields, they're used only to create instruction text. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 65: > 63: * @throws HeadlessException > 64: * @throws InterruptedException > 65: * @throws InvocationTargetException I suggest adding generic descriptions of exceptions to avoid IDE warnings. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 78: > 76: invokeAndWait(() -> { > 77: setLayout(new BorderLayout()); > 78: instructionsText = new JTextArea(instructions, maxRowLength, maxStringLength); You could use line wrap functionality of JTextArea to avoid adding `\n` to the instructions. Consider placing it into JScrollPane for flexibility, though not required. `maxRowLength` is actually the number of rows (lines), and `maxStringLength` is the number of columns. These parameters are used to calculate the preferred size of the text area, they don't limit the text the component can store. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 80: > 78: instructionsText = new JTextArea(instructions, maxRowLength, maxStringLength); > 79: instructionsText.setEditable(false); > 80: instructionsText.setFocusable(false); I think leaving the instructions focusable won't hurt. It would allow selecting text (and copying it) if the tester needs it for whatever reason. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 95: > 93: add(buttonsPanel, BorderLayout.SOUTH); > 94: pack(); > 95: setLocation(10, 10); The instruction window should probably be placed around the centre of the screen. The class should provide a method to position a secondary frame near the instruction frame so that both frames don't overlap. A possibility to include test UI to the instructions could be beneficial in some cases: dealing with one window is easier than with several ones. It's just a suggestion for further improvement though. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 96: > 94: pack(); > 95: setLocation(10, 10); > 96: setVisible(true); Closing the window with Close button should also fail the test, now it doesn't. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 125: > 123: public void getFailureReason() { > 124: final JDialog dialog = new JDialog(); > 125: dialog.setTitle("Failure reason"); I suggest making the dialog Toolkit-modal so that only the dialog can be interacted with. final JDialog dialog = new JDialog(this, "Failure reason", TOOLKIT_MODAL); At this time, I can click Fail again several times and I'll have several dialogs open. I can also click Pass which completes the test and disposes of the dialogs. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 135: > 133: dialog.dispose(); > 134: latch.countDown(); > 135: }); This doesn't handle closing the dialog via Close button or Esc. I believe it should also do everything but copying the entered text. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 144: > 142: jPanel.add(okayBtnPanel, BorderLayout.SOUTH); > 143: dialog.add(jPanel); > 144: dialog.setLocationRelativeTo(null); We should probably position the dialog relatively to the frame or the Fail button. Now the frame is displayed on the left edge of the screen but the dialog is in the centre of the screen as if they're unrelated. ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From aivanov at openjdk.java.net Tue Apr 5 21:01:45 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 5 Apr 2022 21:01:45 GMT Subject: RFR: 8283712 : Create a manual test framework class [v4] In-Reply-To: References: Message-ID: On Mon, 4 Apr 2022 18:59:39 GMT, Phil Race wrote: >> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: >> >> Dispose the Frame based in EDT > > test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 74: > >> 72: f.setLocationRelativeTo(null); >> 73: f.setVisible(true); >> 74: }); > > I don't see where/how this frame is disposed. It isn't disposed of. When run with jtreg, it disposed of by jtreg when it shuts down the VM because main thread existed. If it's run outside of jtreg, the frame remains open after clicking Pass (or Fail). ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From aivanov at openjdk.java.net Tue Apr 5 21:04:40 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 5 Apr 2022 21:04:40 GMT Subject: RFR: 8283712 : Create a manual test framework class [v5] In-Reply-To: References: Message-ID: On Tue, 5 Apr 2022 20:16:28 GMT, lawrence.andrews wrote: >> We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following >> 1) Frame which contains test instruction . >> 2) Pass & Fail button so that user can mark the test pass or fail >> 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. >> 4) Disposing of all the frames. >> >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Fixed review comments test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 105: > 103: PrintLatinCJKTest.showFrame(); > 104: passFailJFrame.awaitAndCheck(); > 105: PrintLatinCJKTest.disposeTestFrame(); It won't be disposed of if the test fails, that is throws an exception, so this should be in try-finally block. The class name isn't required to call a static method which is in this class. ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From aivanov at openjdk.java.net Tue Apr 5 21:11:41 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 5 Apr 2022 21:11:41 GMT Subject: RFR: 8283712 : Create a manual test framework class [v4] In-Reply-To: References: Message-ID: On Tue, 5 Apr 2022 20:57:58 GMT, Alexey Ivanov wrote: > The ability to have instructions as HTML text (hosted in JEditorPane) would make the solution more flexible. Obviously, we shouldn't implement everything we can think of. Yet we should still think about possible advanced features. Although I had the above in mind, I wanted to suggest _adding a timer_ until the timeout. It could give the tester an idea how much time left. Shall the timeout be increased to at least 5 minutes? Or more? A document is to be printed, the printer could be located not close to the tester. There should be enough time to fetch a printed sheet of paper. ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From aivanov at openjdk.java.net Tue Apr 5 21:11:42 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 5 Apr 2022 21:11:42 GMT Subject: RFR: 8283712 : Create a manual test framework class [v5] In-Reply-To: References: Message-ID: On Tue, 5 Apr 2022 20:16:28 GMT, lawrence.andrews wrote: >> We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following >> 1) Frame which contains test instruction . >> 2) Pass & Fail button so that user can mark the test pass or fail >> 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. >> 4) Disposing of all the frames. >> >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Fixed review comments This PR includes a test fix. Should the test fix bugid be the main bugid under which the PR is integrated? The bugid for the framework class could be added as an additional resolved bug. ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From aivanov at openjdk.java.net Tue Apr 5 21:17:40 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 5 Apr 2022 21:17:40 GMT Subject: RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v11] In-Reply-To: References: Message-ID: On Tue, 5 Apr 2022 17:01:13 GMT, Phil Race wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated based on Reiview comments > > test/jdk/javax/swing/ImageIcon/LoadInterruptTest.java line 73: > >> 71: setUpOutput(); >> 72: >> 73: Thread.currentThread().interrupt(); > > really I am unclear if calling interrupt() even before creating the ImageIcon is guaranteed to do what you want .. how are you sure there will be no unexpected consequences. It's specified by [`Object.wait`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/Object.html#wait(long)): > @throws InterruptedException if any thread interrupted the current thread _before or > while_ the current thread was waiting. The interrupted status of the > current thread is cleared when this exception is thrown. ------------- PR: https://git.openjdk.java.net/jdk/pull/7754 From serb at openjdk.java.net Wed Apr 6 05:21:06 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 6 Apr 2022 05:21:06 GMT Subject: RFR: 8284288: Use SVG images for FocusSpec.html and Modality.html In-Reply-To: References: Message-ID: On Mon, 4 Apr 2022 11:17:16 GMT, Alexey Ivanov wrote: > Both `FocusSpec.html` and `Modality.html` use GIF images for diagrams. The images look jagged, especially on High DPI screens which are common now. The images in `Modality.html` use dithered colours which don't look sharp even on regular displays. > > All the modern browsers support SVG which is a vector format and therefore it always looks sharp. > > You can view how the files look after being processed by javadoc: > > - **side-by-side** allows comparing the current and the new images: > - [FocusSpec.html](http://cr.openjdk.java.net/~aivanov/8284288/side-by-side/api/java.desktop/java/awt/doc-files/FocusSpec.html) > - [Modality.html](http://cr.openjdk.java.net/~aivanov/8284288/side-by-side/api/java.desktop/java/awt/doc-files/Modality.html) > - **clean** is the final version: > - [FocusSpec.html](http://cr.openjdk.java.net/~aivanov/8284288/clean/api/java.desktop/java/awt/doc-files/FocusSpec.html) > - [Modality.html](http://cr.openjdk.java.net/~aivanov/8284288/clean/api/java.desktop/java/awt/doc-files/Modality.html) Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8091 From serb at openjdk.java.net Wed Apr 6 05:22:42 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 6 Apr 2022 05:22:42 GMT Subject: RFR: 8283704: Add sealed modifier to java.awt.MultipleGradientPaint In-Reply-To: References: Message-ID: On Fri, 1 Apr 2022 19:18:39 GMT, Phil Race wrote: > Along the same lines as other recent additions of the sealed modifier but this one is quite simple. > Only MultiGradientPaint is touched. The two extant sub-classes it permits are already final > > CSR for review : https://bugs.openjdk.java.net/browse/JDK-8284188 > > jtreg and JCK API tests pass Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8079 From serb at openjdk.java.net Wed Apr 6 05:23:39 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 6 Apr 2022 05:23:39 GMT Subject: RFR: 8284023: java.sun.awt.X11GraphicsDevice.getDoubleBufferVisuals() leaks XdbeScreenVisualInfo [v2] In-Reply-To: References: <6vPxcf3BllwA1Di0WXKrNF9TFKjPnLnfIAuSO8PyV3s=.34ac5f51-a610-4809-9a1e-f822d955340b@github.com> Message-ID: <4MuA8cH3vrM7CU9fYFzouNf1Wr34zpnSIUNMKL-d2IM=.758d7d53-9bd9-4343-8451-03b3f278ad50@github.com> On Thu, 31 Mar 2022 12:37:13 GMT, Zhengyu Gu wrote: >> Please review this small patch that fixes memory leak of `XdbeScreenVisualInfo` obtained from `XdbeGetVisualInfo()` method call. >> >> Test: >> - [x] jdk_awt > > Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision: > > @mrserb's comment Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8047 From serb at openjdk.java.net Wed Apr 6 05:24:46 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 6 Apr 2022 05:24:46 GMT Subject: RFR: 8284014 Menu items with submenus in JPopupMEnu are not spoken on macOS [v2] In-Reply-To: References: Message-ID: On Thu, 31 Mar 2022 10:19:26 GMT, Artem Semenov wrote: >> If the JPopupMenu has menu items with submenus, those items are not spoken by VoiceOver. >> >> @forantar @azuev-java please review. > > Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: > > Is the check for the AccessibleRole.POPUP_MENU is needed here? How it will work if the Menu is added to some container other than POPUP_MENU? Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8043 From serb at openjdk.java.net Wed Apr 6 05:28:59 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 6 Apr 2022 05:28:59 GMT Subject: RFR: 8283706: Add final or sealed modifier to appropriate javax.swing API classes In-Reply-To: References: Message-ID: On Sat, 2 Apr 2022 23:21:03 GMT, Phil Race wrote: > Update Swing classes to use JEP 409 sealed and non-sealed modifiers and add the final modifier where appropriate. > > jtreg tests and JCK API tests pass > > CSR for review here : https://bugs.openjdk.java.net/browse/JDK-8284214 src/java.desktop/share/classes/javax/swing/GroupLayout.java line 2461: > 2459: */ > 2460: public sealed class ParallelGroup extends Group > 2461: permits BaselineGroup { The BaselineGroup class is private so not part of the public API, is it fine to mention the non-public class in the permits block for the public class? ------------- PR: https://git.openjdk.java.net/jdk/pull/8082 From serb at openjdk.java.net Wed Apr 6 05:33:40 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 6 Apr 2022 05:33:40 GMT Subject: RFR: 8284294: Create an automated regression test for RFE 4138746 In-Reply-To: References: Message-ID: On Mon, 4 Apr 2022 14:05:14 GMT, Manukumar V S wrote: > Create an automated regression test for [JDK-4138746](https://bugs.openjdk.java.net/browse/JDK-4138746) > > Issue: > In the following example (and similarly with other components) you cannot specify the correct character to underline: > > JLabel label = new JLabel ("Save As..."); > label.setDisplayedMnemonic ('A'); > > The 'A' in 'As' should be underlined (that's the intention at least), but the 'a' in 'Save' is what gets underlined. > > The problem (aside from the lack of an API to specify exactly what should be underlined) is in the javax.swing.plaf.basic.BasicGraphicUtils drawString method which underlines the first character (upper OR lowercase) that matches the mnemonic character. > > Fix: > A new property "displayedMnemonicIndex" is introduced > in classes AbstractButton and JLabel. It tells which > character to underline. So for example to underline > the capital 'A' in 'Save As', one should call: > setMnemonic('A'); > setDisplayedMnemonicIndex(5); > > Testing: > Tested in Mach5 10 times per platform and got all Pass. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8093 From serb at openjdk.java.net Wed Apr 6 05:36:44 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 6 Apr 2022 05:36:44 GMT Subject: RFR: 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill [v2] In-Reply-To: References: Message-ID: On Fri, 1 Apr 2022 15:43:29 GMT, Alexey Ushakov wrote: >> Throwing InvalidPipeException for incompatible surfaces > > Alexey Ushakov has updated the pull request incrementally with one additional commit since the last revision: > > 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill > > Extracted try/catch logic of SurfaceData cast to particular SurfaceData subclass into convenience method SurfaceData.convertTo(). Applied the method to XRTextRenderer.drawGlyphList() and XRMaskFill.MaskFill(). Refactored try/catch blocks handling similar cases. Looks fine, I suggest checking the fix via mach5. @aghaisas please take a look. ------------- Marked as reviewed by serb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8015 From darcy at openjdk.java.net Wed Apr 6 05:45:40 2022 From: darcy at openjdk.java.net (Joe Darcy) Date: Wed, 6 Apr 2022 05:45:40 GMT Subject: RFR: 8283706: Add final or sealed modifier to appropriate javax.swing API classes In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 05:25:43 GMT, Sergey Bylokhov wrote: >> Update Swing classes to use JEP 409 sealed and non-sealed modifiers and add the final modifier where appropriate. >> >> jtreg tests and JCK API tests pass >> >> CSR for review here : https://bugs.openjdk.java.net/browse/JDK-8284214 > > src/java.desktop/share/classes/javax/swing/GroupLayout.java line 2461: > >> 2459: */ >> 2460: public sealed class ParallelGroup extends Group >> 2461: permits BaselineGroup { > > The BaselineGroup class is private so not part of the public API, is it fine to mention the non-public class in the permits block for the public class? Yes, that is fine; javadoc will filter out displaying non-public classes in a permits clause. ------------- PR: https://git.openjdk.java.net/jdk/pull/8082 From mvs at openjdk.java.net Wed Apr 6 06:31:38 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Wed, 6 Apr 2022 06:31:38 GMT Subject: RFR: 8284294: Create an automated regression test for RFE 4138746 [v2] In-Reply-To: References: Message-ID: > Create an automated regression test for [JDK-4138746](https://bugs.openjdk.java.net/browse/JDK-4138746) > > Issue: > In the following example (and similarly with other components) you cannot specify the correct character to underline: > > JLabel label = new JLabel ("Save As..."); > label.setDisplayedMnemonic ('A'); > > The 'A' in 'As' should be underlined (that's the intention at least), but the 'a' in 'Save' is what gets underlined. > > The problem (aside from the lack of an API to specify exactly what should be underlined) is in the javax.swing.plaf.basic.BasicGraphicUtils drawString method which underlines the first character (upper OR lowercase) that matches the mnemonic character. > > Fix: > A new property "displayedMnemonicIndex" is introduced > in classes AbstractButton and JLabel. It tells which > character to underline. So for example to underline > the capital 'A' in 'Save As', one should call: > setMnemonic('A'); > setDisplayedMnemonicIndex(5); > > Testing: > Tested in Mach5 10 times per platform and got all Pass. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Fixed one wrong conditional check: removed ! operator from 'if (focusGainedLatch.await(3, TimeUnit.SECONDS))' ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8093/files - new: https://git.openjdk.java.net/jdk/pull/8093/files/9c951603..40bbfaac Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8093&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8093&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8093.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8093/head:pull/8093 PR: https://git.openjdk.java.net/jdk/pull/8093 From smandalika at openjdk.java.net Wed Apr 6 07:02:25 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 6 Apr 2022 07:02:25 GMT Subject: RFR: 8282857: Create a regression test for JDK-4702690 [v3] In-Reply-To: References: Message-ID: <1MCuz4h2_IMc9oR2q-DP_O5xoiS_7j1cQ8DTHaQxDlU=.a5b07c51-39fa-4c39-aa2d-74643c22cf0f@github.com> > Create a regression test for [JDK-4702690](https://bugs.openjdk.java.net/browse/JDK-4702690) > > In many cases in Swing it is possible to easily programatically determine that a JScrollBar (or two) is scrolling some JPanel (the cannonical case is a JScrollPane). > In these cases, when accessibility support is instantiated (e.g. the AccessibleJScrollBar is created), a Controller_For and Controled_By relation should be instantiated between the AccessibleJScrollBar and the AccessibleJPanel that the JScrollBar and JPanel are associated with. > > This allows various assistive technologies, especially voice-recognition technologies, to better interact with scrolling items. > > The test put up validates that the target object for these properties(CONTROLLED_BY, CONTROLLED_FOR) are set appropriately for JScrollPane and JScrollBar. > This review is for migrating tests from a closed test suite to open. Srinivas Mandalika has updated the pull request incrementally with two additional commits since the last revision: - Review Comments Fixed: Swing Components on EDT, 80 chars lines - Review Comments Fixed: Swing Components on EDT, 80 chars lines ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7753/files - new: https://git.openjdk.java.net/jdk/pull/7753/files/f712f33f..01f8c430 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7753&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7753&range=01-02 Stats: 30 lines in 1 file changed: 12 ins; 1 del; 17 mod Patch: https://git.openjdk.java.net/jdk/pull/7753.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7753/head:pull/7753 PR: https://git.openjdk.java.net/jdk/pull/7753 From mvs at openjdk.java.net Wed Apr 6 07:25:42 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Wed, 6 Apr 2022 07:25:42 GMT Subject: Integrated: 8284294: Create an automated regression test for RFE 4138746 In-Reply-To: References: Message-ID: On Mon, 4 Apr 2022 14:05:14 GMT, Manukumar V S wrote: > Create an automated regression test for [JDK-4138746](https://bugs.openjdk.java.net/browse/JDK-4138746) > > Issue: > In the following example (and similarly with other components) you cannot specify the correct character to underline: > > JLabel label = new JLabel ("Save As..."); > label.setDisplayedMnemonic ('A'); > > The 'A' in 'As' should be underlined (that's the intention at least), but the 'a' in 'Save' is what gets underlined. > > The problem (aside from the lack of an API to specify exactly what should be underlined) is in the javax.swing.plaf.basic.BasicGraphicUtils drawString method which underlines the first character (upper OR lowercase) that matches the mnemonic character. > > Fix: > A new property "displayedMnemonicIndex" is introduced > in classes AbstractButton and JLabel. It tells which > character to underline. So for example to underline > the capital 'A' in 'Save As', one should call: > setMnemonic('A'); > setDisplayedMnemonicIndex(5); > > Testing: > Tested in Mach5 10 times per platform and got all Pass. This pull request has now been integrated. Changeset: 0a67d686 Author: Manukumar V S Committer: Abdul Kolarkunnu URL: https://git.openjdk.java.net/jdk/commit/0a67d686709000581e29440ef13324d1f2eba9ff Stats: 233 lines in 1 file changed: 233 ins; 0 del; 0 mod 8284294: Create an automated regression test for RFE 4138746 Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8093 From ant at openjdk.java.net Wed Apr 6 07:29:40 2022 From: ant at openjdk.java.net (Anton Tarasov) Date: Wed, 6 Apr 2022 07:29:40 GMT Subject: RFR: 8284014 Menu items with submenus in JPopupMEnu are not spoken on macOS [v2] In-Reply-To: References: Message-ID: <7ZcLAku-fVfZ8j7R5HWpK-WJkcY2GsiSwDmWhmxxsYM=.1f94e8b7-7166-4073-ba21-17ed89a415f1@github.com> On Thu, 31 Mar 2022 10:19:26 GMT, Artem Semenov wrote: >> If the JPopupMenu has menu items with submenus, those items are not spoken by VoiceOver. >> >> @forantar @azuev-java please review. > > Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: > > Is the check for the AccessibleRole.POPUP_MENU is needed here? How it will work if the Menu is added to some container other than POPUP_MENU? Marked as reviewed by ant (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8043 From asemenov at openjdk.java.net Wed Apr 6 09:33:48 2022 From: asemenov at openjdk.java.net (Artem Semenov) Date: Wed, 6 Apr 2022 09:33:48 GMT Subject: RFR: 8284014 Menu items with submenus in JPopupMEnu are not spoken on macOS [v2] In-Reply-To: References: Message-ID: On Mon, 4 Apr 2022 18:13:28 GMT, Phil Race wrote: >> Artem Semenov has updated the pull request incrementally with one additional commit since the last revision: >> >> Is the check for the AccessibleRole.POPUP_MENU is needed here? How it will work if the Menu is added to some container other than POPUP_MENU? > > src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.m line 129: > >> 127: * Here we should keep all the mapping between the accessibility roles and implementing classes >> 128: */ >> 129: rolesMap = [[NSMutableDictionary alloc] initWithCapacity:51]; > > I suppose 51 just seemed like a strange number ? I removed one position from this dictionary, and therefore reduced the capacity. ------------- PR: https://git.openjdk.java.net/jdk/pull/8043 From asemenov at openjdk.java.net Wed Apr 6 09:33:50 2022 From: asemenov at openjdk.java.net (Artem Semenov) Date: Wed, 6 Apr 2022 09:33:50 GMT Subject: Integrated: 8284014 Menu items with submenus in JPopupMEnu are not spoken on macOS In-Reply-To: References: Message-ID: <7WzlM6iCIHltO_QzT2w0o8KbSazPrca3pRLXwbMVEOE=.3c18bfb1-e61d-4541-b121-695f1d61d259@github.com> On Wed, 30 Mar 2022 15:24:17 GMT, Artem Semenov wrote: > If the JPopupMenu has menu items with submenus, those items are not spoken by VoiceOver. > > @forantar @azuev-java please review. This pull request has now been integrated. Changeset: e18414a3 Author: Artem Semenov URL: https://git.openjdk.java.net/jdk/commit/e18414a322f0814c120bcdd415ebd7bd34949633 Stats: 111 lines in 3 files changed: 106 ins; 2 del; 3 mod 8284014: Menu items with submenus in JPopupMEnu are not spoken on macOS Reviewed-by: prr, serb, ant ------------- PR: https://git.openjdk.java.net/jdk/pull/8043 From duke at openjdk.java.net Wed Apr 6 09:52:47 2022 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 6 Apr 2022 09:52:47 GMT Subject: RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v12] In-Reply-To: References: Message-ID: <0D26zlffXAuaF09r9vyh1idn2Afg7M-CT7zUN1PQCSs=.862da463-2a6b-4176-a5ab-43bd55531567@github.com> > Removed the println() line from the Interrupted catch block. Since waitForID() Interrupt indicates completion of Image Loading, println as Interrupt handling was not required. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on Reiview comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7754/files - new: https://git.openjdk.java.net/jdk/pull/7754/files/f366bc9f..0c37e6a7 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7754&range=11 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7754&range=10-11 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/7754.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7754/head:pull/7754 PR: https://git.openjdk.java.net/jdk/pull/7754 From aghaisas at openjdk.java.net Wed Apr 6 09:57:10 2022 From: aghaisas at openjdk.java.net (Ajit Ghaisas) Date: Wed, 6 Apr 2022 09:57:10 GMT Subject: RFR: 8284378: Make Metal the default Java 2D rendering pipeline for macOS Message-ID: This PR makes Metal rendering pipeline as the default Java 2D rendering pipeline for macOS. Please refer "JBS Description" for more details. ------------- Commit messages: - Make Metal the default 2D pipeline Changes: https://git.openjdk.java.net/jdk/pull/8121/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8121&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284378 Stats: 5 lines in 1 file changed: 0 ins; 1 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/8121.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8121/head:pull/8121 PR: https://git.openjdk.java.net/jdk/pull/8121 From duke at openjdk.java.net Wed Apr 6 10:09:01 2022 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 6 Apr 2022 10:09:01 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document Message-ID: getText function returned extra endOfLine when appended. The reason was in `EditorEditorKit` class, `write(Writer out, Document doc, int pos, int len)` method, where translation happens from buffer to Out(Writer Object) if endOfLine is other than '\n' ( which is '\r\n' in windows). In order to write each line till End of line, the string till '\n' is written including '\r' and again endOfLine is written which results in extra Carriage Return. To solve this issue, a Condition is added which checks if previous character to '\n' is '\r', if true then whole string except Carriage Return ('\r') is written, else whole string till before '\n' is written. ------------- Commit messages: - Fix for the Bug - Checking Condition added for \r - Merge branch 'master' of github.com:TejeshR13/jdk - Merge branch 'openjdk:master' into master - Merge remote-tracking branch 'upstream/master' - Merge remote-tracking branch 'upstream/master' - Merge branch 'master' of github.com:TejeshR13/jdk - Initial Commit. Changes: https://git.openjdk.java.net/jdk/pull/8122/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8122&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8180276 Stats: 7 lines in 1 file changed: 6 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8122.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8122/head:pull/8122 PR: https://git.openjdk.java.net/jdk/pull/8122 From aivanov at openjdk.java.net Wed Apr 6 10:12:41 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 6 Apr 2022 10:12:41 GMT Subject: RFR: 8283706: Add final or sealed modifier to appropriate javax.swing API classes In-Reply-To: References: Message-ID: On Sat, 2 Apr 2022 23:21:03 GMT, Phil Race wrote: > Update Swing classes to use JEP 409 sealed and non-sealed modifiers and add the final modifier where appropriate. > > jtreg tests and JCK API tests pass > > CSR for review here : https://bugs.openjdk.java.net/browse/JDK-8284214 Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8082 From aivanov at openjdk.java.net Wed Apr 6 10:15:43 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 6 Apr 2022 10:15:43 GMT Subject: RFR: 8283704: Add sealed modifier to java.awt.MultipleGradientPaint In-Reply-To: References: Message-ID: On Fri, 1 Apr 2022 19:18:39 GMT, Phil Race wrote: > Along the same lines as other recent additions of the sealed modifier but this one is quite simple. > Only MultiGradientPaint is touched. The two extant sub-classes it permits are already final > > CSR for review : https://bugs.openjdk.java.net/browse/JDK-8284188 > > jtreg and JCK API tests pass Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8079 From psadhukhan at openjdk.java.net Wed Apr 6 10:20:08 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 6 Apr 2022 10:20:08 GMT Subject: RFR: 8282716: [macos] Enable javax/swing/JScrollPane/TestMouseWheelScroll.java on macos Message-ID: <-tuJ1M1iwo7tJ_hOHvrEylZmUdS3DPOSbySVFnJGrBI=.212c7ea6-e12a-48af-a4fa-ee3a586e4a38@github.com> The test was failing on macos and was excluded in macos because the viewposition was not changed after mouse wheel scroll. Seems like mouse wheel scroll direction is opposite in macos compared to windows etc so if we try to down-wheel scroll in macos when view position is at center of viewport (say element 3 is selected out of visible 7 elements), it cannot change viewposition as it cannot "scroll up" (since we are already at topmost viewport) whereas in windows, when we do down-wheel scroll in mouse wheel, it "scroll down" the viewport so viewposition is changed. Fix is to use opposite scrolling motion in macos to check mouse wheel scroll is happening, which is what the testcase is meant for. CI testing of this test on all platform is ok. ------------- Commit messages: - 8282716: [macos] Enable javax/swing/JScrollPane/TestMouseWheelScroll.java on macos Changes: https://git.openjdk.java.net/jdk/pull/8123/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8123&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8282716 Stats: 6 lines in 1 file changed: 4 ins; 1 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8123.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8123/head:pull/8123 PR: https://git.openjdk.java.net/jdk/pull/8123 From aivanov at openjdk.java.net Wed Apr 6 10:22:40 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 6 Apr 2022 10:22:40 GMT Subject: RFR: 8283387: [macos] a11y : Screen magnifier does not show selected Tab In-Reply-To: References: Message-ID: On Wed, 30 Mar 2022 22:21:51 GMT, Alexander Zuev wrote: > It is impossible right now to manipulate state of the accessible children of the JTabbedPane via their AccessibleValue and because of that some of the assistive technologies are unable to interact with the parts of the JTabbedPane - namely, buttons, representing the JTabbedPane panel navigation buttons. Magnified is just one of the examples that can be engaging without connecting the hardware such as eye movement tracker. > > By adding AccessibleValue to the JTabbedPane children containers we eliminate is problem. And since this inner class is private the standard review should be sufficient, no CSR is required. test/jdk/javax/accessibility/JTabbedPane/AccessibleTabbedPaneTest.java line 39: > 37: public class AccessibleTabbedPaneTest { > 38: public static void main(String[] args) { > 39: JTabbedPane pane = new JTabbedPane(); Shouldn't this be run on EDT? ------------- PR: https://git.openjdk.java.net/jdk/pull/8049 From duke at openjdk.java.net Wed Apr 6 10:27:12 2022 From: duke at openjdk.java.net (Tejesh R) Date: Wed, 6 Apr 2022 10:27:12 GMT Subject: RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v13] In-Reply-To: References: Message-ID: > Removed the println() line from the Interrupted catch block. Since waitForID() Interrupt indicates completion of Image Loading, println as Interrupt handling was not required. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on Reiview comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7754/files - new: https://git.openjdk.java.net/jdk/pull/7754/files/0c37e6a7..2b5f5927 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7754&range=12 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7754&range=11-12 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/7754.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7754/head:pull/7754 PR: https://git.openjdk.java.net/jdk/pull/7754 From aivanov at openjdk.java.net Wed Apr 6 10:27:13 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 6 Apr 2022 10:27:13 GMT Subject: RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v13] In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 10:24:15 GMT, Tejesh R wrote: >> Removed the println() line from the Interrupted catch block. Since waitForID() Interrupt indicates completion of Image Loading, println as Interrupt handling was not required. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on Reiview comments Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7754 From aivanov at openjdk.java.net Wed Apr 6 10:27:15 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 6 Apr 2022 10:27:15 GMT Subject: RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v12] In-Reply-To: <0D26zlffXAuaF09r9vyh1idn2Afg7M-CT7zUN1PQCSs=.862da463-2a6b-4176-a5ab-43bd55531567@github.com> References: <0D26zlffXAuaF09r9vyh1idn2Afg7M-CT7zUN1PQCSs=.862da463-2a6b-4176-a5ab-43bd55531567@github.com> Message-ID: On Wed, 6 Apr 2022 09:52:47 GMT, Tejesh R wrote: >> Removed the println() line from the Interrupted catch block. Since waitForID() Interrupt indicates completion of Image Loading, println as Interrupt handling was not required. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on Reiview comments test/jdk/javax/swing/ImageIcon/LoadInterruptTest.java line 37: > 35: * @bug 8236987 > 36: * @summary Verifies ImageIcon constructor produces no output when the > 37: * thread is interrupted Suggestion: * @summary Verifies ImageIcon constructor produces no output when the * thread is interrupted I believe this improves the readability of the summary and it's usually formatted like this. ------------- PR: https://git.openjdk.java.net/jdk/pull/7754 From aivanov at openjdk.java.net Wed Apr 6 10:30:42 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 6 Apr 2022 10:30:42 GMT Subject: Integrated: 8284288: Use SVG images for FocusSpec.html and Modality.html In-Reply-To: References: Message-ID: On Mon, 4 Apr 2022 11:17:16 GMT, Alexey Ivanov wrote: > Both `FocusSpec.html` and `Modality.html` use GIF images for diagrams. The images look jagged, especially on High DPI screens which are common now. The images in `Modality.html` use dithered colours which don't look sharp even on regular displays. > > All the modern browsers support SVG which is a vector format and therefore it always looks sharp. > > You can view how the files look after being processed by javadoc: > > - **side-by-side** allows comparing the current and the new images: > - [FocusSpec.html](http://cr.openjdk.java.net/~aivanov/8284288/side-by-side/api/java.desktop/java/awt/doc-files/FocusSpec.html) > - [Modality.html](http://cr.openjdk.java.net/~aivanov/8284288/side-by-side/api/java.desktop/java/awt/doc-files/Modality.html) > - **clean** is the final version: > - [FocusSpec.html](http://cr.openjdk.java.net/~aivanov/8284288/clean/api/java.desktop/java/awt/doc-files/FocusSpec.html) > - [Modality.html](http://cr.openjdk.java.net/~aivanov/8284288/clean/api/java.desktop/java/awt/doc-files/Modality.html) This pull request has now been integrated. Changeset: bbe894fc Author: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/bbe894fc815aae9f505b988faaef6b60c8cb8d11 Stats: 946 lines in 15 files changed: 935 ins; 0 del; 11 mod 8284288: Use SVG images for FocusSpec.html and Modality.html Reviewed-by: prr, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8091 From aivanov at openjdk.java.net Wed Apr 6 10:42:42 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 6 Apr 2022 10:42:42 GMT Subject: RFR: 8283712 : Create a manual test framework class [v5] In-Reply-To: References: Message-ID: On Tue, 5 Apr 2022 20:16:28 GMT, lawrence.andrews wrote: >> We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following >> 1) Frame which contains test instruction . >> 2) Pass & Fail button so that user can mark the test pass or fail >> 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. >> 4) Disposing of all the frames. >> >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Fixed review comments test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 85: > 83: frame.dispose(); > 84: } > 85: }); I just thought whether it's feasible to keep a list of frames / windows to be disposed of inside the `PassFailJFrame` class. It disposes of its instruction frame when the wait is over, it can handle disposing of other frames too. If I remember correctly, the first version disposed of of all windows. If we make it an explicit list, it shouldn't cause issues. ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From alexey.ivanov at oracle.com Wed Apr 6 11:11:11 2022 From: alexey.ivanov at oracle.com (Aleksei Ivanov) Date: Wed, 6 Apr 2022 12:11:11 +0100 Subject: RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v7] In-Reply-To: References: Message-ID: <4be3ad97-0d6e-357a-ee17-49cd60ae179b@oracle.com> Hi Eirik, Thank you for bringing this up. On 30/03/2022 20:22, Eirik Bakke wrote: >> In fact, Windows 10 renders titled border flat: one grey line instead of etched border that was used in previous versions. Shall we update Swing's Windows L&F? Here my point was that the rendering of GroupBox control in Windows has changed. Windows used to use an etched border that TitledBorder in Swing continues to use. Yet Windows 8.1 and 10 use a single grey line for GroupBox control which differs from what Swing uses. As such Windows Look and Feel in Swing does not represent native Windows rendering for the same kind of thing. > In the Windows L&F, the following borders all display badly on 150% HiDPI scaling, and would benefit from a fix: > > TextField.border, PasswordField.border, FormattedTextField.border, ScrollPane.border, PopupMenu.border, Menu.border, ToolTip.border, as well as the borders for JSpinner and JComboBox. You're right all the borders are affected. I hope we'll think out a common approach to rendering borders which ensures all the edges are of the same thickness. Once it's done here for the EtchedBorder, painting other borders should be updated as well. > I once did some work to fix these 150% HiDPI scaling border issues on the NetBeans IDE; see https://github.com/apache/netbeans/pull/1777 and https://github.com/apache/netbeans/pull/2965 and https://github.com/apache/netbeans/blob/master/platform/o.n.swing.plaf/src/org/netbeans/swing/plaf/windows8/Windows8LFCustoms.java I'll take a closer look at your approach. It could be useful. > The issue https://bugs.openjdk.java.net/browse/JDK-8241561 is also similar. > > Just passing by... thanks for your work on maintaining Swing! > > -- Eirik Bakke > (Committer on the Apache NetBeans project.) -- Regards, Alexey From aivanov at openjdk.java.net Wed Apr 6 11:32:39 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 6 Apr 2022 11:32:39 GMT Subject: RFR: 8282526: Default icon is not painted properly In-Reply-To: References: Message-ID: On Thu, 17 Mar 2022 21:55:05 GMT, Phil Race wrote: >> Detect the situation where we do need to perform interpolation during ImageIcon >> painting and set a hint to the rendering to perform bicubic approximation so >> image details are preserved during transition. > > src/java.desktop/share/classes/javax/swing/ImageIcon.java line 463: > >> 461: if (hintChanged) { >> 462: ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_INTERPOLATION, >> 463: oldHint == null ? RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR : oldHint); > > So this is one of only two hints which do not have an "_DEFAULT" value. I don't know why it doesn't. > > Not authoritative but the only place where we currently set this hint and then restore it is here > share/classes/javax/swing/plaf/nimbus/AbstractRegionPainter.java > Object oldScaleingHints = g.getRenderingHint(RenderingHints.KEY_INTERPOLATION); > g.setRenderingHint(RenderingHints.KEY_INTERPOLATION,RenderingHints.VALUE_INTERPOLATION_BILINEAR); > ImageScalingHelper.paint(g, 0, 0, w, h, img, insets, dstInsets, > ImageScalingHelper.PaintType.PAINT9_STRETCH, ImageScalingHelper.PAINT_ALL); > g.setRenderingHint(RenderingHints.KEY_INTERPOLATION, > oldScaleingHints!=null?oldScaleingHints:RenderingHints.VALUE_INTERPOLATION_NEAREST_NEIGHBOR); > > if the get() returns null and you aren't happy with that then creating a new Graphics is the only alternative I see. > > > But it seems to me there are bigger problems to resolve first > >> Image variant = ((MultiResolutionImage) image).getResolutionVariant(this.width, this.height); > > So getResolutionVariant wants image pixels, but I expect ImageIcon is sized in user-space, isn't it ? > > Don't you need to apply the scale from the Graphics ? > > Next, if we have an exact match for what we want, why do we need the hint ? > > Next, as Sergey mentions, BICUBIC is expensive. > Probably how that should be used is to redraw the image into a cached image that > is dw= iw*sx and dh= iwh*sy where sx and sy are the graphics scale > and that is the graphics on which you apply the hint and the graphics is disposed and the restore issue vanishes > > then you can just blit that resulting image so long as the cached dw x dy isn't changed. > > The MR is still useful for finding the best starting image If I understand correctly, the problem occurs only when the image is scaled down. The test case renders 32?32 icon into 16?16 image. So is the usage of bicubic interpolation need only when the image is scaled down? ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From djelinski at openjdk.java.net Wed Apr 6 12:14:11 2022 From: djelinski at openjdk.java.net (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Wed, 6 Apr 2022 12:14:11 GMT Subject: RFR: 8284444: Sting typo Message-ID: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> This patch adds missing `r` in `string`s ------------- Commit messages: - Fix sting typo Changes: https://git.openjdk.java.net/jdk/pull/8125/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8125&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284444 Stats: 25 lines in 8 files changed: 0 ins; 0 del; 25 mod Patch: https://git.openjdk.java.net/jdk/pull/8125.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8125/head:pull/8125 PR: https://git.openjdk.java.net/jdk/pull/8125 From kcr at openjdk.java.net Wed Apr 6 12:26:40 2022 From: kcr at openjdk.java.net (Kevin Rushforth) Date: Wed, 6 Apr 2022 12:26:40 GMT Subject: RFR: 8284444: Sting typo In-Reply-To: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> References: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> Message-ID: On Wed, 6 Apr 2022 12:07:30 GMT, Daniel Jeli?ski wrote: > This patch adds missing `r` in `string`s This PR cuts across many areas, so will need multiple reviewers. Regarding the LCMS file, we typically don't make these kind of changes in third-party code, since it will cause our code to diverge from the upstream code, which can lead to merge conflicts down the road. @prrace will need to approve this or else you will need to revert that file. ------------- PR: https://git.openjdk.java.net/jdk/pull/8125 From zgu at openjdk.java.net Wed Apr 6 12:54:42 2022 From: zgu at openjdk.java.net (Zhengyu Gu) Date: Wed, 6 Apr 2022 12:54:42 GMT Subject: RFR: 8284023: java.sun.awt.X11GraphicsDevice.getDoubleBufferVisuals() leaks XdbeScreenVisualInfo [v2] In-Reply-To: <4MuA8cH3vrM7CU9fYFzouNf1Wr34zpnSIUNMKL-d2IM=.758d7d53-9bd9-4343-8451-03b3f278ad50@github.com> References: <6vPxcf3BllwA1Di0WXKrNF9TFKjPnLnfIAuSO8PyV3s=.34ac5f51-a610-4809-9a1e-f822d955340b@github.com> <4MuA8cH3vrM7CU9fYFzouNf1Wr34zpnSIUNMKL-d2IM=.758d7d53-9bd9-4343-8451-03b3f278ad50@github.com> Message-ID: On Wed, 6 Apr 2022 05:20:34 GMT, Sergey Bylokhov wrote: >> Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision: >> >> @mrserb's comment > > Marked as reviewed by serb (Reviewer). Thanks, @mrserb ------------- PR: https://git.openjdk.java.net/jdk/pull/8047 From zgu at openjdk.java.net Wed Apr 6 12:54:43 2022 From: zgu at openjdk.java.net (Zhengyu Gu) Date: Wed, 6 Apr 2022 12:54:43 GMT Subject: Integrated: 8284023: java.sun.awt.X11GraphicsDevice.getDoubleBufferVisuals() leaks XdbeScreenVisualInfo In-Reply-To: <6vPxcf3BllwA1Di0WXKrNF9TFKjPnLnfIAuSO8PyV3s=.34ac5f51-a610-4809-9a1e-f822d955340b@github.com> References: <6vPxcf3BllwA1Di0WXKrNF9TFKjPnLnfIAuSO8PyV3s=.34ac5f51-a610-4809-9a1e-f822d955340b@github.com> Message-ID: On Wed, 30 Mar 2022 19:13:24 GMT, Zhengyu Gu wrote: > Please review this small patch that fixes memory leak of `XdbeScreenVisualInfo` obtained from `XdbeGetVisualInfo()` method call. > > Test: > - [x] jdk_awt This pull request has now been integrated. Changeset: ec205f68 Author: Zhengyu Gu URL: https://git.openjdk.java.net/jdk/commit/ec205f68a883cef6b98f26a06baf675f7da26928 Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod 8284023: java.sun.awt.X11GraphicsDevice.getDoubleBufferVisuals() leaks XdbeScreenVisualInfo Reviewed-by: prr, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8047 From kcr at openjdk.java.net Wed Apr 6 13:38:40 2022 From: kcr at openjdk.java.net (Kevin Rushforth) Date: Wed, 6 Apr 2022 13:38:40 GMT Subject: RFR: 8284378: Make Metal the default Java 2D rendering pipeline for macOS In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 09:48:13 GMT, Ajit Ghaisas wrote: > This PR makes Metal rendering pipeline as the default Java 2D rendering pipeline for macOS. > > Please refer "JBS Description" for more details. Marked as reviewed by kcr (Author). ------------- PR: https://git.openjdk.java.net/jdk/pull/8121 From aivanov at openjdk.java.net Wed Apr 6 13:42:41 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 6 Apr 2022 13:42:41 GMT Subject: RFR: 8284444: Sting typo In-Reply-To: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> References: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> Message-ID: On Wed, 6 Apr 2022 12:07:30 GMT, Daniel Jeli?ski wrote: > This patch adds missing `r` in `string`s src/java.desktop/share/native/liblcms/cmstypes.c line 3668: > 3666: // Auxiliary, read an string specified as count + string > 3667: static > 3668: cmsBool ReadCountAndString(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsMLU* mlu, cmsUInt32Number* SizeOfTag, const char* Section) As @kevinrushforth mentioned, we usually don't modify the source from external libraries. You should report and fix the problem upstream. src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources.properties line 63: > 61: message.creating-association-with-null-extension=Creating association with null extension. > 62: message.wrong-tool-version=Detected [{0}] version {1} but version {2} is required. > 63: message.version-string-too-many-components=Version string may have up to 3 components - major.minor.build . I wonder whether the space before the period is required at the end of the sentence. Perhaps, it's to separate a property name from the end of the sentence. ------------- PR: https://git.openjdk.java.net/jdk/pull/8125 From djelinski at openjdk.java.net Wed Apr 6 14:08:39 2022 From: djelinski at openjdk.java.net (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Wed, 6 Apr 2022 14:08:39 GMT Subject: RFR: 8284444: Sting typo In-Reply-To: References: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> Message-ID: On Wed, 6 Apr 2022 13:38:03 GMT, Alexey Ivanov wrote: >> This patch adds missing `r` in `string`s > > src/java.desktop/share/native/liblcms/cmstypes.c line 3668: > >> 3666: // Auxiliary, read an string specified as count + string >> 3667: static >> 3668: cmsBool ReadCountAndString(struct _cms_typehandler_struct* self, cmsIOHANDLER* io, cmsMLU* mlu, cmsUInt32Number* SizeOfTag, const char* Section) > > As @kevinrushforth mentioned, we usually don't modify the source from external libraries. You should report and fix the problem upstream. Filed https://github.com/mm2/Little-CMS/pull/313 for this ------------- PR: https://git.openjdk.java.net/jdk/pull/8125 From djelinski at openjdk.java.net Wed Apr 6 14:12:17 2022 From: djelinski at openjdk.java.net (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Wed, 6 Apr 2022 14:12:17 GMT Subject: RFR: 8284444: Sting typo [v2] In-Reply-To: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> References: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> Message-ID: > This patch adds missing `r` in `string`s Daniel Jeli?ski has updated the pull request incrementally with one additional commit since the last revision: Revert liblcms changes ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8125/files - new: https://git.openjdk.java.net/jdk/pull/8125/files/755c7084..68ce6ebd Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8125&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8125&range=00-01 Stats: 12 lines in 1 file changed: 0 ins; 0 del; 12 mod Patch: https://git.openjdk.java.net/jdk/pull/8125.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8125/head:pull/8125 PR: https://git.openjdk.java.net/jdk/pull/8125 From djelinski at openjdk.java.net Wed Apr 6 14:15:36 2022 From: djelinski at openjdk.java.net (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Wed, 6 Apr 2022 14:15:36 GMT Subject: RFR: 8284444: Sting typo [v2] In-Reply-To: References: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> Message-ID: On Wed, 6 Apr 2022 13:36:05 GMT, Alexey Ivanov wrote: >> Daniel Jeli?ski has updated the pull request incrementally with one additional commit since the last revision: >> >> Revert liblcms changes > > src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources.properties line 63: > >> 61: message.creating-association-with-null-extension=Creating association with null extension. >> 62: message.wrong-tool-version=Detected [{0}] version {1} but version {2} is required. >> 63: message.version-string-too-many-components=Version string may have up to 3 components - major.minor.build . > > I wonder whether the space before the period is required at the end of the sentence. Perhaps, it's to separate a property name from the end of the sentence. right; without the space the period would appear to be part of the version pattern. ------------- PR: https://git.openjdk.java.net/jdk/pull/8125 From avu at openjdk.java.net Wed Apr 6 14:48:39 2022 From: avu at openjdk.java.net (Alexey Ushakov) Date: Wed, 6 Apr 2022 14:48:39 GMT Subject: RFR: 8284378: Make Metal the default Java 2D rendering pipeline for macOS In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 09:48:13 GMT, Ajit Ghaisas wrote: > This PR makes Metal rendering pipeline as the default Java 2D rendering pipeline for macOS. > > Please refer "JBS Description" for more details. Reviewed (committer) Marked as reviewed by avu (Committer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8121 From naoto at openjdk.java.net Wed Apr 6 15:52:37 2022 From: naoto at openjdk.java.net (Naoto Sato) Date: Wed, 6 Apr 2022 15:52:37 GMT Subject: RFR: 8284444: Sting typo [v2] In-Reply-To: References: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> Message-ID: On Wed, 6 Apr 2022 14:12:17 GMT, Daniel Jeli?ski wrote: >> This patch adds missing `r` in `string`s > > Daniel Jeli?ski has updated the pull request incrementally with one additional commit since the last revision: > > Revert liblcms changes src/java.base/share/classes/jdk/internal/icu/text/StringPrep.java line 63: > 61: * RFC 3454. > 62: * StringPrep prepares Unicode strings for use in network protocols. > 63: * Profiles of StringPrep are set of rules and data according to which the These also come from the upstream ICU4J project and should be corrected there. https://github.com/unicode-org/icu/blob/4833cc89b2fae2e8863b46bf1dc785964847e882/icu4j/main/classes/core/src/com/ibm/icu/text/StringPrep.java#L27 ------------- PR: https://git.openjdk.java.net/jdk/pull/8125 From djelinski at openjdk.java.net Wed Apr 6 16:47:17 2022 From: djelinski at openjdk.java.net (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Wed, 6 Apr 2022 16:47:17 GMT Subject: RFR: 8284444: Sting typo [v3] In-Reply-To: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> References: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> Message-ID: > This patch adds missing `r` in `string`s Daniel Jeli?ski has updated the pull request incrementally with two additional commits since the last revision: - revert xalan changes - revert icu changes ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8125/files - new: https://git.openjdk.java.net/jdk/pull/8125/files/68ce6ebd..1ec0314e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8125&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8125&range=01-02 Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/8125.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8125/head:pull/8125 PR: https://git.openjdk.java.net/jdk/pull/8125 From djelinski at openjdk.java.net Wed Apr 6 16:51:43 2022 From: djelinski at openjdk.java.net (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Wed, 6 Apr 2022 16:51:43 GMT Subject: RFR: 8284444: Sting typo [v2] In-Reply-To: References: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> Message-ID: On Wed, 6 Apr 2022 15:49:06 GMT, Naoto Sato wrote: >> Daniel Jeli?ski has updated the pull request incrementally with one additional commit since the last revision: >> >> Revert liblcms changes > > src/java.base/share/classes/jdk/internal/icu/text/StringPrep.java line 63: > >> 61: * RFC 3454. >> 62: * StringPrep prepares Unicode strings for use in network protocols. >> 63: * Profiles of StringPrep are set of rules and data according to which the > > These also come from the upstream ICU4J project and should be corrected there. > https://github.com/unicode-org/icu/blob/4833cc89b2fae2e8863b46bf1dc785964847e882/icu4j/main/classes/core/src/com/ibm/icu/text/StringPrep.java#L27 Thanks, reverted. Also reverted Xalan changes. ------------- PR: https://git.openjdk.java.net/jdk/pull/8125 From naoto at openjdk.java.net Wed Apr 6 16:55:35 2022 From: naoto at openjdk.java.net (Naoto Sato) Date: Wed, 6 Apr 2022 16:55:35 GMT Subject: RFR: 8284444: Sting typo [v2] In-Reply-To: References: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> Message-ID: On Wed, 6 Apr 2022 16:48:38 GMT, Daniel Jeli?ski wrote: >> src/java.base/share/classes/jdk/internal/icu/text/StringPrep.java line 63: >> >>> 61: * RFC 3454. >>> 62: * StringPrep prepares Unicode strings for use in network protocols. >>> 63: * Profiles of StringPrep are set of rules and data according to which the >> >> These also come from the upstream ICU4J project and should be corrected there. >> https://github.com/unicode-org/icu/blob/4833cc89b2fae2e8863b46bf1dc785964847e882/icu4j/main/classes/core/src/com/ibm/icu/text/StringPrep.java#L27 > > Thanks, reverted. Also reverted Xalan changes. Good. Thanks for reverting it. ------------- PR: https://git.openjdk.java.net/jdk/pull/8125 From duke at openjdk.java.net Wed Apr 6 17:33:37 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Wed, 6 Apr 2022 17:33:37 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v8] In-Reply-To: References: Message-ID: On Tue, 5 Apr 2022 16:15:48 GMT, Harshitha Onkar wrote: >> Also, I see if we start off with "Graphite" accent color then the focus ring is "Graphite" but then even if we change to any other accent color, the focus ring remains "Graphite" > > @prsadhuk I was able to replicate the above scenario and as mentioned it oddly happens only when we start with Graphite as accent color. Looking into it further. The following type properties where checked for cellFocusRing color - [alternateSelectedControlColor](https://developer.apple.com/documentation/appkit/nscolor/1533135-alternateselectedcontrolcolor) **Issue:** Doesn't follow accent color in macos 10.15 and deprecated property. - [controlAccentColor](https://developer.apple.com/documentation/appkit/nscolor/3000782-controlaccentcolor) **Issue:** Causes build issues due to version compatibility, property supported on only macOS 10.14+ - [accentColor](https://developer.apple.com/documentation/swiftui/color/accentcolor) **Issue:** Property supported on only macOS 10.15+, compatibility and run time issues. - [keyboardfocusindicatorcolor](https://developer.apple.com/documentation/appkit/nscolor/1532031-keyboardfocusindicatorcolor) **Issue:** Works well for most of the scenarios (including on-the-fly changes) and follows the accent color changes except when we start the application with accent color set to Graphite and then change accent color on-the-fly (as mentioned above). The cell focus ring remains gray. The issue seems to be with the system color returned by the type-property "**keyboardfocusindicatorcolor**" under this setting. ------------- PR: https://git.openjdk.java.net/jdk/pull/7768 From naoto at openjdk.java.net Wed Apr 6 17:52:08 2022 From: naoto at openjdk.java.net (Naoto Sato) Date: Wed, 6 Apr 2022 17:52:08 GMT Subject: RFR: 8283698: Refactor Locale constructors used in src/test Message-ID: This is a follow-on task after deprecating the Locale constructors (https://bugs.openjdk.java.net/browse/JDK-8282819). Most of the changes are simple replacements to Locale constructors with `Locale.of()` or Locale constants, such as `Locale.US`. ------------- Commit messages: - 8283698: Refactor Locale constructors used in src/test Changes: https://git.openjdk.java.net/jdk/pull/8130/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8130&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8283698 Stats: 750 lines in 182 files changed: 3 ins; 3 del; 744 mod Patch: https://git.openjdk.java.net/jdk/pull/8130.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8130/head:pull/8130 PR: https://git.openjdk.java.net/jdk/pull/8130 From kcr at openjdk.java.net Wed Apr 6 17:56:40 2022 From: kcr at openjdk.java.net (Kevin Rushforth) Date: Wed, 6 Apr 2022 17:56:40 GMT Subject: RFR: 8284444: Sting typo [v3] In-Reply-To: References: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> Message-ID: On Wed, 6 Apr 2022 16:47:17 GMT, Daniel Jeli?ski wrote: >> This patch adds missing `r` in `string`s > > Daniel Jeli?ski has updated the pull request incrementally with two additional commits since the last revision: > > - revert xalan changes > - revert icu changes The `jpackage` part of the fix looks good. Btw, there are translated files for 3 other languages (German, Japanese, Simplified Chinese), so I double-checked the translation for each, and they already say "string" (I guess whoever translated it just assumed it was meant to be "string" when they took the English phrase). ------------- Marked as reviewed by kcr (Author). PR: https://git.openjdk.java.net/jdk/pull/8125 From kcr at openjdk.java.net Wed Apr 6 17:56:40 2022 From: kcr at openjdk.java.net (Kevin Rushforth) Date: Wed, 6 Apr 2022 17:56:40 GMT Subject: RFR: 8284444: Sting typo [v3] In-Reply-To: References: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> Message-ID: On Wed, 6 Apr 2022 14:12:49 GMT, Daniel Jeli?ski wrote: >> src/jdk.jpackage/windows/classes/jdk/jpackage/internal/resources/WinResources.properties line 63: >> >>> 61: message.creating-association-with-null-extension=Creating association with null extension. >>> 62: message.wrong-tool-version=Detected [{0}] version {1} but version {2} is required. >>> 63: message.version-string-too-many-components=Version string may have up to 3 components - major.minor.build . >> >> I wonder whether the space before the period is required at the end of the sentence. Perhaps, it's to separate a property name from the end of the sentence. > > right; without the space the period would appear to be part of the version pattern. Yes, I believe this is why it was done. ------------- PR: https://git.openjdk.java.net/jdk/pull/8125 From aivanov at openjdk.java.net Wed Apr 6 18:10:40 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 6 Apr 2022 18:10:40 GMT Subject: RFR: 8284444: Sting typo [v3] In-Reply-To: References: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> Message-ID: On Wed, 6 Apr 2022 16:47:17 GMT, Daniel Jeli?ski wrote: >> This patch adds missing `r` in `string`s > > Daniel Jeli?ski has updated the pull request incrementally with two additional commits since the last revision: > > - revert xalan changes > - revert icu changes The changes look fine to me now. Yet there are no changes in the client area any more. So you'll have to get additional approvals. ------------- Marked as reviewed by aivanov (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8125 From kizune at openjdk.java.net Wed Apr 6 18:18:44 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Wed, 6 Apr 2022 18:18:44 GMT Subject: RFR: 8283387: [macos] a11y : Screen magnifier does not show selected Tab In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 10:18:36 GMT, Alexey Ivanov wrote: >> It is impossible right now to manipulate state of the accessible children of the JTabbedPane via their AccessibleValue and because of that some of the assistive technologies are unable to interact with the parts of the JTabbedPane - namely, buttons, representing the JTabbedPane panel navigation buttons. Magnified is just one of the examples that can be engaging without connecting the hardware such as eye movement tracker. >> >> By adding AccessibleValue to the JTabbedPane children containers we eliminate is problem. And since this inner class is private the standard review should be sufficient, no CSR is required. > > test/jdk/javax/accessibility/JTabbedPane/AccessibleTabbedPaneTest.java line 39: > >> 37: public class AccessibleTabbedPaneTest { >> 38: public static void main(String[] args) { >> 39: JTabbedPane pane = new JTabbedPane(); > > Shouldn't this be run on EDT? I do not see why. I am only working with the data model and only set the data model state trough the appropriate calls, they do not rely on any asynchronous processing or external events. ------------- PR: https://git.openjdk.java.net/jdk/pull/8049 From iris at openjdk.java.net Wed Apr 6 19:36:40 2022 From: iris at openjdk.java.net (Iris Clark) Date: Wed, 6 Apr 2022 19:36:40 GMT Subject: RFR: 8283698: Refactor Locale constructors used in src/test In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 17:45:13 GMT, Naoto Sato wrote: > This is a follow-on task after deprecating the Locale constructors (https://bugs.openjdk.java.net/browse/JDK-8282819). Most of the changes are simple replacements to Locale constructors with `Locale.of()` or Locale constants, such as `Locale.US`. Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8130 From serb at openjdk.java.net Wed Apr 6 20:17:40 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 6 Apr 2022 20:17:40 GMT Subject: RFR: 8283706: Add final or sealed modifier to appropriate javax.swing API classes In-Reply-To: References: Message-ID: <6vGKFgUuy-PH7-CGtxJanp1JaqHlPO-JxX0DmjGJlSA=.c9524b6d-d1e7-44b5-b282-6ff8c4fda1e3@github.com> On Wed, 6 Apr 2022 05:42:08 GMT, Joe Darcy wrote: >> src/java.desktop/share/classes/javax/swing/GroupLayout.java line 2461: >> >>> 2459: */ >>> 2460: public sealed class ParallelGroup extends Group >>> 2461: permits BaselineGroup { >> >> The BaselineGroup class is private so not part of the public API, is it fine to mention the non-public class in the permits block for the public class? > > Yes, that is fine; javadoc will filter out displaying non-public classes in a permits clause. Just to double-check, it is fine to have it in the output of the getPermittedSubclasses for the public class as well? ------------- PR: https://git.openjdk.java.net/jdk/pull/8082 From mgronlun at openjdk.java.net Wed Apr 6 20:49:48 2022 From: mgronlun at openjdk.java.net (Markus =?UTF-8?B?R3LDtm5sdW5k?=) Date: Wed, 6 Apr 2022 20:49:48 GMT Subject: RFR: 8284444: Sting typo [v3] In-Reply-To: References: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> Message-ID: On Wed, 6 Apr 2022 16:47:17 GMT, Daniel Jeli?ski wrote: >> This patch adds missing `r` in `string`s > > Daniel Jeli?ski has updated the pull request incrementally with two additional commits since the last revision: > > - revert xalan changes > - revert icu changes JFR changes look fine, thank you. ------------- Marked as reviewed by mgronlun (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8125 From serb at openjdk.java.net Wed Apr 6 21:19:46 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 6 Apr 2022 21:19:46 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 I think the usage of these methods in this class is wrong. Both allow negative values which should not be accepted. ------------- PR: https://git.openjdk.java.net/jdk/pull/3333 From aivanov at openjdk.java.net Wed Apr 6 21:22:47 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 6 Apr 2022 21:22:47 GMT Subject: RFR: 8283387: [macos] a11y : Screen magnifier does not show selected Tab In-Reply-To: References: Message-ID: On Wed, 30 Mar 2022 22:21:51 GMT, Alexander Zuev wrote: > It is impossible right now to manipulate state of the accessible children of the JTabbedPane via their AccessibleValue and because of that some of the assistive technologies are unable to interact with the parts of the JTabbedPane - namely, buttons, representing the JTabbedPane panel navigation buttons. Magnified is just one of the examples that can be engaging without connecting the hardware such as eye movement tracker. > > By adding AccessibleValue to the JTabbedPane children containers we eliminate is problem. And since this inner class is private the standard review should be sufficient, no CSR is required. Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8049 From aivanov at openjdk.java.net Wed Apr 6 21:22:47 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 6 Apr 2022 21:22:47 GMT Subject: RFR: 8283387: [macos] a11y : Screen magnifier does not show selected Tab In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 18:15:09 GMT, Alexander Zuev wrote: >> test/jdk/javax/accessibility/JTabbedPane/AccessibleTabbedPaneTest.java line 39: >> >>> 37: public class AccessibleTabbedPaneTest { >>> 38: public static void main(String[] args) { >>> 39: JTabbedPane pane = new JTabbedPane(); >> >> Shouldn't this be run on EDT? > > I do not see why. I am only working with the data model and only set the data model state trough the appropriate calls, they do not rely on any asynchronous processing or external events. Sounds reasonable. ------------- PR: https://git.openjdk.java.net/jdk/pull/8049 From joehw at openjdk.java.net Thu Apr 7 00:13:45 2022 From: joehw at openjdk.java.net (Joe Wang) Date: Thu, 7 Apr 2022 00:13:45 GMT Subject: RFR: 8283698: Refactor Locale constructors used in src/test In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 17:45:13 GMT, Naoto Sato wrote: > This is a follow-on task after deprecating the Locale constructors (https://bugs.openjdk.java.net/browse/JDK-8282819). Most of the changes are simple replacements to Locale constructors with `Locale.of()` or Locale constants, such as `Locale.US`. test/jdk/java/text/Format/DateFormat/DateFormatRoundTripTest.java line 81: > 79: > 80: /** > 81: * Parse a name like "fr_FR" into Locale.of("fr", "FR", ""); Locale.France? ------------- PR: https://git.openjdk.java.net/jdk/pull/8130 From joehw at openjdk.java.net Thu Apr 7 00:20:31 2022 From: joehw at openjdk.java.net (Joe Wang) Date: Thu, 7 Apr 2022 00:20:31 GMT Subject: RFR: 8283698: Refactor Locale constructors used in src/test In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 17:45:13 GMT, Naoto Sato wrote: > This is a follow-on task after deprecating the Locale constructors (https://bugs.openjdk.java.net/browse/JDK-8282819). Most of the changes are simple replacements to Locale constructors with `Locale.of()` or Locale constants, such as `Locale.US`. test/jdk/java/text/Format/DateFormat/NonGregorianFormatTest.java line 131: > 129: > 130: // Tests with the Japanese imperial calendar > 131: Locale calendarLocale = Locale.of("ja", "JP", "JP"); Locale.JAPAN? ------------- PR: https://git.openjdk.java.net/jdk/pull/8130 From joehw at openjdk.java.net Thu Apr 7 00:31:55 2022 From: joehw at openjdk.java.net (Joe Wang) Date: Thu, 7 Apr 2022 00:31:55 GMT Subject: RFR: 8283698: Refactor Locale constructors used in src/test In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 17:45:13 GMT, Naoto Sato wrote: > This is a follow-on task after deprecating the Locale constructors (https://bugs.openjdk.java.net/browse/JDK-8282819). Most of the changes are simple replacements to Locale constructors with `Locale.of()` or Locale constants, such as `Locale.US`. test/jdk/java/text/Format/NumberFormat/CurrencyFormat.java line 63: > 61: Locale.of("it", "IT", "EURO"), > 62: Locale.forLanguageTag("de-AT"), > 63: Locale.forLanguageTag("fr-CH"), Use the new factory? Ok not to change as these are tests and there are too many of them. It's not deprecated anyways. test/jdk/java/text/Format/common/Bug6215962.java line 58: > 56: check(mf1, mf2, false); > 57: > 58: mf1 = new MessageFormat("{0}", Locale.of("ja", "JP")); Locale.JAPAN? ------------- PR: https://git.openjdk.java.net/jdk/pull/8130 From naoto at openjdk.java.net Thu Apr 7 01:19:35 2022 From: naoto at openjdk.java.net (Naoto Sato) Date: Thu, 7 Apr 2022 01:19:35 GMT Subject: RFR: 8283698: Refactor Locale constructors used in src/test In-Reply-To: References: Message-ID: On Thu, 7 Apr 2022 00:09:58 GMT, Joe Wang wrote: >> This is a follow-on task after deprecating the Locale constructors (https://bugs.openjdk.java.net/browse/JDK-8282819). Most of the changes are simple replacements to Locale constructors with `Locale.of()` or Locale constants, such as `Locale.US`. > > test/jdk/java/text/Format/DateFormat/DateFormatRoundTripTest.java line 81: > >> 79: >> 80: /** >> 81: * Parse a name like "fr_FR" into Locale.of("fr", "FR", ""); > > Locale.France? The test code parses the input string (eg. "fr_FR") into 3 elements, `name`, `country`, and `variant`, then create a `Locale` using those 3 elements. Changing it to `Locale.FRANCE` does not seem right here. > test/jdk/java/text/Format/NumberFormat/CurrencyFormat.java line 63: > >> 61: Locale.of("it", "IT", "EURO"), >> 62: Locale.forLanguageTag("de-AT"), >> 63: Locale.forLanguageTag("fr-CH"), > > Use the new factory? Ok not to change as these are tests and there are too many of them. It's not deprecated anyways. `Locale.forLanguageTag()` is a preferred way to create a `Locale`, as it validates the input language tag, while `Locale.of()` doesn't as well as Locale constructors. > test/jdk/java/text/Format/common/Bug6215962.java line 58: > >> 56: check(mf1, mf2, false); >> 57: >> 58: mf1 = new MessageFormat("{0}", Locale.of("ja", "JP")); > > Locale.JAPAN? The test intends to compare the generated `MessageFormat` objects (`mf2` & `mf1`) from using a constant `Locale.JAPAN` and the factory method. So I believe leaving it as `Locale.of()` makes sense. ------------- PR: https://git.openjdk.java.net/jdk/pull/8130 From kizune at openjdk.java.net Thu Apr 7 04:04:47 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Thu, 7 Apr 2022 04:04:47 GMT Subject: Integrated: 8283387: [macos] a11y : Screen magnifier does not show selected Tab In-Reply-To: References: Message-ID: On Wed, 30 Mar 2022 22:21:51 GMT, Alexander Zuev wrote: > It is impossible right now to manipulate state of the accessible children of the JTabbedPane via their AccessibleValue and because of that some of the assistive technologies are unable to interact with the parts of the JTabbedPane - namely, buttons, representing the JTabbedPane panel navigation buttons. Magnified is just one of the examples that can be engaging without connecting the hardware such as eye movement tracker. > > By adding AccessibleValue to the JTabbedPane children containers we eliminate is problem. And since this inner class is private the standard review should be sufficient, no CSR is required. This pull request has now been integrated. Changeset: d5cd4a3a Author: Alexander Zuev URL: https://git.openjdk.java.net/jdk/commit/d5cd4a3a28a85bbcaa3c0c7f2e74e0684b5efcab Stats: 113 lines in 2 files changed: 110 ins; 1 del; 2 mod 8283387: [macos] a11y : Screen magnifier does not show selected Tab Reviewed-by: prr, aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/8049 From darcy at openjdk.java.net Thu Apr 7 04:46:40 2022 From: darcy at openjdk.java.net (Joe Darcy) Date: Thu, 7 Apr 2022 04:46:40 GMT Subject: RFR: 8283706: Add final or sealed modifier to appropriate javax.swing API classes In-Reply-To: <6vGKFgUuy-PH7-CGtxJanp1JaqHlPO-JxX0DmjGJlSA=.c9524b6d-d1e7-44b5-b282-6ff8c4fda1e3@github.com> References: <6vGKFgUuy-PH7-CGtxJanp1JaqHlPO-JxX0DmjGJlSA=.c9524b6d-d1e7-44b5-b282-6ff8c4fda1e3@github.com> Message-ID: <7HmnDkG_EwJnoRtTXJL38rK5a5UGFmedVjXfF8L3HZM=.588aa464-fb18-4a77-82e6-9307693e7058@github.com> On Wed, 6 Apr 2022 20:14:12 GMT, Sergey Bylokhov wrote: >> Yes, that is fine; javadoc will filter out displaying non-public classes in a permits clause. > > Just to double-check, it is fine to have it in the output of the getPermittedSubclasses for the public class as well? I'm not certain what question you are asking. If the question is, is it fine for core reflection to return non-public information about the class, in general sure. For example, in jshell evaluating StringBuilder.class.getSuperclass() will yield class java.lang.AbstractStringBuilder which is the non-public superclass of StringBuffer and StringBuilder. If the question is, do the compatibility expectations of the platform include such visible non-public implementation artifacts? The answer is no; it is fine for those details to evolve and users shouldn't rely on them. Is there another aspect of the change that was a concern? ------------- PR: https://git.openjdk.java.net/jdk/pull/8082 From joehw at openjdk.java.net Thu Apr 7 04:51:38 2022 From: joehw at openjdk.java.net (Joe Wang) Date: Thu, 7 Apr 2022 04:51:38 GMT Subject: RFR: 8283698: Refactor Locale constructors used in src/test In-Reply-To: References: Message-ID: <0Zxp9nACKCy12wn8Viwd5lYHz3KXojuy02cZLiz8Wiw=.f1a9f3b3-8cfb-4845-87e7-bef9b69ada8a@github.com> On Thu, 7 Apr 2022 01:16:27 GMT, Naoto Sato wrote: >> test/jdk/java/text/Format/DateFormat/DateFormatRoundTripTest.java line 81: >> >>> 79: >>> 80: /** >>> 81: * Parse a name like "fr_FR" into Locale.of("fr", "FR", ""); >> >> Locale.France? > > The test code parses the input string (eg. "fr_FR") into 3 elements, `name`, `country`, and `variant`, then create a `Locale` using those 3 elements. Changing it to `Locale.FRANCE` does not seem right here. I see. ------------- PR: https://git.openjdk.java.net/jdk/pull/8130 From joehw at openjdk.java.net Thu Apr 7 04:59:40 2022 From: joehw at openjdk.java.net (Joe Wang) Date: Thu, 7 Apr 2022 04:59:40 GMT Subject: RFR: 8283698: Refactor Locale constructors used in src/test In-Reply-To: References: Message-ID: On Thu, 7 Apr 2022 01:16:32 GMT, Naoto Sato wrote: >> test/jdk/java/text/Format/NumberFormat/CurrencyFormat.java line 63: >> >>> 61: Locale.of("it", "IT", "EURO"), >>> 62: Locale.forLanguageTag("de-AT"), >>> 63: Locale.forLanguageTag("fr-CH"), >> >> Use the new factory? Ok not to change as these are tests and there are too many of them. It's not deprecated anyways. > > `Locale.forLanguageTag()` is a preferred way to create a `Locale`, as it validates the input language tag, while `Locale.of()` doesn't as well as Locale constructors. Ok, I didn't realize the existing method is preferred over the new method in creating a Locale. The javadoc does state that it does not make any syntactic checks. That's good to know. ------------- PR: https://git.openjdk.java.net/jdk/pull/8130 From joehw at openjdk.java.net Thu Apr 7 04:59:39 2022 From: joehw at openjdk.java.net (Joe Wang) Date: Thu, 7 Apr 2022 04:59:39 GMT Subject: RFR: 8283698: Refactor Locale constructors used in src/test In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 17:45:13 GMT, Naoto Sato wrote: > This is a follow-on task after deprecating the Locale constructors (https://bugs.openjdk.java.net/browse/JDK-8282819). Most of the changes are simple replacements to Locale constructors with `Locale.of()` or Locale constants, such as `Locale.US`. Marked as reviewed by joehw (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8130 From smandalika at openjdk.java.net Thu Apr 7 06:48:29 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Thu, 7 Apr 2022 06:48:29 GMT Subject: RFR: JDK-8282933: Create a test for JDK-4529616 [v3] In-Reply-To: <3d_szd4R6oyDqof-g7sLsV_wkAzuEuma-aXiiUZ03Zw=.6579f560-f11e-4bea-a292-dfcee111a246@github.com> References: <3d_szd4R6oyDqof-g7sLsV_wkAzuEuma-aXiiUZ03Zw=.6579f560-f11e-4bea-a292-dfcee111a246@github.com> Message-ID: > JDK-8282933: Create a test for JDK-4529616 > AccessibleJTableCell.isShowing() returns false when the cell is actually on > the screen. > The test validates the fix for the above issue by verifying that the isShowing call returns true when invoked via the accessiblity context. > This review is for migrating tests from a closed test suite to open. Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: JTable access on EDT, 80 chars line ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7783/files - new: https://git.openjdk.java.net/jdk/pull/7783/files/787ad251..83fefbdf Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7783&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7783&range=01-02 Stats: 26 lines in 1 file changed: 14 ins; 4 del; 8 mod Patch: https://git.openjdk.java.net/jdk/pull/7783.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7783/head:pull/7783 PR: https://git.openjdk.java.net/jdk/pull/7783 From smandalika at openjdk.java.net Thu Apr 7 07:02:18 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Thu, 7 Apr 2022 07:02:18 GMT Subject: RFR: JDK-8282933: Create a test for JDK-4529616 [v4] In-Reply-To: <3d_szd4R6oyDqof-g7sLsV_wkAzuEuma-aXiiUZ03Zw=.6579f560-f11e-4bea-a292-dfcee111a246@github.com> References: <3d_szd4R6oyDqof-g7sLsV_wkAzuEuma-aXiiUZ03Zw=.6579f560-f11e-4bea-a292-dfcee111a246@github.com> Message-ID: > JDK-8282933: Create a test for JDK-4529616 > AccessibleJTableCell.isShowing() returns false when the cell is actually on > the screen. > The test validates the fix for the above issue by verifying that the isShowing call returns true when invoked via the accessiblity context. > This review is for migrating tests from a closed test suite to open. Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: 8282933: Whitespace issue fixed ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7783/files - new: https://git.openjdk.java.net/jdk/pull/7783/files/83fefbdf..97d12e9e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7783&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7783&range=02-03 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/7783.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7783/head:pull/7783 PR: https://git.openjdk.java.net/jdk/pull/7783 From smandalika at openjdk.java.net Thu Apr 7 07:52:11 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Thu, 7 Apr 2022 07:52:11 GMT Subject: RFR: 8284077: Create an automated test for JDK-4170173 Message-ID: <8iul_waSMDD6G1oVVmwPtW89ihAc6YoMFrTR1-XFmmw=.7802104e-60cb-4b90-9ef5-cc479d3f5a78@github.com> Create an automated test for [JDK-4170173](https://bugs.openjdk.java.net/browse/JDK-4170173) Issue JTextComponent.AccessibleJTextComponent.getAfterIndex(int part, int index) works incorrectly, when 'part' parameter is AccessibleText.WORD. It returns a space (" ") instead of the correct word. The test verifies the fix for this behavior by checking the getAfterIndex for AccessibleText.CHARACTER,AccessibleText.WORD,AccessibleText.SENTENCE for the components JTextField, JTextArea, JEditorPane. While working on this test case there was a related bug relevant to this [JDK-4170174](https://bugs.openjdk.java.net/browse/JDK-4170174) This is marked as duplicate, addressess a similar issue. It indicates that JTextComponent.AccessibleJTextComponent.getBeforeIndex(int part, int index) works incorrectly, when part parameter is AccessibleText.WORD. It returns a space (" ") instead of correct word. Hence an additional test was added for this, for verifying the behavior of getBeforeIndex. AccessibleText.CHARACTER,AccessibleText.WORD,AccessibleText.SENTENCE for the components JTextField, JTextArea, JEditorPane. The two tests have multiple distinct assertions. For this reason, as well as for maintainability, the two were not clubbed into a single test. However, the two tests are still similar in the functional flow of the code and the functionality they are testing as well - hence they have been clubbed into a single review. This review is for migrating tests from a closed test suite to open. Testing: The tests ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. ------------- Commit messages: - 8284077: Create an automated test for JDK-4170173 - 8284077: Create an automated test for JDK-4170173 Changes: https://git.openjdk.java.net/jdk/pull/8138/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8138&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284077 Stats: 247 lines in 2 files changed: 247 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8138.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8138/head:pull/8138 PR: https://git.openjdk.java.net/jdk/pull/8138 From smandalika at openjdk.java.net Thu Apr 7 08:18:21 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Thu, 7 Apr 2022 08:18:21 GMT Subject: RFR: 8283245: Create a test for JDK-4670319 [v2] In-Reply-To: References: Message-ID: <_N3uh9GNNdLPg-kiacOdc2fEJJeeBdhRM644g_CsV0s=.90175acf-34bf-4db7-a107-469a8611cbdf@github.com> > Write an automated regression test for JDK-4670319 > > Issue > When a JTree node is expanded or collapsed, an Accessibility PropertyChange event is fired with the old state of "collapsed" and new state of "expanded" (or vice versa). The problem is that the source of the event is the AccessibeJTree, and not the AccessibleJTreeNode. This means that an assistive technology listening to this event is unable to report to the user what node was expanded/collapsed. > > Fix > Fix for [JDK-4670319](https://bugs.openjdk.java.net/browse/JDK-4670319) addresses the above issue. When tree node is expanded/collapsed, PropertyChangeEventSource is the Node. > This review is for a test for validating the above issue. > > This review is for migrating tests from a closed test suite to open. > > Testing: > The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. Srinivas Mandalika has updated the pull request incrementally with two additional commits since the last revision: - Review Comments Fixed: 80 characters line fixed, typo in File Name fixed - Review Comments Fixed: 80 characters line fixed, typo in File Name fixed ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8012/files - new: https://git.openjdk.java.net/jdk/pull/8012/files/9e8c392c..75ed8f6a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8012&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8012&range=00-01 Stats: 226 lines in 2 files changed: 115 ins; 111 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8012.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8012/head:pull/8012 PR: https://git.openjdk.java.net/jdk/pull/8012 From psadhukhan at openjdk.java.net Thu Apr 7 09:16:43 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 7 Apr 2022 09:16:43 GMT Subject: Integrated: 8284166: [macos] Replace deprecated alternateSelectedControlColor with selectedContentBackgroundColor In-Reply-To: References: Message-ID: On Fri, 1 Apr 2022 09:39:05 GMT, Prasanta Sadhukhan wrote: > [alternateSelectedControlColor](https://developer.apple.com/documentation/appkit/nscolor/1533135-alternateselectedcontrolcolor?language=objc) is deprecated since osx10.14 so we need to replace with its alternative "[selectedContentBackgroundColor](https://developer.apple.com/documentation/appkit/nscolor/2998830-selectedcontentbackgroundcolor?language=objc)" > Since our minimum supported deployment target is still [10.12](https://github.com/openjdk/jdk/blob/master/make/autoconf/flags.m4#L139) > we need to use "@available" check to use the deprecated property on older targets > Background color check is ok and also open,closed jtreg run is green This pull request has now been integrated. Changeset: 19288654 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/192886546bf86c9a577b2dfaa4b33cb94799659b Stats: 6 lines in 1 file changed: 4 ins; 0 del; 2 mod 8284166: [macos] Replace deprecated alternateSelectedControlColor with selectedContentBackgroundColor Reviewed-by: prr ------------- PR: https://git.openjdk.java.net/jdk/pull/8071 From psadhukhan at openjdk.java.net Thu Apr 7 09:45:08 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 7 Apr 2022 09:45:08 GMT Subject: RFR: 8257810: Only First page are printed in JTable.scrollRectToVisible Message-ID: Issue was when printing a JTable which sits inside a JScrollPane and the table is scrolled down to the end to about 1000th row, only the first page is printed. This is because when the table is scrolled down to last page, the bounds.y becomes -ve [x=0,y=-15260,width=968,height=16000] so the check `if (!((table.getBounds()).intersects(clip)))` is satisfied only for 1st page where bounds just intersects the clip [x=0,y=0,width=968,height=1296] but subsequent pages clip [[x=0,y=1296,width=968,height=1296], [x=0,y=2592,width=968,height=1296], [x=0,y=3888,width=968,height=1296] etc is not intesecting so they are not printed This is a regression of JDK-8081491 which was **reworked** in JDK-8236907 where the bounds calculation and usage is made same as in BasicTableUI We need to use the same resetted bounds for this intersection calculation too as was done for JDK-8236907 Tested against JDK-8081491, 8170349, JDK-8236907 testcases along with other regression tests and all are OK (link in JBS) ------------- Commit messages: - Fix - Fix - 8257810: Only First page are printed in JTable.scrollRectToVisible Changes: https://git.openjdk.java.net/jdk/pull/8141/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8141&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8257810 Stats: 189 lines in 2 files changed: 186 ins; 2 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8141.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8141/head:pull/8141 PR: https://git.openjdk.java.net/jdk/pull/8141 From duke at openjdk.java.net Thu Apr 7 10:26:20 2022 From: duke at openjdk.java.net (Tejesh R) Date: Thu, 7 Apr 2022 10:26:20 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v2] In-Reply-To: References: Message-ID: <_UplvB0h9bWCInEGLRAN4bN3_sMypgu0hf0nU57pJgI=.8eef0557-500c-4939-b00f-ae9c0dd5a5b8@github.com> > getText function returned extra endOfLine when appended. The reason was in `EditorEditorKit` class, `write(Writer out, Document doc, int pos, int len)` method, where translation happens from buffer to Out(Writer Object) if endOfLine is other than '\n' ( which is '\r\n' in windows). In order to write each line till End of line, the string till '\n' is written including '\r' and again endOfLine is written which results in extra Carriage Return. To solve this issue, a Condition is added which checks if previous character to '\n' is '\r', if true then whole string except Carriage Return ('\r') is written, else whole string till before '\n' is written. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Added Test Case - ChangeStyleAndAppend.java ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8122/files - new: https://git.openjdk.java.net/jdk/pull/8122/files/89935491..953fec43 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8122&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8122&range=00-01 Stats: 173 lines in 1 file changed: 173 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8122.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8122/head:pull/8122 PR: https://git.openjdk.java.net/jdk/pull/8122 From aivanov at openjdk.java.net Thu Apr 7 11:22:55 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 7 Apr 2022 11:22:55 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v2] In-Reply-To: <_UplvB0h9bWCInEGLRAN4bN3_sMypgu0hf0nU57pJgI=.8eef0557-500c-4939-b00f-ae9c0dd5a5b8@github.com> References: <_UplvB0h9bWCInEGLRAN4bN3_sMypgu0hf0nU57pJgI=.8eef0557-500c-4939-b00f-ae9c0dd5a5b8@github.com> Message-ID: On Thu, 7 Apr 2022 10:26:20 GMT, Tejesh R wrote: >> getText function returned extra endOfLine when appended. The reason was in `EditorEditorKit` class, `write(Writer out, Document doc, int pos, int len)` method, where translation happens from buffer to Out(Writer Object) if endOfLine is other than '\n' ( which is '\r\n' in windows). In order to write each line till End of line, the string till '\n' is written including '\r' and again endOfLine is written which results in extra Carriage Return. To solve this issue, a Condition is added which checks if previous character to '\n' is '\r', if true then whole string except Carriage Return ('\r') is written, else whole string till before '\n' is written. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Added Test Case - ChangeStyleAndAppend.java Why can't the test be automatic? You're modifying the contents of a `JTextPane` via `Document`. You can easily get the text from it and verify it has no unexpected new lines. Please follow Java Coding Style in the product code where the added lines don't fit well into the surrounding code style as well as in the test code. ------------- Changes requested by aivanov (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8122 From mvs at openjdk.java.net Thu Apr 7 11:42:12 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Thu, 7 Apr 2022 11:42:12 GMT Subject: RFR: 8284521: Write an automated regression test for RFE 4371575 Message-ID: Write an automated regression test for [JDK-4371575](https://bugs.openjdk.java.net/browse/JDK-4371575) Issue: As part of the Merlin focus project, JComponent.setRequestFocusEnabled was deprecated and its implementation was changed to map exactly to the new method Component.setFocusable. Scott believes that the old behavior may be preferable. He would like to be able to specify that a Component is focusable, and should receive focus during keyboard traversal, but that it should not automatically take focus when the user clicks on it with the mouse. We are concerned that the accessibility team would be against this behavior, and this also seems like more of a PLAF issue. Nevertheless, we should look into it before beta ships. Fix: After some discussion we decided that the best balance of the old and new would be to make this an advisory property. This property will not be synonymous with focusable. Instead our mouse listeners will check this property before requesting focus. This provides as closely as possible the old behavior, while allowing people to use the new focusable property if they don't want a component focusable at all. Testing: Tested in mach5, 10 times with all the 3 available platform like macosx, windows and linux and got all Pass. ------------- Commit messages: - 8284521: Write an automated regression test for RFE 4371575 Changes: https://git.openjdk.java.net/jdk/pull/8143/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8143&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284521 Stats: 138 lines in 1 file changed: 138 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8143.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8143/head:pull/8143 PR: https://git.openjdk.java.net/jdk/pull/8143 From aivanov at openjdk.java.net Thu Apr 7 11:51:39 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 7 Apr 2022 11:51:39 GMT Subject: RFR: 8257810: Only First page are printed in JTable.scrollRectToVisible In-Reply-To: References: Message-ID: On Thu, 7 Apr 2022 09:17:02 GMT, Prasanta Sadhukhan wrote: > Issue was when printing a JTable which sits inside a JScrollPane and the table is scrolled down to the end to about 1000th row, only the first page is printed. > This is because when the table is scrolled down to last page, the bounds.y becomes -ve > [x=0,y=-15260,width=968,height=16000] > so the check `if (!((table.getBounds()).intersects(clip)))` is satisfied only for 1st page where bounds just intersects the clip [x=0,y=0,width=968,height=1296] > but subsequent pages clip > [[x=0,y=1296,width=968,height=1296], > [x=0,y=2592,width=968,height=1296], > [x=0,y=3888,width=968,height=1296] etc is not intesecting so they are not printed > > This is a regression of JDK-8081491 which was **reworked** in JDK-8236907 where the bounds calculation and usage is made same as in BasicTableUI > We need to use the same resetted bounds for this intersection calculation too as was done for JDK-8236907 > > Tested against JDK-8081491, 8170349, JDK-8236907 testcases along with other regression tests and all are OK (link in JBS) test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 53: > 51: PrintAllPages test = new PrintAllPages(latch); > 52: Thread T1 = new Thread(test); > 53: T1.start(); I wonder why you need another thread to create UI. You can create UI from calling `invokeAndWait` from main thread as it's usually done and then start to wait on the latch. The two classes can be merged into one. test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 61: > 59: } catch (InterruptedException ie) { > 60: throw ie; > 61: } The catch block does nothing but re-throws the exception. Thus, it can be removed. test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 63: > 61: } > 62: if (!ret) { > 63: test.dispose(); Why isn't `test.dispose()` called when the test pass? If `latch.await` is interrupted, the test isn't disposed. And UI should be disposed of on EDT. test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 126: > 124: Rectangle bounds = super.getBounds(); > 125: return bounds; > 126: } Is this overridden method used by any means? ------------- PR: https://git.openjdk.java.net/jdk/pull/8141 From psadhukhan at openjdk.java.net Thu Apr 7 13:35:26 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 7 Apr 2022 13:35:26 GMT Subject: RFR: 8257810: Only First page are printed in JTable.scrollRectToVisible [v2] In-Reply-To: References: Message-ID: <_Iv-nTdzxxYLQ-Ef82BJ69ZhTIHcmSvNYYruixg93KU=.2629e3a8-1b53-4a8a-9f91-369c82f17129@github.com> > Issue was when printing a JTable which sits inside a JScrollPane and the table is scrolled down to the end to about 1000th row, only the first page is printed. > This is because when the table is scrolled down to last page, the bounds.y becomes -ve > [x=0,y=-15260,width=968,height=16000] > so the check `if (!((table.getBounds()).intersects(clip)))` is satisfied only for 1st page where bounds just intersects the clip [x=0,y=0,width=968,height=1296] > but subsequent pages clip > [[x=0,y=1296,width=968,height=1296], > [x=0,y=2592,width=968,height=1296], > [x=0,y=3888,width=968,height=1296] etc is not intesecting so they are not printed > > This is a regression of JDK-8081491 which was **reworked** in JDK-8236907 where the bounds calculation and usage is made same as in BasicTableUI > We need to use the same resetted bounds for this intersection calculation too as was done for JDK-8236907 > > Tested against JDK-8081491, 8170349, JDK-8236907 testcases along with other regression tests and all are OK (link in JBS) Prasanta Sadhukhan has updated the pull request incrementally with two additional commits since the last revision: - Test updated - Test updated ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8141/files - new: https://git.openjdk.java.net/jdk/pull/8141/files/7a3bd740..f1c8082d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8141&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8141&range=00-01 Stats: 171 lines in 1 file changed: 55 ins; 85 del; 31 mod Patch: https://git.openjdk.java.net/jdk/pull/8141.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8141/head:pull/8141 PR: https://git.openjdk.java.net/jdk/pull/8141 From psadhukhan at openjdk.java.net Thu Apr 7 13:35:27 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 7 Apr 2022 13:35:27 GMT Subject: RFR: 8257810: Only First page are printed in JTable.scrollRectToVisible [v2] In-Reply-To: References: Message-ID: On Thu, 7 Apr 2022 11:48:19 GMT, Alexey Ivanov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with two additional commits since the last revision: >> >> - Test updated >> - Test updated > > test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 53: > >> 51: PrintAllPages test = new PrintAllPages(latch); >> 52: Thread T1 = new Thread(test); >> 53: T1.start(); > > I wonder why you need another thread to create UI. You can create UI from calling `invokeAndWait` from main thread as it's usually done and then start to wait on the latch. > > The two classes can be merged into one. I followed the manual test I created for other printing related tests but anyways I have updated as per suggestions. ------------- PR: https://git.openjdk.java.net/jdk/pull/8141 From djelinski at openjdk.java.net Thu Apr 7 14:58:43 2022 From: djelinski at openjdk.java.net (Daniel =?UTF-8?B?SmVsacWEc2tp?=) Date: Thu, 7 Apr 2022 14:58:43 GMT Subject: Integrated: 8284444: Sting typo In-Reply-To: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> References: <6dV8QfrkKltmL7CnwYYMDMhEMBHnEcYmrtdrZZITwl4=.6963f840-ea5f-4034-824a-99b776b53af5@github.com> Message-ID: On Wed, 6 Apr 2022 12:07:30 GMT, Daniel Jeli?ski wrote: > This patch adds missing `r` in `string`s This pull request has now been integrated. Changeset: 5bafcfdc Author: Daniel Jeli?ski URL: https://git.openjdk.java.net/jdk/commit/5bafcfdc171b5a514ecf620703e77fa2f4a49c58 Stats: 10 lines in 5 files changed: 0 ins; 0 del; 10 mod 8284444: Sting typo Reviewed-by: kcr, aivanov, mgronlun ------------- PR: https://git.openjdk.java.net/jdk/pull/8125 From psadhukhan at openjdk.java.net Thu Apr 7 14:59:38 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 7 Apr 2022 14:59:38 GMT Subject: RFR: 8257810: Only First page are printed in JTable.scrollRectToVisible [v3] In-Reply-To: References: Message-ID: > Issue was when printing a JTable which sits inside a JScrollPane and the table is scrolled down to the end to about 1000th row, only the first page is printed. > This is because when the table is scrolled down to last page, the bounds.y becomes -ve > [x=0,y=-15260,width=968,height=16000] > so the check `if (!((table.getBounds()).intersects(clip)))` is satisfied only for 1st page where bounds just intersects the clip [x=0,y=0,width=968,height=1296] > but subsequent pages clip > [[x=0,y=1296,width=968,height=1296], > [x=0,y=2592,width=968,height=1296], > [x=0,y=3888,width=968,height=1296] etc is not intesecting so they are not printed > > This is a regression of JDK-8081491 which was **reworked** in JDK-8236907 where the bounds calculation and usage is made same as in BasicTableUI > We need to use the same resetted bounds for this intersection calculation too as was done for JDK-8236907 > > Tested against JDK-8081491, 8170349, JDK-8236907 testcases along with other regression tests and all are OK (link in JBS) Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Test updated ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8141/files - new: https://git.openjdk.java.net/jdk/pull/8141/files/f1c8082d..635b90aa Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8141&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8141&range=01-02 Stats: 16 lines in 1 file changed: 11 ins; 3 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8141.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8141/head:pull/8141 PR: https://git.openjdk.java.net/jdk/pull/8141 From duke at openjdk.java.net Thu Apr 7 15:09:27 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Thu, 7 Apr 2022 15:09:27 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v6] In-Reply-To: References: Message-ID: > We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following > 1) Frame which contains test instruction . > 2) Pass & Fail button so that user can mark the test pass or fail > 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. > 4) Disposing of all the frames. > > @aivanov-jdk lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7966/files - new: https://git.openjdk.java.net/jdk/pull/7966/files/8e8feff5..a10ac21b Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7966&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7966&range=04-05 Stats: 192 lines in 2 files changed: 129 ins; 13 del; 50 mod Patch: https://git.openjdk.java.net/jdk/pull/7966.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7966/head:pull/7966 PR: https://git.openjdk.java.net/jdk/pull/7966 From duke at openjdk.java.net Thu Apr 7 15:09:27 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Thu, 7 Apr 2022 15:09:27 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v5] In-Reply-To: References: Message-ID: <7a2E0wVs_CG6Y2PEFxjDauZRE_Jhf8EO_wOfL2CYu34=.bec5a255-b7ac-4e64-b2e1-435b55c8d838@github.com> On Tue, 5 Apr 2022 20:16:28 GMT, lawrence.andrews wrote: >> We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following >> 1) Frame which contains test instruction . >> 2) Pass & Fail button so that user can mark the test pass or fail >> 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. >> 4) Disposing of all the frames. >> >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Fixed review comments Add a fix where the Test Instruction frame and the test frame can be placed either side by side or up and down. ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From duke at openjdk.java.net Thu Apr 7 15:09:28 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Thu, 7 Apr 2022 15:09:28 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v5] In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 10:39:44 GMT, Alexey Ivanov wrote: >> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: >> >> Fixed review comments > > test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 85: > >> 83: frame.dispose(); >> 84: } >> 85: }); > > I just thought whether it's feasible to keep a list of frames / windows to be disposed of inside the `PassFailJFrame` class. It disposes of its instruction frame when the wait is over, it can handle disposing of other frames too. > > If I remember correctly, the first version disposed of of all windows. If we make it an explicit list, it shouldn't cause issues. Fixed > test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 105: > >> 103: PrintLatinCJKTest.showFrame(); >> 104: passFailJFrame.awaitAndCheck(); >> 105: PrintLatinCJKTest.disposeTestFrame(); > > It won't be disposed of if the test fails, that is throws an exception, so this should be in try-finally block. > > The class name isn't required to call a static method which is in this class. Fixed ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From duke at openjdk.java.net Thu Apr 7 15:09:32 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Thu, 7 Apr 2022 15:09:32 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v4] In-Reply-To: References: Message-ID: On Tue, 5 Apr 2022 18:58:27 GMT, Alexey Ivanov wrote: >> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: >> >> Dispose the Frame based in EDT > > test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 91: > >> 89: public static void main(String[] args) throws InterruptedException, InvocationTargetException { >> 90: PassFailJFrame passFailJFrame = new PassFailJFrame("Test Instruction" + >> 91: "Frame", info, 7, 30, 3); > > This already breaks the threading rules of Swing: every access to Swing components must be done on EDT. > > The thing is `PassFailJFrame` extends `JFrame`, thus super constructor (the inherited one from `JFrame`) will be called on main thread. It's not what we want, isn't it? > > I'd suggest not to extend `JFrame` at all. We're not developing new functionality to `JFrame` but build UI using Swing components. > > As a benefit, you'll be able to initialise GUI on EDT if the constructor is called on another thread. > > I support Phil that the framework should document threading and mark methods which are allowed to be called on any thread. Probably all the methods should allow for it. Fixed, while the comment was added > test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 93: > >> 91: "Frame", info, 7, 30, 3); >> 92: PrintLatinCJKTest.showFrame(); >> 93: passFailJFrame.awaitAndCheck(); > > I believe `awaitAndCheck()` is the method that must be called from the main thread. It waits until the test is completed. > > If it was called on EDT, it would block the event queue. Added the Note as part of the method description > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 42: > >> 40: private final CountDownLatch latch = new CountDownLatch(1); >> 41: private boolean failed = false; >> 42: private String testFailedReason; > > These two are accessed by EDT and main thread. The boolean field should be declared `volatile` or use `AtomicBoolean`. The same applies for `testFailedReason`. Fixed > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 45: > >> 43: private JTextArea instructionsText; >> 44: private final int maxRowLength; >> 45: private final int maxStringLength; > > These aren't needed as fields, they're used only to create instruction text. Removed > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 65: > >> 63: * @throws HeadlessException >> 64: * @throws InterruptedException >> 65: * @throws InvocationTargetException > > I suggest adding generic descriptions of exceptions to avoid IDE warnings. Added the description > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 78: > >> 76: invokeAndWait(() -> { >> 77: setLayout(new BorderLayout()); >> 78: instructionsText = new JTextArea(instructions, maxRowLength, maxStringLength); > > You could use line wrap functionality of JTextArea to avoid adding `\n` to the instructions. > > Consider placing it into JScrollPane for flexibility, though not required. > > `maxRowLength` is actually the number of rows (lines), and `maxStringLength` is the number of columns. These parameters are used to calculate the preferred size of the text area, they don't limit the text the component can store. Added JScrollPane & used wrap function on JTextArea > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 80: > >> 78: instructionsText = new JTextArea(instructions, maxRowLength, maxStringLength); >> 79: instructionsText.setEditable(false); >> 80: instructionsText.setFocusable(false); > > I think leaving the instructions focusable won't hurt. It would allow selecting text (and copying it) if the tester needs it for whatever reason. Done > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 95: > >> 93: add(buttonsPanel, BorderLayout.SOUTH); >> 94: pack(); >> 95: setLocation(10, 10); > > The instruction window should probably be placed around the centre of the screen. > > The class should provide a method to position a secondary frame near the instruction frame so that both frames don't overlap. > > A possibility to include test UI to the instructions could be beneficial in some cases: dealing with one window is easier than with several ones. It's just a suggestion for further improvement though. Fixed > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 96: > >> 94: pack(); >> 95: setLocation(10, 10); >> 96: setVisible(true); > > Closing the window with Close button should also fail the test, now it doesn't. Fixed > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 125: > >> 123: public void getFailureReason() { >> 124: final JDialog dialog = new JDialog(); >> 125: dialog.setTitle("Failure reason"); > > I suggest making the dialog Toolkit-modal so that only the dialog can be interacted with. > > > final JDialog dialog = new JDialog(this, "Failure reason", TOOLKIT_MODAL); > > > At this time, I can click Fail again several times and I'll have several dialogs open. I can also click Pass which completes the test and disposes of the dialogs. Yes, I made the JDialog to be Modal dialog > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 144: > >> 142: jPanel.add(okayBtnPanel, BorderLayout.SOUTH); >> 143: dialog.add(jPanel); >> 144: dialog.setLocationRelativeTo(null); > > We should probably position the dialog relatively to the frame or the Fail button. > > Now the frame is displayed on the left edge of the screen but the dialog is in the centre of the screen as if they're unrelated. Fixed. ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From duke at openjdk.java.net Thu Apr 7 16:07:41 2022 From: duke at openjdk.java.net (Tejesh R) Date: Thu, 7 Apr 2022 16:07:41 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v2] In-Reply-To: References: <_UplvB0h9bWCInEGLRAN4bN3_sMypgu0hf0nU57pJgI=.8eef0557-500c-4939-b00f-ae9c0dd5a5b8@github.com> Message-ID: On Thu, 7 Apr 2022 11:19:53 GMT, Alexey Ivanov wrote: > > Why can't the test be automatic? Actually had thought about automating the test case, but since endOfLine(Win - '\r\n', linux - '\n') is different for different OS, have made it manual. ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From prr at openjdk.java.net Thu Apr 7 17:04:41 2022 From: prr at openjdk.java.net (Phil Race) Date: Thu, 7 Apr 2022 17:04:41 GMT Subject: RFR: 8284378: Make Metal the default Java 2D rendering pipeline for macOS In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 09:48:13 GMT, Ajit Ghaisas wrote: > This PR makes Metal rendering pipeline as the default Java 2D rendering pipeline for macOS. > > Please refer "JBS Description" for more details. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8121 From jdv at openjdk.java.net Thu Apr 7 18:05:44 2022 From: jdv at openjdk.java.net (Jayathirth D V) Date: Thu, 7 Apr 2022 18:05:44 GMT Subject: RFR: 8284378: Make Metal the default Java 2D rendering pipeline for macOS In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 09:48:13 GMT, Ajit Ghaisas wrote: > This PR makes Metal rendering pipeline as the default Java 2D rendering pipeline for macOS. > > Please refer "JBS Description" for more details. Marked as reviewed by jdv (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8121 From serb at openjdk.java.net Thu Apr 7 18:40:35 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 7 Apr 2022 18:40:35 GMT Subject: RFR: 8283706: Add final or sealed modifier to appropriate javax.swing API classes In-Reply-To: References: Message-ID: On Sat, 2 Apr 2022 23:21:03 GMT, Phil Race wrote: > Update Swing classes to use JEP 409 sealed and non-sealed modifiers and add the final modifier where appropriate. > > jtreg tests and JCK API tests pass > > CSR for review here : https://bugs.openjdk.java.net/browse/JDK-8284214 Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8082 From serb at openjdk.java.net Thu Apr 7 18:40:35 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 7 Apr 2022 18:40:35 GMT Subject: RFR: 8283706: Add final or sealed modifier to appropriate javax.swing API classes In-Reply-To: <7HmnDkG_EwJnoRtTXJL38rK5a5UGFmedVjXfF8L3HZM=.588aa464-fb18-4a77-82e6-9307693e7058@github.com> References: <6vGKFgUuy-PH7-CGtxJanp1JaqHlPO-JxX0DmjGJlSA=.c9524b6d-d1e7-44b5-b282-6ff8c4fda1e3@github.com> <7HmnDkG_EwJnoRtTXJL38rK5a5UGFmedVjXfF8L3HZM=.588aa464-fb18-4a77-82e6-9307693e7058@github.com> Message-ID: On Thu, 7 Apr 2022 04:43:48 GMT, Joe Darcy wrote: >> Just to double-check, it is fine to have it in the output of the getPermittedSubclasses for the public class as well? > > I'm not certain what question you are asking. If the question is, is it fine for core reflection to return non-public information about the class, in general sure. For example, in jshell evaluating > StringBuilder.class.getSuperclass() > will yield > class java.lang.AbstractStringBuilder > which is the non-public superclass of StringBuffer and StringBuilder. > > If the question is, do the compatibility expectations of the platform include such visible non-public implementation artifacts? The answer is no; it is fine for those details to evolve and users shouldn't rely on them. > > Is there another aspect of the change that was a concern? Thank you for your clarification. ------------- PR: https://git.openjdk.java.net/jdk/pull/8082 From prr at openjdk.java.net Thu Apr 7 19:36:41 2022 From: prr at openjdk.java.net (Phil Race) Date: Thu, 7 Apr 2022 19:36:41 GMT Subject: RFR: 8283706: Add final or sealed modifier to appropriate javax.swing API classes In-Reply-To: References: <6vGKFgUuy-PH7-CGtxJanp1JaqHlPO-JxX0DmjGJlSA=.c9524b6d-d1e7-44b5-b282-6ff8c4fda1e3@github.com> <7HmnDkG_EwJnoRtTXJL38rK5a5UGFmedVjXfF8L3HZM=.588aa464-fb18-4a77-82e6-9307693e7058@github.com> Message-ID: <0YxWiHfWo-liuAdqmtziq9AkAgMNqGBFhliqDUvmbXI=.441769f7-1cc4-4543-9002-e83e4a8d96d2@github.com> On Thu, 7 Apr 2022 18:36:55 GMT, Sergey Bylokhov wrote: >> I'm not certain what question you are asking. If the question is, is it fine for core reflection to return non-public information about the class, in general sure. For example, in jshell evaluating >> StringBuilder.class.getSuperclass() >> will yield >> class java.lang.AbstractStringBuilder >> which is the non-public superclass of StringBuffer and StringBuilder. >> >> If the question is, do the compatibility expectations of the platform include such visible non-public implementation artifacts? The answer is no; it is fine for those details to evolve and users shouldn't rely on them. >> >> Is there another aspect of the change that was a concern? > > Thank you for your clarification. You have to include it in the list, else it would not be a permitted sub-class, and then you couldn't use the new syntax at all. the javadoc doesn't mention it - it still just says public sealed class GroupLayout.ParallelGroup extends [GroupLayout.Group] My recollection is that if there are also public classes the generated javadocs cites the public one and appends the text "and others" ,, to mean the private ones .. I don't know why it does that but it still doesn't expose the internal class ------------- PR: https://git.openjdk.java.net/jdk/pull/8082 From achung at openjdk.java.net Thu Apr 7 20:24:29 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Thu, 7 Apr 2022 20:24:29 GMT Subject: RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v8] In-Reply-To: References: Message-ID: > Changed the drawing area to be increased by 0.5 on the left side to prevent clipping Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: fixed 1.25 scaling overdraw, fixed calcs for right and bottom side borders ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7449/files - new: https://git.openjdk.java.net/jdk/pull/7449/files/9109b84b..5d4854df Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7449&range=07 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7449&range=06-07 Stats: 13 lines in 1 file changed: 2 ins; 2 del; 9 mod Patch: https://git.openjdk.java.net/jdk/pull/7449.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7449/head:pull/7449 PR: https://git.openjdk.java.net/jdk/pull/7449 From achung at openjdk.java.net Thu Apr 7 20:24:30 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Thu, 7 Apr 2022 20:24:30 GMT Subject: RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v7] In-Reply-To: References: Message-ID: On Wed, 23 Mar 2022 18:24:05 GMT, Alisen Chung wrote: >> Changed the drawing area to be increased by 0.5 on the left side to prevent clipping > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > scale stroke width at higher scalings I checked 1.25, 1.5, 2, 3x scalings for latest change ------------- PR: https://git.openjdk.java.net/jdk/pull/7449 From kizune at openjdk.java.net Thu Apr 7 20:39:44 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Thu, 7 Apr 2022 20:39:44 GMT Subject: RFR: 8282526: Default icon is not painted properly [v2] In-Reply-To: References: Message-ID: > Detect the situation where we do need to perform interpolation during ImageIcon > painting and set a hint to the rendering to perform bicubic approximation so > image details are preserved during transition. Alexander Zuev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains two additional commits since the last revision: - Merge pull request #35 from azuev-java/master Merge - 8282526: Default icon is not painted properly Detect the situation when icon image painting requires interpolation and set the interpolation to bicubic to preserve the icon details as much as possible. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7805/files - new: https://git.openjdk.java.net/jdk/pull/7805/files/2f5b31ab..6967cc18 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7805&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7805&range=00-01 Stats: 157285 lines in 2490 files changed: 116162 ins; 31452 del; 9671 mod Patch: https://git.openjdk.java.net/jdk/pull/7805.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7805/head:pull/7805 PR: https://git.openjdk.java.net/jdk/pull/7805 From prr at openjdk.java.net Thu Apr 7 21:04:34 2022 From: prr at openjdk.java.net (Phil Race) Date: Thu, 7 Apr 2022 21:04:34 GMT Subject: RFR: 8284521: Write an automated regression test for RFE 4371575 In-Reply-To: References: Message-ID: On Thu, 7 Apr 2022 11:08:38 GMT, Manukumar V S wrote: > Write an automated regression test for [JDK-4371575](https://bugs.openjdk.java.net/browse/JDK-4371575) > > Issue: > As part of the Merlin focus project, JComponent.setRequestFocusEnabled was > deprecated and its implementation was changed to map exactly to the new > method Component.setFocusable. Scott believes that the old behavior may be > preferable. He would like to be able to specify that a Component is focusable, > and should receive focus during keyboard traversal, but that it should not > automatically take focus when the user clicks on it with the mouse. > > We are concerned that the accessibility team would be against this behavior, > and this also seems like more of a PLAF issue. Nevertheless, we should look > into it before beta ships. > > Fix: > After some discussion we decided that the best balance of the old and new would be to make this an advisory property. This property will not be synonymous with focusable. Instead our mouse listeners will check this property before requesting focus. This provides as closely as possible the old behavior, while allowing people to use the new focusable property if they don't want a component focusable at all. > > Testing: > Tested in mach5, 10 times with all the 3 available platform like macosx, windows and linux and got all Pass. Before I look at the test, can you get rid of the pointless directory 4371575 A directory might be needed if you had a lot of files for the test - but you don't ! And I really don't like naming directories OR tests with the bugid. Someone can find that out from the @bug tag. I know you've pushed a bunch of bugs already that follow this pattern but update all the "in progress" ones to NOT create pointless extra folders. ------------- Changes requested by prr (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8143 From darcy at openjdk.java.net Thu Apr 7 22:22:02 2022 From: darcy at openjdk.java.net (Joe Darcy) Date: Thu, 7 Apr 2022 22:22:02 GMT Subject: RFR: 8283706: Add final or sealed modifier to appropriate javax.swing API classes In-Reply-To: <0YxWiHfWo-liuAdqmtziq9AkAgMNqGBFhliqDUvmbXI=.441769f7-1cc4-4543-9002-e83e4a8d96d2@github.com> References: <6vGKFgUuy-PH7-CGtxJanp1JaqHlPO-JxX0DmjGJlSA=.c9524b6d-d1e7-44b5-b282-6ff8c4fda1e3@github.com> <7HmnDkG_EwJnoRtTXJL38rK5a5UGFmedVjXfF8L3HZM=.588aa464-fb18-4a77-82e6-9307693e7058@github.com> <0YxWiHfWo-liuAdqmtziq9AkAgMNqGBFhliqDUvmbXI=.441769f7-1cc4-4543-9002-e83e4a8d96d2@github.com> Message-ID: On Thu, 7 Apr 2022 19:33:28 GMT, Phil Race wrote: >> Thank you for your clarification. > > You have to include it in the list, else it would not be a permitted sub-class, and then you couldn't use the new syntax at all. > > the javadoc doesn't mention it - it still just says > public sealed class GroupLayout.ParallelGroup > extends [GroupLayout.Group] > > My recollection is that if there are also public classes the generated javadocs cites the public one and appends the text "and others" ,, to mean the private ones .. I don't know why it does that but it still doesn't expose the internal class The motivation for that wording is discussed in JEP 409; it indicates the public list of classes is not exhaustive. So for pattern matching (JEP 406), if the pattern matching cases for the switch expressoin are not exhaustive, a default clause on the switch is required. HTH ------------- PR: https://git.openjdk.java.net/jdk/pull/8082 From duke at openjdk.java.net Thu Apr 7 22:59:33 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Thu, 7 Apr 2022 22:59:33 GMT Subject: RFR: 8284316 : Support accessibility ManualTestFrame.java for non SwingSet tests [v2] In-Reply-To: References: Message-ID: <_3KQsjqFELr9Pn_bUlpNkqUoFEfzFXrXDpjqSx6wKLE=.362fb0dc-c796-4748-9123-bf08e3ec51a2@github.com> > 1) Modified ManualTestFrame.java to support non SwingSet2 and this include modification of SwingSetTest.java > 2) Added new TestJProgressBarAccessibility.java testcase that uses ManualTestFrame > 3) Added timeout support in case user does not interact with the ManualTestFrame > > @shurymury lawrence.andrews has updated the pull request incrementally with two additional commits since the last revision: - minor change - Set Default timeout value as well as read as parameter ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8100/files - new: https://git.openjdk.java.net/jdk/pull/8100/files/c1f886b0..9d49e5b4 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8100&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8100&range=00-01 Stats: 18 lines in 3 files changed: 4 ins; 0 del; 14 mod Patch: https://git.openjdk.java.net/jdk/pull/8100.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8100/head:pull/8100 PR: https://git.openjdk.java.net/jdk/pull/8100 From serb at openjdk.java.net Thu Apr 7 23:08:11 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 7 Apr 2022 23:08:11 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v3] In-Reply-To: <1s3rujPqPuQFiA9xp2Rq4UoXMfP5fSpzQX_CNfl-UXw=.4b2a2871-1647-4c2f-a368-44ef8c7896c4@github.com> References: <1s3rujPqPuQFiA9xp2Rq4UoXMfP5fSpzQX_CNfl-UXw=.4b2a2871-1647-4c2f-a368-44ef8c7896c4@github.com> Message-ID: <6bK-iNlPfRxkowIW1_7WYUulcJ9qpcvCBgcG44Q0mHs=.e04e5fc2-d532-4684-bab1-3fd94ba58048@github.com> On Tue, 5 Apr 2022 05:42:53 GMT, Maxim Kartashev wrote: >> These crashes were not reproducible, so the fix is based on a hypothesis that there are two possible reasons for them: >> 1. `makeDefaultConfig()` returning `NULL`. >> 2. A race condition when the number of screens changes. >> The race scenario: `X11GraphisDevice.makeDefaultConfiguration()` is called on EDT so the call can race with `X11GraphisDevice.invalidate()` that re-sets the screen number of the device; the latter is invoked on the `AWT-XAWT` thread from `X11GraphicsEnvironment.rebuildDevices()`. So by the time `makeDefaultConfiguration()` makes a native call with the device's current screen number, the `x11Screens` array maintained by the native code could have become shorter. And the native methods like `Java_sun_awt_X11GraphicsDevice_getConfigColormap()` assume that the number passed to them is always current and valid. The AWT lock only protects against the changes during the native methods invocation and does not protect against them being called with an outdated screen number. With a larger screen number, those methods read past the end of the `x11Screens` array. >> >> The fix for (1) is to die gracefully instead of crashing in an attempt to de-reference a `NULL` pointer, which might happen upon returning from `makeDefaultConfig()` in `getAllConfigs()`. >> >> The fix for (2) is to eliminate the race by protecting `X11GraphisDevice.screen` with the AWT lock such that it doesn't change when the native methods working with it are active. >> >> We've been shipping JetBrains Runtime with this fix for a few months now and there were no crash reports with those specific patterns against the versions with the fix. > > Maxim Kartashev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits: > > - Merge branch 'master' into JDK-8280468 > - Addressed PR comments > > 1. Got rid of X11GraphicsDevice.configLock in favour of the AWT lock. > 2. Reduced the use of the screen number (and, consequently, AWT lock > contention) in XCanvasPeer. > - 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux > > This fix addresses two possible causes of crashes: > 1. makeDefaultConfig() returning NULL. The fix is to die gracefully > instead of crashing in an attempt to de-reference a NULL pointer. > > 2. A race condition when the number of screens change (this is only an > issue with the number of xinerama screens; the number of X11 screens is > static for the duration of the X session). > > The race scenario: X11GraphisDevice.makeDefaultConfiguration() is called > on EDT so the call can race with X11GraphisDevice.invalidate() that > re-sets the screen number of the device; the latter is invoked on the > "AWT-XAWT" thread from X11GraphicsEnvironment.rebuildDevices(). So by > the time makeDefaultConfiguration() makes a native call with the > device's current screen number, the x11Screens array maintained by the > native code could have become shorter. And the native methods like > Java_sun_awt_X11GraphicsDevice_getConfigColormap() assume that the > screen number passed to them is always current and valid. The AWT lock > only protects against the changes during the native methods invocation, > but does not protect against them being called with an outdated screen > number. > > The fix is to eliminate the race by protecting X11GraphisDevice.screen > with the AWT lock. src/java.desktop/unix/classes/sun/awt/X11/XCanvasPeer.java line 90: > 88: XToolkit.awtUnlock(); > 89: } > 90: } I am not sure I understand the purpose of this method, it requests the current device for the GC, then requests the screen index of the device, and then request device by the screen index, what is the reason to do that? Why we cannot just use the device from the GC? src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java line 161: > 159: > 160: private void makeConfigurations() { > 161: if (configs == null) { To make the diff less distruptive you can move the ssyncronisation to the getConfigurations and getDefaultConfiguration where we have kind of DCL. ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From duke at openjdk.java.net Fri Apr 8 00:40:42 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Fri, 8 Apr 2022 00:40:42 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v8] In-Reply-To: References: Message-ID: <7ot0fBLQsvKiNsxLdrbnv4R_MNr6qdLN_GBwNPjU-rY=.dcad59a1-d0d6-42b9-bdf4-6290f31a88e0@github.com> On Wed, 6 Apr 2022 17:29:27 GMT, Harshitha Onkar wrote: >> @prsadhuk I was able to replicate the above scenario and as mentioned it oddly happens only when we start with Graphite as accent color. Looking into it further. > > Following type properties where checked for cellFocusRing color > > - [alternateSelectedControlColor](https://developer.apple.com/documentation/appkit/nscolor/1533135-alternateselectedcontrolcolor) > **Issue:** Doesn't follow accent color in macos 10.15 and deprecated property. > > - [selectedContentBackgroundColor](https://developer.apple.com/documentation/appkit/nscolor/2998830-selectedcontentbackgroundcolor) > **Issue:** New property corresponding to **alternateSelectedControlColor** (deprecated). Causes build issues as the property is supported on macOS 10.14+ and the macOS deployment target version is 10.12 for jdk. > > - [controlAccentColor](https://developer.apple.com/documentation/appkit/nscolor/3000782-controlaccentcolor) > **Issue:** Causes build issues due to version compatibility, property supported on only macOS 10.14+ > > - [accentColor](https://developer.apple.com/documentation/swiftui/color/accentcolor) > **Issue:** Property supported on only macOS 10.15+, compatibility and run time issues. > > - [keyboardfocusindicatorcolor](https://developer.apple.com/documentation/appkit/nscolor/1532031-keyboardfocusindicatorcolor) > **Issue:** Works well for most of the scenarios (including on-the-fly changes) and follows the accent color changes except when we start the application with accent color set to Graphite and then change accent color on-the-fly (as mentioned above). The cell focus ring remains gray. The issue seems to be with the system color returned by the type-property "**keyboardfocusindicatorcolor**" under this setting. @prrace @prsadhuk The issue with the system color returned by **keyboardFocusIndicatorColor** mentioned above, persists on macOS 12.3 as well. ------------- PR: https://git.openjdk.java.net/jdk/pull/7768 From duke at openjdk.java.net Fri Apr 8 06:36:24 2022 From: duke at openjdk.java.net (Maxim Kartashev) Date: Fri, 8 Apr 2022 06:36:24 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v4] In-Reply-To: References: Message-ID: > These crashes were not reproducible, so the fix is based on a hypothesis that there are two possible reasons for them: > 1. `makeDefaultConfig()` returning `NULL`. > 2. A race condition when the number of screens changes. > The race scenario: `X11GraphisDevice.makeDefaultConfiguration()` is called on EDT so the call can race with `X11GraphisDevice.invalidate()` that re-sets the screen number of the device; the latter is invoked on the `AWT-XAWT` thread from `X11GraphicsEnvironment.rebuildDevices()`. So by the time `makeDefaultConfiguration()` makes a native call with the device's current screen number, the `x11Screens` array maintained by the native code could have become shorter. And the native methods like `Java_sun_awt_X11GraphicsDevice_getConfigColormap()` assume that the number passed to them is always current and valid. The AWT lock only protects against the changes during the native methods invocation and does not protect against them being called with an outdated screen number. With a larger screen number, those methods read past the end of the `x11Screens` array. > > The fix for (1) is to die gracefully instead of crashing in an attempt to de-reference a `NULL` pointer, which might happen upon returning from `makeDefaultConfig()` in `getAllConfigs()`. > > The fix for (2) is to eliminate the race by protecting `X11GraphisDevice.screen` with the AWT lock such that it doesn't change when the native methods working with it are active. > > We've been shipping JetBrains Runtime with this fix for a few months now and there were no crash reports with those specific patterns against the versions with the fix. Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision: Made the diff of X11GraphicsDevice.java less disruptive ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7182/files - new: https://git.openjdk.java.net/jdk/pull/7182/files/37017309..1c5ad928 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7182&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7182&range=02-03 Stats: 111 lines in 1 file changed: 35 ins; 35 del; 41 mod Patch: https://git.openjdk.java.net/jdk/pull/7182.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7182/head:pull/7182 PR: https://git.openjdk.java.net/jdk/pull/7182 From duke at openjdk.java.net Fri Apr 8 06:49:09 2022 From: duke at openjdk.java.net (Maxim Kartashev) Date: Fri, 8 Apr 2022 06:49:09 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v5] In-Reply-To: References: Message-ID: > These crashes were not reproducible, so the fix is based on a hypothesis that there are two possible reasons for them: > 1. `makeDefaultConfig()` returning `NULL`. > 2. A race condition when the number of screens changes. > The race scenario: `X11GraphisDevice.makeDefaultConfiguration()` is called on EDT so the call can race with `X11GraphisDevice.invalidate()` that re-sets the screen number of the device; the latter is invoked on the `AWT-XAWT` thread from `X11GraphicsEnvironment.rebuildDevices()`. So by the time `makeDefaultConfiguration()` makes a native call with the device's current screen number, the `x11Screens` array maintained by the native code could have become shorter. And the native methods like `Java_sun_awt_X11GraphicsDevice_getConfigColormap()` assume that the number passed to them is always current and valid. The AWT lock only protects against the changes during the native methods invocation and does not protect against them being called with an outdated screen number. With a larger screen number, those methods read past the end of the `x11Screens` array. > > The fix for (1) is to die gracefully instead of crashing in an attempt to de-reference a `NULL` pointer, which might happen upon returning from `makeDefaultConfig()` in `getAllConfigs()`. > > The fix for (2) is to eliminate the race by protecting `X11GraphisDevice.screen` with the AWT lock such that it doesn't change when the native methods working with it are active. > > We've been shipping JetBrains Runtime with this fix for a few months now and there were no crash reports with those specific patterns against the versions with the fix. Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision: Restored the original code in X11GraphicsDevice.java that got auto-formatted ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7182/files - new: https://git.openjdk.java.net/jdk/pull/7182/files/1c5ad928..422397eb Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7182&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7182&range=03-04 Stats: 15 lines in 1 file changed: 1 ins; 0 del; 14 mod Patch: https://git.openjdk.java.net/jdk/pull/7182.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7182/head:pull/7182 PR: https://git.openjdk.java.net/jdk/pull/7182 From duke at openjdk.java.net Fri Apr 8 06:49:12 2022 From: duke at openjdk.java.net (Maxim Kartashev) Date: Fri, 8 Apr 2022 06:49:12 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v2] In-Reply-To: <6bK-iNlPfRxkowIW1_7WYUulcJ9qpcvCBgcG44Q0mHs=.e04e5fc2-d532-4684-bab1-3fd94ba58048@github.com> References: <1s3rujPqPuQFiA9xp2Rq4UoXMfP5fSpzQX_CNfl-UXw=.4b2a2871-1647-4c2f-a368-44ef8c7896c4@github.com> <6bK-iNlPfRxkowIW1_7WYUulcJ9qpcvCBgcG44Q0mHs=.e04e5fc2-d532-4684-bab1-3fd94ba58048@github.com> Message-ID: <7iVp3ugJfRapjCze-mAQKfRdx-KEjk6KE09U1jY0l2w=.c6554758-7ea7-4b63-80f0-6f138a9b8732@github.com> On Thu, 7 Apr 2022 23:05:04 GMT, Sergey Bylokhov wrote: >> Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision: >> >> Addressed PR comments >> >> 1. Got rid of X11GraphicsDevice.configLock in favour of the AWT lock. >> 2. Reduced the use of the screen number (and, consequently, AWT lock >> contention) in XCanvasPeer. > > src/java.desktop/unix/classes/sun/awt/X11GraphicsDevice.java line 161: > >> 159: XToolkit.awtLock(); >> 160: try { >> 161: if (configs == null) { > > To make the diff less distruptive you can move the ssyncronisation to the getConfigurations and getDefaultConfiguration where we have kind of DCL. Sure thing. Done. ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From duke at openjdk.java.net Fri Apr 8 06:51:36 2022 From: duke at openjdk.java.net (Maxim Kartashev) Date: Fri, 8 Apr 2022 06:51:36 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v3] In-Reply-To: <6bK-iNlPfRxkowIW1_7WYUulcJ9qpcvCBgcG44Q0mHs=.e04e5fc2-d532-4684-bab1-3fd94ba58048@github.com> References: <1s3rujPqPuQFiA9xp2Rq4UoXMfP5fSpzQX_CNfl-UXw=.4b2a2871-1647-4c2f-a368-44ef8c7896c4@github.com> <6bK-iNlPfRxkowIW1_7WYUulcJ9qpcvCBgcG44Q0mHs=.e04e5fc2-d532-4684-bab1-3fd94ba58048@github.com> Message-ID: On Thu, 7 Apr 2022 23:03:26 GMT, Sergey Bylokhov wrote: >> Maxim Kartashev has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits: >> >> - Merge branch 'master' into JDK-8280468 >> - Addressed PR comments >> >> 1. Got rid of X11GraphicsDevice.configLock in favour of the AWT lock. >> 2. Reduced the use of the screen number (and, consequently, AWT lock >> contention) in XCanvasPeer. >> - 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux >> >> This fix addresses two possible causes of crashes: >> 1. makeDefaultConfig() returning NULL. The fix is to die gracefully >> instead of crashing in an attempt to de-reference a NULL pointer. >> >> 2. A race condition when the number of screens change (this is only an >> issue with the number of xinerama screens; the number of X11 screens is >> static for the duration of the X session). >> >> The race scenario: X11GraphisDevice.makeDefaultConfiguration() is called >> on EDT so the call can race with X11GraphisDevice.invalidate() that >> re-sets the screen number of the device; the latter is invoked on the >> "AWT-XAWT" thread from X11GraphicsEnvironment.rebuildDevices(). So by >> the time makeDefaultConfiguration() makes a native call with the >> device's current screen number, the x11Screens array maintained by the >> native code could have become shorter. And the native methods like >> Java_sun_awt_X11GraphicsDevice_getConfigColormap() assume that the >> screen number passed to them is always current and valid. The AWT lock >> only protects against the changes during the native methods invocation, >> but does not protect against them being called with an outdated screen >> number. >> >> The fix is to eliminate the race by protecting X11GraphisDevice.screen >> with the AWT lock. > > src/java.desktop/unix/classes/sun/awt/X11/XCanvasPeer.java line 90: > >> 88: XToolkit.awtUnlock(); >> 89: } >> 90: } > > I am not sure I understand the purpose of this method, it requests the current device for the GC, then requests the screen index of the device, and then request device by the screen index, what is the reason to do that? Why we cannot just use the device from the GC? This is just a named copy of lines 67 to 75. Since now this is the only piece of code that needs to work holding the AWT lock, I thought it best to isolate it. As I understand, the purpose of the piece is to find the "new" `X11GraphicsDevice` with the screen number same to the given "old" `GraphicsConfiguration`. ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From duke at openjdk.java.net Fri Apr 8 06:55:34 2022 From: duke at openjdk.java.net (Tejesh R) Date: Fri, 8 Apr 2022 06:55:34 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v3] In-Reply-To: References: Message-ID: > getText function returned extra endOfLine when appended. The reason was in `EditorEditorKit` class, `write(Writer out, Document doc, int pos, int len)` method, where translation happens from buffer to Out(Writer Object) if endOfLine is other than '\n' ( which is '\r\n' in windows). In order to write each line till End of line, the string till '\n' is written including '\r' and again endOfLine is written which results in extra Carriage Return. To solve this issue, a Condition is added which checks if previous character to '\n' is '\r', if true then whole string except Carriage Return ('\r') is written, else whole string till before '\n' is written. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Java coding style fix ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8122/files - new: https://git.openjdk.java.net/jdk/pull/8122/files/953fec43..f1b6e3ea Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8122&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8122&range=01-02 Stats: 9 lines in 1 file changed: 0 ins; 5 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/8122.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8122/head:pull/8122 PR: https://git.openjdk.java.net/jdk/pull/8122 From mvs at openjdk.java.net Fri Apr 8 07:08:25 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 8 Apr 2022 07:08:25 GMT Subject: RFR: 8284521: Write an automated regression test for RFE 4371575 [v2] In-Reply-To: References: Message-ID: > Write an automated regression test for [JDK-4371575](https://bugs.openjdk.java.net/browse/JDK-4371575) > > Issue: > As part of the Merlin focus project, JComponent.setRequestFocusEnabled was > deprecated and its implementation was changed to map exactly to the new > method Component.setFocusable. Scott believes that the old behavior may be > preferable. He would like to be able to specify that a Component is focusable, > and should receive focus during keyboard traversal, but that it should not > automatically take focus when the user clicks on it with the mouse. > > We are concerned that the accessibility team would be against this behavior, > and this also seems like more of a PLAF issue. Nevertheless, we should look > into it before beta ships. > > Fix: > After some discussion we decided that the best balance of the old and new would be to make this an advisory property. This property will not be synonymous with focusable. Instead our mouse listeners will check this property before requesting focus. This provides as closely as possible the old behavior, while allowing people to use the new focusable property if they don't want a component focusable at all. > > Testing: > Tested in mach5, 10 times with all the 3 available platform like macosx, windows and linux and got all Pass. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Review comment fixed: Removed unwanted directory ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8143/files - new: https://git.openjdk.java.net/jdk/pull/8143/files/79dd4c74..1f0e102f Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8143&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8143&range=00-01 Stats: 0 lines in 1 file changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8143.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8143/head:pull/8143 PR: https://git.openjdk.java.net/jdk/pull/8143 From mvs at openjdk.java.net Fri Apr 8 07:12:21 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 8 Apr 2022 07:12:21 GMT Subject: RFR: 8283507: Create a regression test for RFE 4287690 [v3] In-Reply-To: References: Message-ID: <8I-5r07BeDPRL2uLjrILbcFMQAYszp2c5xpI8v_ZM0c=.c0d2f711-1281-435b-9c83-b31d94d4a3eb@github.com> > Create a regression test for [JDK-4287690](https://bugs.openjdk.java.net/browse/JDK-4287690) > Issue description: > I want JComboBox to send an event just before the popup (drop down) list is displayed. > > Fix: > This requires some additional API targeted for major release of the JDK (1.4).The PopupMenuEvent will from the JPopupMenu will be forwarded to the JComboBox. A client of the JComboBox can register itself as a PopupMenuListener to receive the notification. > So JComboBox should send drop down events when the drop down popup is visible as well as invisible. JComboBox.addPopupMenuListener(PopupMenuListener) can be used to register for pop up events. > > Testing: > Tested using Mach5 in all platforms available(macos,linux and windows) and got all pass. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Review comment fixed: Removed unwanted directory ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7906/files - new: https://git.openjdk.java.net/jdk/pull/7906/files/38a5e19e..cba696d7 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7906&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7906&range=01-02 Stats: 0 lines in 1 file changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7906.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7906/head:pull/7906 PR: https://git.openjdk.java.net/jdk/pull/7906 From mvs at openjdk.java.net Fri Apr 8 07:14:28 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 8 Apr 2022 07:14:28 GMT Subject: RFR: 8283624: Create an automated regression test for RFE-4390885 [v2] In-Reply-To: References: Message-ID: > Write a regression test for [JDK-4390885](https://bugs.openjdk.java.net/browse/JDK-4390885) Enhancement Request. > > Issue: > Please add the ability to set the location of a JFileChooser. This might be a > bug, but JFileChooser.setLocation() has no effect when > JFileChooser.showXXXXDialog() is called. This is becoming very important as the > popularity of multiple monitors is increasing. These dialogs show up on the > wrong monitor which is really annoying. Also due to bug #4189244 I am unable to > avoid painting problems by positioning the dialog away from the menu item that > initiated it. > > Fix: > Now it's possible to set the location of Dialog in JFileChooser. > > Testing: > 1. Tested in Mach5 10 times per platform(macos,linux,windows) and got all Pass. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Review comment fixed: Removed unwanted directory ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7996/files - new: https://git.openjdk.java.net/jdk/pull/7996/files/a30b69ba..76337e2f Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7996&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7996&range=00-01 Stats: 0 lines in 1 file changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7996.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7996/head:pull/7996 PR: https://git.openjdk.java.net/jdk/pull/7996 From mvs at openjdk.java.net Fri Apr 8 07:15:42 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 8 Apr 2022 07:15:42 GMT Subject: RFR: 8284521: Write an automated regression test for RFE 4371575 [v2] In-Reply-To: References: Message-ID: On Thu, 7 Apr 2022 21:01:30 GMT, Phil Race wrote: > Before I look at the test, can you get rid of the pointless directory 4371575 A directory might be needed if you had a lot of files for the test - but you don't ! And I really don't like naming directories OR tests with the bugid. Someone can find that out from the @bug tag. > > I know you've pushed a bunch of bugs already that follow this pattern but update all the "in progress" ones to NOT create pointless extra folders. I have removed those directories from this PR and from my other open PRs https://github.com/openjdk/jdk/pull/7906 and https://github.com/openjdk/jdk/pull/7996 ------------- PR: https://git.openjdk.java.net/jdk/pull/8143 From psadhukhan at openjdk.java.net Fri Apr 8 07:59:43 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 8 Apr 2022 07:59:43 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v8] In-Reply-To: <7ot0fBLQsvKiNsxLdrbnv4R_MNr6qdLN_GBwNPjU-rY=.dcad59a1-d0d6-42b9-bdf4-6290f31a88e0@github.com> References: <7ot0fBLQsvKiNsxLdrbnv4R_MNr6qdLN_GBwNPjU-rY=.dcad59a1-d0d6-42b9-bdf4-6290f31a88e0@github.com> Message-ID: On Fri, 8 Apr 2022 00:36:54 GMT, Harshitha Onkar wrote: >> Following type properties where checked for cellFocusRing color >> >> - [alternateSelectedControlColor](https://developer.apple.com/documentation/appkit/nscolor/1533135-alternateselectedcontrolcolor) >> **Issue:** Doesn't follow accent color in macos 10.15 and deprecated property. >> >> - [selectedContentBackgroundColor](https://developer.apple.com/documentation/appkit/nscolor/2998830-selectedcontentbackgroundcolor) >> **Issue:** New property corresponding to **alternateSelectedControlColor** (deprecated). Causes build issues as the property is supported on macOS 10.14+ and the macOS deployment target version is 10.12 for jdk. >> >> - [controlAccentColor](https://developer.apple.com/documentation/appkit/nscolor/3000782-controlaccentcolor) >> **Issue:** Causes build issues due to version compatibility, property supported on only macOS 10.14+ >> >> - [accentColor](https://developer.apple.com/documentation/swiftui/color/accentcolor) >> **Issue:** Property supported on only macOS 10.15+, compatibility and run time issues. >> >> - [keyboardfocusindicatorcolor](https://developer.apple.com/documentation/appkit/nscolor/1532031-keyboardfocusindicatorcolor) >> **Issue:** Works well for most of the scenarios (including on-the-fly changes) and follows the accent color changes except when we start the application with accent color set to Graphite and then change accent color on-the-fly (as mentioned above). The cell focus ring remains gray. The issue seems to be with the system color returned by the type-property "**keyboardfocusindicatorcolor**" under this setting. > > @prrace @prsadhuk > The issue with the system color returned by **keyboardFocusIndicatorColor** mentioned above, persists on macOS 12.3 as well. "accentColor" is swift property so not usable for jdk but you can use "controlAccentColor" which seems to work with 10.15 and 12.1 as per my limited testing. You need to use @available check though.. Even though it may not work for version lesser than 10.14, I guess it's ok as those versions are more or less obsolete.. While you are it, please consider renaming this function as told. ------------- PR: https://git.openjdk.java.net/jdk/pull/7768 From psadhukhan at openjdk.java.net Fri Apr 8 08:27:46 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 8 Apr 2022 08:27:46 GMT Subject: RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v13] In-Reply-To: References: Message-ID: <_Vz970Es41a13LjV4BiYJNUXCwmctYXGzbTuCBw6DG0=.baf5d309-8697-44c1-9235-ac79e88ff3d0@github.com> On Wed, 6 Apr 2022 10:27:12 GMT, Tejesh R wrote: >> Removed the println() line from the Interrupted catch block. Since waitForID() Interrupt indicates completion of Image Loading, println as Interrupt handling was not required. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on Reiview comments if (interrupted && ((loadStatus & MediaTracker.LOADING )!= 0)) { if (interrupted && ((loadStatus & MediaTracker.LOADING) != 0)) { space at correct position ------------- Changes requested by psadhukhan (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7754 From psadhukhan at openjdk.java.net Fri Apr 8 08:41:30 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 8 Apr 2022 08:41:30 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v3] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 06:55:34 GMT, Tejesh R wrote: >> getText function returned extra endOfLine when appended. The reason was in `EditorEditorKit` class, `write(Writer out, Document doc, int pos, int len)` method, where translation happens from buffer to Out(Writer Object) if endOfLine is other than '\n' ( which is '\r\n' in windows). In order to write each line till End of line, the string till '\n' is written including '\r' and again endOfLine is written which results in extra Carriage Return. To solve this issue, a Condition is added which checks if previous character to '\n' is '\r', if true then whole string except Carriage Return ('\r') is written, else whole string till before '\n' is written. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Java coding style fix src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java line 350: > 348: } > 349: } > 350: out.write(endOfLine); It seems in windows, we use EndOfLineStringProperty property as [CRLF](https://github.com/openjdk/jdk/blob/f1b6e3ea16f06bc57e8e905fb115650e6c4ad98f/src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java#L286) and `endOfLine ` is using the above property `EndOfLineStringProperty` so when you write out.write(endOfLine) will it not write \r\n again? ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Fri Apr 8 08:51:30 2022 From: duke at openjdk.java.net (Tejesh R) Date: Fri, 8 Apr 2022 08:51:30 GMT Subject: RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v14] In-Reply-To: References: Message-ID: > Removed the println() line from the Interrupted catch block. Since waitForID() Interrupt indicates completion of Image Loading, println as Interrupt handling was not required. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on Review Comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7754/files - new: https://git.openjdk.java.net/jdk/pull/7754/files/2b5f5927..2066e000 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7754&range=13 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7754&range=12-13 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/7754.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7754/head:pull/7754 PR: https://git.openjdk.java.net/jdk/pull/7754 From duke at openjdk.java.net Fri Apr 8 08:52:56 2022 From: duke at openjdk.java.net (Tejesh R) Date: Fri, 8 Apr 2022 08:52:56 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v3] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 08:38:20 GMT, Prasanta Sadhukhan wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Java coding style fix > > src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java line 350: > >> 348: } >> 349: } >> 350: out.write(endOfLine); > > It seems in windows, we use EndOfLineStringProperty property as > [CRLF](https://github.com/openjdk/jdk/blob/f1b6e3ea16f06bc57e8e905fb115650e6c4ad98f/src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java#L286) > and `endOfLine ` is using the above property `EndOfLineStringProperty` so > when you write out.write(endOfLine) will it not write \r\n again? Yes, Write function copies string without endOfLine, and endOfLine is appended to it after the whole string is copied. Before also it was copying string without endOfLine which included '\r', now this logic copies string characters before '\r' and then appends endOfLine. ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From psadhukhan at openjdk.java.net Fri Apr 8 09:04:16 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 8 Apr 2022 09:04:16 GMT Subject: RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v14] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 08:51:30 GMT, Tejesh R wrote: >> Removed the println() line from the Interrupted catch block. Since waitForID() Interrupt indicates completion of Image Loading, println as Interrupt handling was not required. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on Review Comments test/jdk/javax/swing/ImageIcon/LoadInterruptTest.java line 61: > 59: prevSysOut = System.out; > 60: testOut = new ByteArrayOutputStream(); > 61: System.setOut(new PrintStream(testOut, true, StandardCharsets.UTF_8)); The spec says "First, if there is a security manager, its checkPermission method is called with a RuntimePermission("setIO") permission to see if it's ok to reassign the "standard" output stream." Since security manager is removed, I guess either this doc needs updation or we still need to follow this checkPermission step... ------------- PR: https://git.openjdk.java.net/jdk/pull/7754 From psadhukhan at openjdk.java.net Fri Apr 8 09:06:36 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 8 Apr 2022 09:06:36 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v3] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 08:49:36 GMT, Tejesh R wrote: >> src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java line 350: >> >>> 348: } >>> 349: } >>> 350: out.write(endOfLine); >> >> It seems in windows, we use EndOfLineStringProperty property as >> [CRLF](https://github.com/openjdk/jdk/blob/f1b6e3ea16f06bc57e8e905fb115650e6c4ad98f/src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java#L286) >> and `endOfLine ` is using the above property `EndOfLineStringProperty` so >> when you write out.write(endOfLine) will it not write \r\n again? > > Yes, Write function copies string without endOfLine, and endOfLine is appended to it after the whole string is copied. > Before also it was copying string without endOfLine which included '\r', now this logic copies string characters before '\r' and then appends endOfLine. ok, so you are telling out.write(array, last, counter - last - 1) will write till \r\n and out.write(endOfLine) will write \r\n, is it? ANyway, you need to modify this change as per coding style which is else { } ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From smandalika at openjdk.java.net Fri Apr 8 09:51:14 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Fri, 8 Apr 2022 09:51:14 GMT Subject: RFR: 8284524: Create an automated test for JDK-4422362 Message-ID: Create an automated test for [JDK-4422362](https://bugs.openjdk.java.net/browse/JDK-4422362) The BoundedRangeModel components (JScrollBar, JSlider, JProgressBar) return BoundedRangeModel.getMaximum() from getMaximumAccessibleValue() in their AccessibleValue implementation. The real maximum value (due to the constraints on BoundedRangeModel) is model.getMaximum() - model.getExtent(). The test verifies that the above is adhered to as expected. This review is for migrating tests from a closed test suite to open. Testing: The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. ------------- Commit messages: - 8284524: Create an automated test for JDK-4422362 Changes: https://git.openjdk.java.net/jdk/pull/8158/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8158&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284524 Stats: 87 lines in 1 file changed: 87 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8158.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8158/head:pull/8158 PR: https://git.openjdk.java.net/jdk/pull/8158 From aivanov at openjdk.java.net Fri Apr 8 10:13:51 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 8 Apr 2022 10:13:51 GMT Subject: RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v14] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 09:00:53 GMT, Prasanta Sadhukhan wrote: >> Tejesh R has updated the pull request incrementally with one additional commit since the last revision: >> >> Updated based on Review Comments > > test/jdk/javax/swing/ImageIcon/LoadInterruptTest.java line 61: > >> 59: prevSysOut = System.out; >> 60: testOut = new ByteArrayOutputStream(); >> 61: System.setOut(new PrintStream(testOut, true, StandardCharsets.UTF_8)); > > The spec says "First, if there is a security manager, its checkPermission method is called with a RuntimePermission("setIO") permission to see if it's ok to reassign the "standard" output stream." > > Since security manager is removed, I guess either this doc needs updation or we still need to follow this checkPermission step... What are you referring to? The javadoc to [`System.setOut`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/System.html#setOut(java.io.PrintStream)) does indeed state this. [The implementation](https://github.com/openjdk/jdk/blob/4dbebb62aa264adda8d96a06f608ef9d13155a26/src/java.base/share/classes/java/lang/System.java#L244) does exactly what it says: it calls `checkIO` method which verifies whether `"setIO"` permission is granted if `SecurityManager` is installed. I can't see what we should do about it. `SecurityManager` hasn't been removed yet. ------------- PR: https://git.openjdk.java.net/jdk/pull/7754 From duke at openjdk.java.net Fri Apr 8 10:21:22 2022 From: duke at openjdk.java.net (Tejesh R) Date: Fri, 8 Apr 2022 10:21:22 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v4] In-Reply-To: References: Message-ID: > getText function returned extra endOfLine when appended. The reason was in `EditorEditorKit` class, `write(Writer out, Document doc, int pos, int len)` method, where translation happens from buffer to Out(Writer Object) if endOfLine is other than '\n' ( which is '\r\n' in windows). In order to write each line till End of line, the string till '\n' is written including '\r' and again endOfLine is written which results in extra Carriage Return. To solve this issue, a Condition is added which checks if previous character to '\n' is '\r', if true then whole string except Carriage Return ('\r') is written, else whole string till before '\n' is written. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on Review Comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8122/files - new: https://git.openjdk.java.net/jdk/pull/8122/files/f1b6e3ea..2369b965 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8122&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8122&range=02-03 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8122.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8122/head:pull/8122 PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Fri Apr 8 10:21:22 2022 From: duke at openjdk.java.net (Tejesh R) Date: Fri, 8 Apr 2022 10:21:22 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v3] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 09:02:53 GMT, Prasanta Sadhukhan wrote: > ok, so you are telling out.write(array, last, counter - last - 1) will write till \r\n and out.write(endOfLine) will write \r\n, is it? Yes. ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From psadhukhan at openjdk.java.net Fri Apr 8 11:22:39 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 8 Apr 2022 11:22:39 GMT Subject: RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v14] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 10:10:09 GMT, Alexey Ivanov wrote: >> test/jdk/javax/swing/ImageIcon/LoadInterruptTest.java line 61: >> >>> 59: prevSysOut = System.out; >>> 60: testOut = new ByteArrayOutputStream(); >>> 61: System.setOut(new PrintStream(testOut, true, StandardCharsets.UTF_8)); >> >> The spec says "First, if there is a security manager, its checkPermission method is called with a RuntimePermission("setIO") permission to see if it's ok to reassign the "standard" output stream." >> >> Since security manager is removed, I guess either this doc needs updation or we still need to follow this checkPermission step... > > What are you referring to? > > The javadoc to [`System.setOut`](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/System.html#setOut(java.io.PrintStream)) does indeed state this. [The implementation](https://github.com/openjdk/jdk/blob/4dbebb62aa264adda8d96a06f608ef9d13155a26/src/java.base/share/classes/java/lang/System.java#L244) does exactly what it says: it calls `checkIO` method which verifies whether `"setIO"` permission is granted if `SecurityManager` is installed. > > I can't see what we should do about it. `SecurityManager` hasn't been removed yet. Yeah, right..I was thinking something else.. ------------- PR: https://git.openjdk.java.net/jdk/pull/7754 From psadhukhan at openjdk.java.net Fri Apr 8 11:22:38 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 8 Apr 2022 11:22:38 GMT Subject: RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v14] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 08:51:30 GMT, Tejesh R wrote: >> Removed the println() line from the Interrupted catch block. Since waitForID() Interrupt indicates completion of Image Loading, println as Interrupt handling was not required. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on Review Comments Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7754 From psadhukhan at openjdk.java.net Fri Apr 8 11:34:42 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 8 Apr 2022 11:34:42 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v3] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 10:14:58 GMT, Tejesh R wrote: >> ok, so you are telling out.write(array, last, counter - last - 1) will write till \r\n and out.write(endOfLine) will write \r\n, is it? >> ANyway, you need to modify this change as per coding style which is >> >> else { >> } > >> ok, so you are telling out.write(array, last, counter - last - 1) will write till \r\n and out.write(endOfLine) will write \r\n, is it? > > Yes. So, presently it was writing /r/n/r/n and with fix, it will write /r/n, right? ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Fri Apr 8 11:34:42 2022 From: duke at openjdk.java.net (Tejesh R) Date: Fri, 8 Apr 2022 11:34:42 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v3] In-Reply-To: References: Message-ID: <2ZRkMEq3rdKsQhuXPBOn7SDol6WonbSOL0eKTZiymps=.1bc7e7b5-2a51-45f1-a308-add92e8d5dd6@github.com> On Fri, 8 Apr 2022 11:25:36 GMT, Prasanta Sadhukhan wrote: >>> ok, so you are telling out.write(array, last, counter - last - 1) will write till \r\n and out.write(endOfLine) will write \r\n, is it? >> >> Yes. > > So, presently it was writing /r/n/r/n and with fix, it will write /r/n, right? No, presently it was writing /r/r/n and with fix it will write /r/n for every line ending...... /r was causing for carriage return and /r/n for an extra empty line on Text pane....... ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From psadhukhan at openjdk.java.net Fri Apr 8 11:34:42 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 8 Apr 2022 11:34:42 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v3] In-Reply-To: <2ZRkMEq3rdKsQhuXPBOn7SDol6WonbSOL0eKTZiymps=.1bc7e7b5-2a51-45f1-a308-add92e8d5dd6@github.com> References: <2ZRkMEq3rdKsQhuXPBOn7SDol6WonbSOL0eKTZiymps=.1bc7e7b5-2a51-45f1-a308-add92e8d5dd6@github.com> Message-ID: On Fri, 8 Apr 2022 11:28:26 GMT, Tejesh R wrote: >> So, presently it was writing /r/n/r/n and with fix, it will write /r/n, right? > > No, presently it was writing /r/r/n and with fix it will write /r/n for every line ending...... /r was causing for carriage return and /r/n for an extra empty line on Text pane....... But should /r/r/n cause 2 line feeds? /r should be just carriage return to cause caret to move from last column to first, why it is inserting new line? ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From aivanov at openjdk.java.net Fri Apr 8 11:36:41 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 8 Apr 2022 11:36:41 GMT Subject: RFR: 8257810: Only First page are printed in JTable.scrollRectToVisible [v3] In-Reply-To: References: Message-ID: On Thu, 7 Apr 2022 14:59:38 GMT, Prasanta Sadhukhan wrote: >> Issue was when printing a JTable which sits inside a JScrollPane and the table is scrolled down to the end to about 1000th row, only the first page is printed. >> This is because when the table is scrolled down to last page, the bounds.y becomes -ve >> [x=0,y=-15260,width=968,height=16000] >> so the check `if (!((table.getBounds()).intersects(clip)))` is satisfied only for 1st page where bounds just intersects the clip [x=0,y=0,width=968,height=1296] >> but subsequent pages clip >> [[x=0,y=1296,width=968,height=1296], >> [x=0,y=2592,width=968,height=1296], >> [x=0,y=3888,width=968,height=1296] etc is not intesecting so they are not printed >> >> This is a regression of JDK-8081491 which was **reworked** in JDK-8236907 where the bounds calculation and usage is made same as in BasicTableUI >> We need to use the same resetted bounds for this intersection calculation too as was done for JDK-8236907 >> >> Tested against JDK-8081491, 8170349, JDK-8236907 testcases along with other regression tests and all are OK (link in JBS) > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Test updated Closing the dialog or the frame should fail the test as well. test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 31: > 29: import java.awt.BorderLayout; > 30: import java.awt.FlowLayout; > 31: import java.awt.Rectangle; This is an unused import. test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 75: > 73: ret = latch.await(5, TimeUnit.MINUTES); > 74: > 75: if (!ret) { Suggestion: if (!latch.await(5, TimeUnit.MINUTES)) { The variable is redundant now. test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 79: > 77: } > 78: > 79: if (testResult == false) { Suggestion: if (!testResult) { Looks cleaner, doesn't it? And produces no warning in the IDE. test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 85: > 83: SwingUtilities.invokeAndWait(() -> { > 84: dispose(); > 85: }); I prefer method references in this case yet I don't insist. However, this fits perfectly with the usages above. test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 147: > 145: failButton.addActionListener((e) -> { > 146: testResult = false; > 147: dispose(); Now that the UI is always dispose of in a finally block, the button handlers can skip the call to `dispose()`. ------------- Changes requested by aivanov (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8141 From aivanov at openjdk.java.net Fri Apr 8 11:43:39 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 8 Apr 2022 11:43:39 GMT Subject: RFR: 8257810: Only First page are printed in JTable.scrollRectToVisible [v3] In-Reply-To: References: Message-ID: On Thu, 7 Apr 2022 14:59:38 GMT, Prasanta Sadhukhan wrote: >> Issue was when printing a JTable which sits inside a JScrollPane and the table is scrolled down to the end to about 1000th row, only the first page is printed. >> This is because when the table is scrolled down to last page, the bounds.y becomes -ve >> [x=0,y=-15260,width=968,height=16000] >> so the check `if (!((table.getBounds()).intersects(clip)))` is satisfied only for 1st page where bounds just intersects the clip [x=0,y=0,width=968,height=1296] >> but subsequent pages clip >> [[x=0,y=1296,width=968,height=1296], >> [x=0,y=2592,width=968,height=1296], >> [x=0,y=3888,width=968,height=1296] etc is not intesecting so they are not printed >> >> This is a regression of JDK-8081491 which was **reworked** in JDK-8236907 where the bounds calculation and usage is made same as in BasicTableUI >> We need to use the same resetted bounds for this intersection calculation too as was done for JDK-8236907 >> >> Tested against JDK-8081491, 8170349, JDK-8236907 testcases along with other regression tests and all are OK (link in JBS) > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Test updated You should consider adding the evaluation from this PR description to JBS. ------------- PR: https://git.openjdk.java.net/jdk/pull/8141 From aivanov at openjdk.java.net Fri Apr 8 11:46:41 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 8 Apr 2022 11:46:41 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v3] In-Reply-To: References: <2ZRkMEq3rdKsQhuXPBOn7SDol6WonbSOL0eKTZiymps=.1bc7e7b5-2a51-45f1-a308-add92e8d5dd6@github.com> Message-ID: <-FpNep3YcVVj4Ks6j0DwT9JFOvoDjvtKlkiDTnzgPBM=.33b32aa5-f23c-4593-9bf9-d965e5b43859@github.com> On Fri, 8 Apr 2022 11:31:07 GMT, Prasanta Sadhukhan wrote: >> No, presently it was writing /r/r/n and with fix it will write /r/n for every line ending...... /r was causing for carriage return and /r/n for an extra empty line on Text pane....... > > But should /r/r/n cause 2 line feeds? /r should be just carriage return to cause caret to move from last column to first, why it is inserting new line? It is common to treat `\r` as new line if it's not followed by `\n`. In a visual editor `\r` doesn't do anything. Yet it's an interesting detail that wasn't covered in the initial evaluation. ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From aivanov at openjdk.java.net Fri Apr 8 11:49:52 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 8 Apr 2022 11:49:52 GMT Subject: RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v14] In-Reply-To: References: Message-ID: <5Uq9hA-i67ieaWfqL4n4KBQBCqQ9hoM2zg9WEOT2JJM=.57da27fa-f141-4ff1-9b4f-00c3fc36215b@github.com> On Fri, 8 Apr 2022 08:51:30 GMT, Tejesh R wrote: >> Removed the println() line from the Interrupted catch block. Since waitForID() Interrupt indicates completion of Image Loading, println as Interrupt handling was not required. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on Review Comments Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7754 From aivanov at openjdk.java.net Fri Apr 8 11:51:41 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 8 Apr 2022 11:51:41 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v2] In-Reply-To: References: <_UplvB0h9bWCInEGLRAN4bN3_sMypgu0hf0nU57pJgI=.8eef0557-500c-4939-b00f-ae9c0dd5a5b8@github.com> Message-ID: On Thu, 7 Apr 2022 16:04:35 GMT, Tejesh R wrote: > > > > > Why can't the test be automatic? > > Actually had thought about automating the test case, but since endOfLine(Win - '\r\n', linux - '\n') is different for different OS, have made it manual. It just means the original issue is observed on Windows only. Does it make sense to require Windows to run this test? ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From psadhukhan at openjdk.java.net Fri Apr 8 11:54:41 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 8 Apr 2022 11:54:41 GMT Subject: RFR: 8257810: Only First page are printed in JTable.scrollRectToVisible [v4] In-Reply-To: References: Message-ID: > Issue was when printing a JTable which sits inside a JScrollPane and the table is scrolled down to the end to about 1000th row, only the first page is printed. > This is because when the table is scrolled down to last page, the bounds.y becomes -ve > [x=0,y=-15260,width=968,height=16000] > so the check `if (!((table.getBounds()).intersects(clip)))` is satisfied only for 1st page where bounds just intersects the clip [x=0,y=0,width=968,height=1296] > but subsequent pages clip > [[x=0,y=1296,width=968,height=1296], > [x=0,y=2592,width=968,height=1296], > [x=0,y=3888,width=968,height=1296] etc is not intesecting so they are not printed > > This is a regression of JDK-8081491 which was **reworked** in JDK-8236907 where the bounds calculation and usage is made same as in BasicTableUI > We need to use the same resetted bounds for this intersection calculation too as was done for JDK-8236907 > > Tested against JDK-8081491, 8170349, JDK-8236907 testcases along with other regression tests and all are OK (link in JBS) Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Test fix ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8141/files - new: https://git.openjdk.java.net/jdk/pull/8141/files/635b90aa..46edf56f Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8141&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8141&range=02-03 Stats: 9 lines in 1 file changed: 0 ins; 6 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/8141.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8141/head:pull/8141 PR: https://git.openjdk.java.net/jdk/pull/8141 From psadhukhan at openjdk.java.net Fri Apr 8 11:58:03 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 8 Apr 2022 11:58:03 GMT Subject: RFR: 8257810: Only First page are printed in JTable.scrollRectToVisible [v5] In-Reply-To: References: Message-ID: <2aOfA0_sisjZW3Ahw_yLLf0MyEereMcL1Jra0AoofPE=.83e4ed58-96b1-4c0e-b41c-7ed93cb371cf@github.com> > Issue was when printing a JTable which sits inside a JScrollPane and the table is scrolled down to the end to about 1000th row, only the first page is printed. > This is because when the table is scrolled down to last page, the bounds.y becomes -ve > [x=0,y=-15260,width=968,height=16000] > so the check `if (!((table.getBounds()).intersects(clip)))` is satisfied only for 1st page where bounds just intersects the clip [x=0,y=0,width=968,height=1296] > but subsequent pages clip > [[x=0,y=1296,width=968,height=1296], > [x=0,y=2592,width=968,height=1296], > [x=0,y=3888,width=968,height=1296] etc is not intesecting so they are not printed > > This is a regression of JDK-8081491 which was **reworked** in JDK-8236907 where the bounds calculation and usage is made same as in BasicTableUI > We need to use the same resetted bounds for this intersection calculation too as was done for JDK-8236907 > > Tested against JDK-8081491, 8170349, JDK-8236907 testcases along with other regression tests and all are OK (link in JBS) Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Test fix ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8141/files - new: https://git.openjdk.java.net/jdk/pull/8141/files/46edf56f..c8cffba7 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8141&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8141&range=03-04 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8141.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8141/head:pull/8141 PR: https://git.openjdk.java.net/jdk/pull/8141 From psadhukhan at openjdk.java.net Fri Apr 8 12:01:45 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 8 Apr 2022 12:01:45 GMT Subject: RFR: 8257810: Only First page are printed in JTable.scrollRectToVisible [v3] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 11:40:47 GMT, Alexey Ivanov wrote: > You should consider adding the evaluation from this PR description to JBS. yeah sure. ------------- PR: https://git.openjdk.java.net/jdk/pull/8141 From aivanov at openjdk.java.net Fri Apr 8 12:02:41 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 8 Apr 2022 12:02:41 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v4] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 10:21:22 GMT, Tejesh R wrote: >> getText function returned extra endOfLine when appended. The reason was in `EditorEditorKit` class, `write(Writer out, Document doc, int pos, int len)` method, where translation happens from buffer to Out(Writer Object) if endOfLine is other than '\n' ( which is '\r\n' in windows). In order to write each line till End of line, the string till '\n' is written including '\r' and again endOfLine is written which results in extra Carriage Return. To solve this issue, a Condition is added which checks if previous character to '\n' is '\r', if true then whole string except Carriage Return ('\r') is written, else whole string till before '\n' is written. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on Review Comments I am still for automating the test. It may even be headless, I think. src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java line 342: > 340: if (array[counter] == '\n') { > 341: if (counter > last) { > 342: if(array[counter-1] == '\r') { The space between if and the opening parenthesis is still missing. The spaces around `-` are also missing. src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java line 345: > 343: out.write(array, last, counter - last - 1); > 344: } > 345: else { else should be on the same line as the previous closing brace. test/jdk/javax/swing/JTextPane/8180276/ChangeStyleAndAppend.java line 60: > 58: Document doc = this.getDocument(); > 59: doc.insertString(doc.getLength(), s + System.lineSeparator(), null); > 60: } catch(BadLocationException e) { Suggestion: } catch (BadLocationException e) { The should be space between `catch` keyword and the opening parenthesis. ------------- Changes requested by aivanov (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Fri Apr 8 12:02:41 2022 From: duke at openjdk.java.net (Tejesh R) Date: Fri, 8 Apr 2022 12:02:41 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v3] In-Reply-To: <-FpNep3YcVVj4Ks6j0DwT9JFOvoDjvtKlkiDTnzgPBM=.33b32aa5-f23c-4593-9bf9-d965e5b43859@github.com> References: <2ZRkMEq3rdKsQhuXPBOn7SDol6WonbSOL0eKTZiymps=.1bc7e7b5-2a51-45f1-a308-add92e8d5dd6@github.com> <-FpNep3YcVVj4Ks6j0DwT9JFOvoDjvtKlkiDTnzgPBM=.33b32aa5-f23c-4593-9bf9-d965e5b43859@github.com> Message-ID: On Fri, 8 Apr 2022 11:43:26 GMT, Alexey Ivanov wrote: >> But should /r/r/n cause 2 line feeds? /r should be just carriage return to cause caret to move from last column to first, why it is inserting new line? > > It is common to treat `\r` as new line if it's not followed by `\n`. In a visual editor `\r` doesn't do anything. > > Yet it's an interesting detail that wasn't covered in the initial evaluation. > But should /r/r/n cause 2 line feeds? /r should be just carriage return to cause caret to move from last column to first, why it is inserting new line? \r is converted to \n in setText method....... To be specific, in `read(Reader in, Document doc, int pos)` method of DefaultEditorKit class...... ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From psadhukhan at openjdk.java.net Fri Apr 8 12:02:41 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 8 Apr 2022 12:02:41 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v3] In-Reply-To: References: <2ZRkMEq3rdKsQhuXPBOn7SDol6WonbSOL0eKTZiymps=.1bc7e7b5-2a51-45f1-a308-add92e8d5dd6@github.com> <-FpNep3YcVVj4Ks6j0DwT9JFOvoDjvtKlkiDTnzgPBM=.33b32aa5-f23c-4593-9bf9-d965e5b43859@github.com> Message-ID: <3CuKW76cyPjXhXxLQDfs59Yf48zWds3hE6ScCkJtrW4=.0a7c4662-3d04-480e-ae05-fff5b6e01246@github.com> On Fri, 8 Apr 2022 11:54:02 GMT, Tejesh R wrote: >> It is common to treat `\r` as new line if it's not followed by `\n`. In a visual editor `\r` doesn't do anything. >> >> Yet it's an interesting detail that wasn't covered in the initial evaluation. > >> But should /r/r/n cause 2 line feeds? /r should be just carriage return to cause caret to move from last column to first, why it is inserting new line? > > \r is converted to \n in setText method....... To be specific, in `read(Reader in, Document doc, int pos)` method of DefaultEditorKit class...... So, that means presently it is writing /n/r/n not /r/r/n, right? ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Fri Apr 8 12:02:42 2022 From: duke at openjdk.java.net (Tejesh R) Date: Fri, 8 Apr 2022 12:02:42 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v3] In-Reply-To: <3CuKW76cyPjXhXxLQDfs59Yf48zWds3hE6ScCkJtrW4=.0a7c4662-3d04-480e-ae05-fff5b6e01246@github.com> References: <2ZRkMEq3rdKsQhuXPBOn7SDol6WonbSOL0eKTZiymps=.1bc7e7b5-2a51-45f1-a308-add92e8d5dd6@github.com> <-FpNep3YcVVj4Ks6j0DwT9JFOvoDjvtKlkiDTnzgPBM=.33b32aa5-f23c-4593-9bf9-d965e5b43859@github.com> <3CuKW76cyPjXhXxLQDfs59Yf48zWds3hE6ScCkJtrW4=.0a7c4662-3d04-480e-ae05-fff5b6e01246@github.com> Message-ID: On Fri, 8 Apr 2022 11:56:36 GMT, Prasanta Sadhukhan wrote: >>> But should /r/r/n cause 2 line feeds? /r should be just carriage return to cause caret to move from last column to first, why it is inserting new line? >> >> \r is converted to \n in setText method....... To be specific, in `read(Reader in, Document doc, int pos)` method of DefaultEditorKit class...... > > So, that means presently it is writing /n/r/n not /r/r/n, right? Initially it is /r/r/n from `getText()` of pane0, later it is /n/r/n from `setText()`.... ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Fri Apr 8 12:17:37 2022 From: duke at openjdk.java.net (Tejesh R) Date: Fri, 8 Apr 2022 12:17:37 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v5] In-Reply-To: References: Message-ID: > getText function returned extra endOfLine when appended. The reason was in `EditorEditorKit` class, `write(Writer out, Document doc, int pos, int len)` method, where translation happens from buffer to Out(Writer Object) if endOfLine is other than '\n' ( which is '\r\n' in windows). In order to write each line till End of line, the string till '\n' is written including '\r' and again endOfLine is written which results in extra Carriage Return. To solve this issue, a Condition is added which checks if previous character to '\n' is '\r', if true then whole string except Carriage Return ('\r') is written, else whole string till before '\n' is written. Tejesh R has updated the pull request incrementally with one additional commit since the last revision: Updated based on Review Comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8122/files - new: https://git.openjdk.java.net/jdk/pull/8122/files/2369b965..b4b9a0f3 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8122&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8122&range=03-04 Stats: 4 lines in 2 files changed: 0 ins; 1 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/8122.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8122/head:pull/8122 PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Fri Apr 8 12:17:38 2022 From: duke at openjdk.java.net (Tejesh R) Date: Fri, 8 Apr 2022 12:17:38 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v2] In-Reply-To: References: <_UplvB0h9bWCInEGLRAN4bN3_sMypgu0hf0nU57pJgI=.8eef0557-500c-4939-b00f-ae9c0dd5a5b8@github.com> Message-ID: On Fri, 8 Apr 2022 11:48:24 GMT, Alexey Ivanov wrote: > > > > > > > > > > Why can't the test be automatic? > > > > > > Actually had thought about automating the test case, but since endOfLine(Win - '\r\n', linux - '\n') is different for different OS, have made it manual. > > It just means the original issue is observed on Windows only. > > Does it make sense to require Windows to run this test? Yes, the original issue was observed and raised in Windows alone...... In Mac and Linux the control wont even enters this logic - if (endOfLineProperty != null && !endOfLine.equals("\n")) { // There is an end of line string that isn't \n, have to iterate // through and find all \n's and translate to end of line string. Hence no issue in Mac and Linux..... The issue is observed only in Windows...... ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From psadhukhan at openjdk.java.net Fri Apr 8 12:17:38 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 8 Apr 2022 12:17:38 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v3] In-Reply-To: References: <2ZRkMEq3rdKsQhuXPBOn7SDol6WonbSOL0eKTZiymps=.1bc7e7b5-2a51-45f1-a308-add92e8d5dd6@github.com> <-FpNep3YcVVj4Ks6j0DwT9JFOvoDjvtKlkiDTnzgPBM=.33b32aa5-f23c-4593-9bf9-d965e5b43859@github.com> <3CuKW76cyPjXhXxLQDfs59Yf48zWds3hE6ScCkJtrW4=.0a7c4662-3d04-480e-ae05-fff5b6e01246@github.com> Message-ID: On Fri, 8 Apr 2022 11:59:19 GMT, Tejesh R wrote: >> So, that means presently it is writing /n/r/n not /r/r/n, right? > > Initially it is /r/r/n from `getText()` of pane0, later it is /n/r/n from `setText()`.... When you do out.write(array, last, counter - last); in write(Writer out, Document doc, int pos, int len) method, what is being written? Is it /r/r/n or /n/r/n presently? ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Fri Apr 8 12:17:38 2022 From: duke at openjdk.java.net (Tejesh R) Date: Fri, 8 Apr 2022 12:17:38 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v3] In-Reply-To: References: <2ZRkMEq3rdKsQhuXPBOn7SDol6WonbSOL0eKTZiymps=.1bc7e7b5-2a51-45f1-a308-add92e8d5dd6@github.com> <-FpNep3YcVVj4Ks6j0DwT9JFOvoDjvtKlkiDTnzgPBM=.33b32aa5-f23c-4593-9bf9-d965e5b43859@github.com> <3CuKW76cyPjXhXxLQDfs59Yf48zWds3hE6ScCkJtrW4=.0a7c4662-3d04-480e-ae05-fff5b6e01246@github.com> Message-ID: <284j1Ufc8yZ-aZh9x1_2tbpmHu5PQJNm3YRFbBtH7cs=.be3de3a8-ed97-4036-9d30-1f1d0c6e9a60@github.com> On Fri, 8 Apr 2022 12:08:07 GMT, Prasanta Sadhukhan wrote: >> Initially it is /r/r/n from `getText()` of pane0, later it is /n/r/n from `setText()`.... > > When you do out.write(array, last, counter - last); in write(Writer out, Document doc, int pos, int len) method, what is being written? Is it /r/r/n or /n/r/n presently? Finally its /n/r/n....... I mentioned /r/r/n because that was the output string from `getText()` method to `setText()` method...... ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From aivanov at openjdk.java.net Fri Apr 8 12:27:45 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 8 Apr 2022 12:27:45 GMT Subject: RFR: 8257810: Only First page are printed in JTable.scrollRectToVisible [v5] In-Reply-To: <2aOfA0_sisjZW3Ahw_yLLf0MyEereMcL1Jra0AoofPE=.83e4ed58-96b1-4c0e-b41c-7ed93cb371cf@github.com> References: <2aOfA0_sisjZW3Ahw_yLLf0MyEereMcL1Jra0AoofPE=.83e4ed58-96b1-4c0e-b41c-7ed93cb371cf@github.com> Message-ID: On Fri, 8 Apr 2022 11:58:03 GMT, Prasanta Sadhukhan wrote: >> Issue was when printing a JTable which sits inside a JScrollPane and the table is scrolled down to the end to about 1000th row, only the first page is printed. >> This is because when the table is scrolled down to last page, the bounds.y becomes -ve >> [x=0,y=-15260,width=968,height=16000] >> so the check `if (!((table.getBounds()).intersects(clip)))` is satisfied only for 1st page where bounds just intersects the clip [x=0,y=0,width=968,height=1296] >> but subsequent pages clip >> [[x=0,y=1296,width=968,height=1296], >> [x=0,y=2592,width=968,height=1296], >> [x=0,y=3888,width=968,height=1296] etc is not intesecting so they are not printed >> >> This is a regression of JDK-8081491 which was **reworked** in JDK-8236907 where the bounds calculation and usage is made same as in BasicTableUI >> We need to use the same resetted bounds for this intersection calculation too as was done for JDK-8236907 >> >> Tested against JDK-8081491, 8170349, JDK-8236907 testcases along with other regression tests and all are OK (link in JBS) > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Test fix Changes requested by aivanov (Reviewer). test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 51: > 49: static JTable table; > 50: static boolean testResult = false; > 51: static CountDownLatch latch = new CountDownLatch(1); `testResult` should be `volatile`. `latch` should rather be `final`. test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 64: > 62: SwingUtilities.invokeAndWait(() -> { > 63: try { > 64: table.print(); If user click Cancel in the print dialog, the `print` method returns `false`. The test should fail in this case. test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 72: > 70: // wait for latch to complete > 71: if (!latch.await(5, TimeUnit.MINUTES)) { > 72: throw new RuntimeException(" User has not executed the test"); Wouldn't the message "The test timed out" be clearer? test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 152: > 150: mainPanel.add(buttonPanel, BorderLayout.SOUTH); > 151: dialog.add(mainPanel); > 152: dialog.setUndecorated(true); It doesn't prevent you from using Alt+F4 to close the window but makes experience worse. Is it possible to use JFrame instead of JDialog to display instructions? If I accidentally switch to another window which overlaps the dialog, there's no way to bring it to the top other than minimizing all the windows that might overlap the dialog. If it's a frame, it's displayed in the Taskbar. ------------- PR: https://git.openjdk.java.net/jdk/pull/8141 From aivanov at openjdk.java.net Fri Apr 8 12:33:44 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 8 Apr 2022 12:33:44 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v3] In-Reply-To: <284j1Ufc8yZ-aZh9x1_2tbpmHu5PQJNm3YRFbBtH7cs=.be3de3a8-ed97-4036-9d30-1f1d0c6e9a60@github.com> References: <2ZRkMEq3rdKsQhuXPBOn7SDol6WonbSOL0eKTZiymps=.1bc7e7b5-2a51-45f1-a308-add92e8d5dd6@github.com> <-FpNep3YcVVj4Ks6j0DwT9JFOvoDjvtKlkiDTnzgPBM=.33b32aa5-f23c-4593-9bf9-d965e5b43859@github.com> <3CuKW76cyPjXhXxLQDfs59Yf48zWds3hE6ScCkJtrW4=.0a7c4662-3d04-480e-ae05-fff5b6e01246@github.com> <284j1Ufc8yZ-aZh9x1_2tbpmHu5PQJNm3YRFbBtH7cs=.be3de3a8-ed97-4036-9d30-1f1d0c6e9a60@github.com> Message-ID: On Fri, 8 Apr 2022 12:13:03 GMT, Tejesh R wrote: >> When you do out.write(array, last, counter - last); in write(Writer out, Document doc, int pos, int len) method, what is being written? Is it /r/r/n or /n/r/n presently? > > Finally its /n/r/n....... I mentioned /r/r/n because that was the output string from `getText()` method to `setText()` method...... Let me summarise: Initially, `getText()` wrote out `\r\r\n` for the sequence of `\r\n` in the document. Then `setText()` converted `\r\r\n` to `\n\r\n` or rather `\n\n` which resulted in the additional blank line in the editor. The updated code makes sure the additional `\r` isn't added when the text already contains `\r` as part of new line sequence. Is it correct? ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From aivanov at openjdk.java.net Fri Apr 8 12:40:45 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 8 Apr 2022 12:40:45 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v5] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 12:17:37 GMT, Tejesh R wrote: >> getText function returned extra endOfLine when appended. The reason was in `EditorEditorKit` class, `write(Writer out, Document doc, int pos, int len)` method, where translation happens from buffer to Out(Writer Object) if endOfLine is other than '\n' ( which is '\r\n' in windows). In order to write each line till End of line, the string till '\n' is written including '\r' and again endOfLine is written which results in extra Carriage Return. To solve this issue, a Condition is added which checks if previous character to '\n' is '\r', if true then whole string except Carriage Return ('\r') is written, else whole string till before '\n' is written. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on Review Comments What happens if you add `\r` to an arbitrary location in text? What happens if you read in such a text? ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From psadhukhan at openjdk.java.net Fri Apr 8 12:41:30 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 8 Apr 2022 12:41:30 GMT Subject: RFR: 8257810: Only First page are printed in JTable.scrollRectToVisible [v5] In-Reply-To: References: <2aOfA0_sisjZW3Ahw_yLLf0MyEereMcL1Jra0AoofPE=.83e4ed58-96b1-4c0e-b41c-7ed93cb371cf@github.com> Message-ID: On Fri, 8 Apr 2022 12:18:38 GMT, Alexey Ivanov wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Test fix > > test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 152: > >> 150: mainPanel.add(buttonPanel, BorderLayout.SOUTH); >> 151: dialog.add(mainPanel); >> 152: dialog.setUndecorated(true); > > It doesn't prevent you from using Alt+F4 to close the window but makes experience worse. > > Is it possible to use JFrame instead of JDialog to display instructions? > > If I accidentally switch to another window which overlaps the dialog, there's no way to bring it to the top other than minimizing all the windows that might overlap the dialog. If it's a frame, it's displayed in the Taskbar. I will rather not make the test more complicated...it's not a test fix..it just to verify the product fix.. I am not able to close in windows using ALT+F4 anyway... Other suggestions accepted... ------------- PR: https://git.openjdk.java.net/jdk/pull/8141 From psadhukhan at openjdk.java.net Fri Apr 8 12:41:29 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 8 Apr 2022 12:41:29 GMT Subject: RFR: 8257810: Only First page are printed in JTable.scrollRectToVisible [v6] In-Reply-To: References: Message-ID: <90HJ1IkePEPjEC_84YWQEBhdiPg45Fhdk8bl8opy1Yg=.0e82edc6-20d3-4cf3-97b7-c06145fd0572@github.com> > Issue was when printing a JTable which sits inside a JScrollPane and the table is scrolled down to the end to about 1000th row, only the first page is printed. > This is because when the table is scrolled down to last page, the bounds.y becomes -ve > [x=0,y=-15260,width=968,height=16000] > so the check `if (!((table.getBounds()).intersects(clip)))` is satisfied only for 1st page where bounds just intersects the clip [x=0,y=0,width=968,height=1296] > but subsequent pages clip > [[x=0,y=1296,width=968,height=1296], > [x=0,y=2592,width=968,height=1296], > [x=0,y=3888,width=968,height=1296] etc is not intesecting so they are not printed > > This is a regression of JDK-8081491 which was **reworked** in JDK-8236907 where the bounds calculation and usage is made same as in BasicTableUI > We need to use the same resetted bounds for this intersection calculation too as was done for JDK-8236907 > > Tested against JDK-8081491, 8170349, JDK-8236907 testcases along with other regression tests and all are OK (link in JBS) Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Test fix ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8141/files - new: https://git.openjdk.java.net/jdk/pull/8141/files/c8cffba7..3cee561e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8141&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8141&range=04-05 Stats: 9 lines in 1 file changed: 5 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/8141.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8141/head:pull/8141 PR: https://git.openjdk.java.net/jdk/pull/8141 From zgu at openjdk.java.net Fri Apr 8 13:29:39 2022 From: zgu at openjdk.java.net (Zhengyu Gu) Date: Fri, 8 Apr 2022 13:29:39 GMT Subject: RFR: 8284093: Memory leak: X11SD_DisposeXImage should also free obdata In-Reply-To: <1X0DLnuKgL-jVip5RrGZZcxQof6Z0njfXDrymX1lojs=.35d58243-f34c-4737-a217-6118ebead825@github.com> References: <1X0DLnuKgL-jVip5RrGZZcxQof6Z0njfXDrymX1lojs=.35d58243-f34c-4737-a217-6118ebead825@github.com> Message-ID: On Thu, 31 Mar 2022 13:30:40 GMT, Zhengyu Gu wrote: > Please review this small patch to fix leaking `XShmSegmentInfo` that is attached to `XImage`. > > Test: > > - [x] jdk_2d Friendly ping! May I have a second review? Thanks ------------- PR: https://git.openjdk.java.net/jdk/pull/8060 From aivanov at openjdk.java.net Fri Apr 8 14:43:43 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 8 Apr 2022 14:43:43 GMT Subject: RFR: 8257810: Only First page are printed in JTable.scrollRectToVisible [v6] In-Reply-To: <90HJ1IkePEPjEC_84YWQEBhdiPg45Fhdk8bl8opy1Yg=.0e82edc6-20d3-4cf3-97b7-c06145fd0572@github.com> References: <90HJ1IkePEPjEC_84YWQEBhdiPg45Fhdk8bl8opy1Yg=.0e82edc6-20d3-4cf3-97b7-c06145fd0572@github.com> Message-ID: On Fri, 8 Apr 2022 12:41:29 GMT, Prasanta Sadhukhan wrote: >> Issue was when printing a JTable which sits inside a JScrollPane and the table is scrolled down to the end to about 1000th row, only the first page is printed. >> This is because when the table is scrolled down to last page, the bounds.y becomes -ve >> [x=0,y=-15260,width=968,height=16000] >> so the check `if (!((table.getBounds()).intersects(clip)))` is satisfied only for 1st page where bounds just intersects the clip [x=0,y=0,width=968,height=1296] >> but subsequent pages clip >> [[x=0,y=1296,width=968,height=1296], >> [x=0,y=2592,width=968,height=1296], >> [x=0,y=3888,width=968,height=1296] etc is not intesecting so they are not printed >> >> This is a regression of JDK-8081491 which was **reworked** in JDK-8236907 where the bounds calculation and usage is made same as in BasicTableUI >> We need to use the same resetted bounds for this intersection calculation too as was done for JDK-8236907 >> >> Tested against JDK-8081491, 8170349, JDK-8236907 testcases along with other regression tests and all are OK (link in JBS) > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Test fix Changes requested by aivanov (Reviewer). > I will rather not make the test more complicated...it's not a test fix..it just to verify the product fix.. > I am not able to close in windows using ALT+F4 anyway... > Other suggestions accepted... It doesn't make the code *too* complicated. And it makes it complete so that it can be used as the start for other tests. Would you be able to apply the following patch? diff --git a/test/jdk/javax/swing/JTable/PrintAllPagesTest.java b/test/jdk/javax/swing/JTable/PrintAllPagesTest.java index ec0066088bd..8c61639d03d 100644 --- a/test/jdk/javax/swing/JTable/PrintAllPagesTest.java +++ b/test/jdk/javax/swing/JTable/PrintAllPagesTest.java @@ -28,6 +28,8 @@ */ import java.awt.BorderLayout; import java.awt.FlowLayout; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; import java.awt.print.PrinterException; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -43,35 +45,32 @@ import javax.swing.table.AbstractTableModel; import javax.swing.table.TableModel; import javax.swing.WindowConstants; -public class PrintAllPagesTest { +public class PrintAllPagesTest extends WindowAdapter { static JFrame f; static JDialog dialog; static JTable table; static volatile boolean testResult = false; - final static CountDownLatch latch = new CountDownLatch(1); - static boolean ret = false; + static final CountDownLatch latch = new CountDownLatch(1); public static void main(String[] args) throws Exception { try { SwingUtilities.invokeAndWait(() -> { - createUI(); printAllPagesTest(); + createUI(); }); Thread.sleep(1000); SwingUtilities.invokeAndWait(() -> { try { - ret = table.print(); + if (!table.print()) { + throw new RuntimeException("Printing cancelled"); + } } catch (PrinterException e) { throw new RuntimeException("Printing failed: " + e); } }); - if (!testResult) { - throw new RuntimeException("Only 1st page is printed out of multiple pages"); - } - // wait for latch to complete if (!latch.await(5, TimeUnit.MINUTES)) { throw new RuntimeException("Test timed out"); @@ -120,10 +119,10 @@ public class PrintAllPagesTest { f = new JFrame("Table test"); f.add(scrollpane); f.setSize(1000, 800); - f.setUndecorated(true); f.setLocationRelativeTo(null); f.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); f.setVisible(true); + f.addWindowListener(new PrintAllPagesTest()); } private static void createUI() { @@ -133,8 +132,7 @@ public class PrintAllPagesTest { + " If only 1 page is printed,\n " + " then press fail else press pass"; - dialog = new JDialog(); - dialog.setTitle("textselectionTest"); + dialog = new JDialog(f, "Instructions for Table Print Test"); JTextArea textArea = new JTextArea(description); textArea.setEditable(false); final JButton passButton = new JButton("PASS"); @@ -154,8 +152,13 @@ public class PrintAllPagesTest { buttonPanel.add(failButton); mainPanel.add(buttonPanel, BorderLayout.SOUTH); dialog.add(mainPanel); - dialog.setUndecorated(true); dialog.pack(); dialog.setVisible(true); + dialog.addWindowListener(new PrintAllPagesTest()); + } + + @Override + public void windowClosing(WindowEvent e) { + latch.countDown(); } } The reason why I changed the order and call `printAllPagesTest()` before `createUI()` is to make sure `f` is not `null` when the dialog is created. The owned dialog is always displayed above its owner, this addresses two issues together: it will be brought up whenever the frame is activated; if the screen resolution is low, the dialog could become hidden below the frame leaving the tester with no instructions visible. I used the blessed order of modifiers: `static final`. Closing either the dialog or the frame fails the test. Yet I didn't bother to provide a more detailed message; the test fails because `testResult` remains `false`. test/jdk/javax/swing/JTable/PrintAllPagesTest.java line 73: > 71: if (!testResult) { > 72: throw new RuntimeException("Only 1st page is printed out of multiple pages"); > 73: } Now the test always fails whether printing is called or not. I handled this situation in the patch I proposed. ------------- PR: https://git.openjdk.java.net/jdk/pull/8141 From aghaisas at openjdk.java.net Fri Apr 8 15:15:43 2022 From: aghaisas at openjdk.java.net (Ajit Ghaisas) Date: Fri, 8 Apr 2022 15:15:43 GMT Subject: Integrated: 8284378: Make Metal the default Java 2D rendering pipeline for macOS In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 09:48:13 GMT, Ajit Ghaisas wrote: > This PR makes Metal rendering pipeline as the default Java 2D rendering pipeline for macOS. > > Please refer "JBS Description" for more details. This pull request has now been integrated. Changeset: 3a0ddeba Author: Ajit Ghaisas URL: https://git.openjdk.java.net/jdk/commit/3a0ddeba52bbb67901335146f93791629c846e21 Stats: 5 lines in 1 file changed: 0 ins; 1 del; 4 mod 8284378: Make Metal the default Java 2D rendering pipeline for macOS Reviewed-by: kcr, avu, prr, jdv ------------- PR: https://git.openjdk.java.net/jdk/pull/8121 From naoto at openjdk.java.net Fri Apr 8 15:26:35 2022 From: naoto at openjdk.java.net (Naoto Sato) Date: Fri, 8 Apr 2022 15:26:35 GMT Subject: Integrated: 8283698: Refactor Locale constructors used in src/test In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 17:45:13 GMT, Naoto Sato wrote: > This is a follow-on task after deprecating the Locale constructors (https://bugs.openjdk.java.net/browse/JDK-8282819). Most of the changes are simple replacements to Locale constructors with `Locale.of()` or Locale constants, such as `Locale.US`. This pull request has now been integrated. Changeset: d6b4693c Author: Naoto Sato URL: https://git.openjdk.java.net/jdk/commit/d6b4693c0527385f8999089b3f8b2120548efecb Stats: 750 lines in 182 files changed: 3 ins; 3 del; 744 mod 8283698: Refactor Locale constructors used in src/test Reviewed-by: iris, joehw ------------- PR: https://git.openjdk.java.net/jdk/pull/8130 From duke at openjdk.java.net Fri Apr 8 16:11:43 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Fri, 8 Apr 2022 16:11:43 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v8] In-Reply-To: References: <7ot0fBLQsvKiNsxLdrbnv4R_MNr6qdLN_GBwNPjU-rY=.dcad59a1-d0d6-42b9-bdf4-6290f31a88e0@github.com> Message-ID: On Fri, 8 Apr 2022 07:55:57 GMT, Prasanta Sadhukhan wrote: >> @prrace @prsadhuk >> The issue with the system color returned by **keyboardFocusIndicatorColor** mentioned above, persists on macOS 12.3 as well. > > "accentColor" is swift property so not usable for jdk but you can use "controlAccentColor" which seems to work with 10.15 and 12.1 as per my limited testing. > You need to use @available check though.. > Even though it may not work for version lesser than 10.14, I guess it's ok as those versions are more or less obsolete and we will not be worse off than where we are now... > While you are at it, please consider renaming this function as told. @prsadhuk Thank you for the suggestion. I will add in the required changes , test it and update the PR. ------------- PR: https://git.openjdk.java.net/jdk/pull/7768 From prr at openjdk.java.net Fri Apr 8 16:22:29 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 8 Apr 2022 16:22:29 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v3] In-Reply-To: References: <1s3rujPqPuQFiA9xp2Rq4UoXMfP5fSpzQX_CNfl-UXw=.4b2a2871-1647-4c2f-a368-44ef8c7896c4@github.com> <6bK-iNlPfRxkowIW1_7WYUulcJ9qpcvCBgcG44Q0mHs=.e04e5fc2-d532-4684-bab1-3fd94ba58048@github.com> Message-ID: On Fri, 8 Apr 2022 06:49:16 GMT, Maxim Kartashev wrote: >> src/java.desktop/unix/classes/sun/awt/X11/XCanvasPeer.java line 90: >> >>> 88: XToolkit.awtUnlock(); >>> 89: } >>> 90: } >> >> I am not sure I understand the purpose of this method, it requests the current device for the GC, then requests the screen index of the device, and then request device by the screen index, what is the reason to do that? Why we cannot just use the device from the GC? > > This is just a named copy of lines 67 to 75. Since now this is the only piece of code that needs to work holding the AWT lock, I thought it best to isolate it. > As I understand, the purpose of the piece is to find the "new" `X11GraphicsDevice` with the screen number same to the given "old" `GraphicsConfiguration`. I don't understand why this was extracted out. It isn't called anywhere else and again makes the diff harder to understand. ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From prr at openjdk.java.net Fri Apr 8 16:22:31 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 8 Apr 2022 16:22:31 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v5] In-Reply-To: References: Message-ID: <6dun2ppw1GHei7MlyCfLlnQ27NsNRSZ5F3Y1kSWrA7E=.08fadf9c-73f4-499e-8b45-f5e3c147bd91@github.com> On Fri, 8 Apr 2022 06:49:09 GMT, Maxim Kartashev wrote: >> These crashes were not reproducible, so the fix is based on a hypothesis that there are two possible reasons for them: >> 1. `makeDefaultConfig()` returning `NULL`. >> 2. A race condition when the number of screens changes. >> The race scenario: `X11GraphisDevice.makeDefaultConfiguration()` is called on EDT so the call can race with `X11GraphisDevice.invalidate()` that re-sets the screen number of the device; the latter is invoked on the `AWT-XAWT` thread from `X11GraphicsEnvironment.rebuildDevices()`. So by the time `makeDefaultConfiguration()` makes a native call with the device's current screen number, the `x11Screens` array maintained by the native code could have become shorter. And the native methods like `Java_sun_awt_X11GraphicsDevice_getConfigColormap()` assume that the number passed to them is always current and valid. The AWT lock only protects against the changes during the native methods invocation and does not protect against them being called with an outdated screen number. With a larger screen number, those methods read past the end of the `x11Screens` array. >> >> The fix for (1) is to die gracefully instead of crashing in an attempt to de-reference a `NULL` pointer, which might happen upon returning from `makeDefaultConfig()` in `getAllConfigs()`. >> >> The fix for (2) is to eliminate the race by protecting `X11GraphisDevice.screen` with the AWT lock such that it doesn't change when the native methods working with it are active. >> >> We've been shipping JetBrains Runtime with this fix for a few months now and there were no crash reports with those specific patterns against the versions with the fix. > > Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision: > > Restored the original code in X11GraphicsDevice.java that got auto-formatted src/java.desktop/unix/classes/sun/awt/X11/XCanvasPeer.java line 90: > 88: getScreenDevices()[screenNum]. > 89: getDefaultConfiguration(); > 90: } why did you get rid of the just in case ? Actually why is this method being modified at all ? I mean besides adding locking .. ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From avu at openjdk.java.net Fri Apr 8 17:00:43 2022 From: avu at openjdk.java.net (Alexey Ushakov) Date: Fri, 8 Apr 2022 17:00:43 GMT Subject: RFR: 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill [v2] In-Reply-To: References: Message-ID: On Fri, 1 Apr 2022 15:43:29 GMT, Alexey Ushakov wrote: >> Throwing InvalidPipeException for incompatible surfaces > > Alexey Ushakov has updated the pull request incrementally with one additional commit since the last revision: > > 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill > > Extracted try/catch logic of SurfaceData cast to particular SurfaceData subclass into convenience method SurfaceData.convertTo(). Applied the method to XRTextRenderer.drawGlyphList() and XRMaskFill.MaskFill(). Refactored try/catch blocks handling similar cases. @aghaisas could you please help with running the necessary tests. ------------- PR: https://git.openjdk.java.net/jdk/pull/8015 From prr at openjdk.java.net Fri Apr 8 18:00:45 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 8 Apr 2022 18:00:45 GMT Subject: RFR: 8284521: Write an automated regression test for RFE 4371575 [v2] In-Reply-To: References: Message-ID: <1UClEcAOD__BqjYbWR5fbG6fe_sopD9EgEPJCNMM-UA=.9c77864c-714c-403b-bc9f-3a2ca1dedc84@github.com> On Fri, 8 Apr 2022 07:08:25 GMT, Manukumar V S wrote: >> Write an automated regression test for [JDK-4371575](https://bugs.openjdk.java.net/browse/JDK-4371575) >> >> Issue: >> As part of the Merlin focus project, JComponent.setRequestFocusEnabled was >> deprecated and its implementation was changed to map exactly to the new >> method Component.setFocusable. Scott believes that the old behavior may be >> preferable. He would like to be able to specify that a Component is focusable, >> and should receive focus during keyboard traversal, but that it should not >> automatically take focus when the user clicks on it with the mouse. >> >> We are concerned that the accessibility team would be against this behavior, >> and this also seems like more of a PLAF issue. Nevertheless, we should look >> into it before beta ships. >> >> Fix: >> After some discussion we decided that the best balance of the old and new would be to make this an advisory property. This property will not be synonymous with focusable. Instead our mouse listeners will check this property before requesting focus. This provides as closely as possible the old behavior, while allowing people to use the new focusable property if they don't want a component focusable at all. >> >> Testing: >> Tested in mach5, 10 times with all the 3 available platform like macosx, windows and linux and got all Pass. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Review comment fixed: Removed unwanted directory Marked as reviewed by prr (Reviewer). test/jdk/javax/swing/JComponent/JComponentSetRequestFocusEnabledTest.java line 76: > 74: } > 75: robot.waitForIdle(); > 76: Since you specified robot.setAutoWaitForIdle(true) I wonder if this is needed ? Shouldn't do any harm though. ------------- PR: https://git.openjdk.java.net/jdk/pull/8143 From duke at openjdk.java.net Fri Apr 8 18:22:48 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Fri, 8 Apr 2022 18:22:48 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v4] In-Reply-To: References: Message-ID: On Tue, 5 Apr 2022 20:38:58 GMT, Alexey Ivanov wrote: >> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: >> >> Dispose the Frame based in EDT > > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 135: > >> 133: dialog.dispose(); >> 134: latch.countDown(); >> 135: }); > > This doesn't handle closing the dialog via Close button or Esc. I believe it should also do everything but copying the entered text. fixed ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From duke at openjdk.java.net Fri Apr 8 19:11:56 2022 From: duke at openjdk.java.net (Maxim Kartashev) Date: Fri, 8 Apr 2022 19:11:56 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v5] In-Reply-To: <6dun2ppw1GHei7MlyCfLlnQ27NsNRSZ5F3Y1kSWrA7E=.08fadf9c-73f4-499e-8b45-f5e3c147bd91@github.com> References: <6dun2ppw1GHei7MlyCfLlnQ27NsNRSZ5F3Y1kSWrA7E=.08fadf9c-73f4-499e-8b45-f5e3c147bd91@github.com> Message-ID: <3tjuew5ReAg3lSfc8a4-6NNITEgNTeDOnMPtkqPPMYg=.339c003e-e21c-4866-a892-3a8b5f4a64d7@github.com> On Fri, 8 Apr 2022 16:20:10 GMT, Phil Race wrote: > why did you get rid of the just in case ? I honestly couldn't find any way for this code to get executed. I can keep it there, but then I would have to explain why it is needed. > Actually why is this method being modified at all ? The changes are really semantically null. All I did was shorten a 30 lines method to 15 and gave a name to a piece of it (but that's in the next comment). ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From duke at openjdk.java.net Fri Apr 8 19:18:02 2022 From: duke at openjdk.java.net (Maxim Kartashev) Date: Fri, 8 Apr 2022 19:18:02 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v3] In-Reply-To: References: <1s3rujPqPuQFiA9xp2Rq4UoXMfP5fSpzQX_CNfl-UXw=.4b2a2871-1647-4c2f-a368-44ef8c7896c4@github.com> <6bK-iNlPfRxkowIW1_7WYUulcJ9qpcvCBgcG44Q0mHs=.e04e5fc2-d532-4684-bab1-3fd94ba58048@github.com> Message-ID: On Fri, 8 Apr 2022 16:19:30 GMT, Phil Race wrote: > I don't understand why this was extracted out. It isn't called anywhere else and again makes the diff harder to understand. This AWT lock should be held for a very small portion of the original method. Initially, I left the code guarded by it in place and it looked weird and out of place. I understand that this is a judgement call, though. As for the diffs, they are not very significant (essentially, 4 lines of code were re-grouped and moved around) and we only have to look at them here for a few days. The (refactored) code itself will be looked at by (presumably) a greater number of people over a far greater period of time. Less of a judgement call. ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From prr at openjdk.java.net Fri Apr 8 21:33:34 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 8 Apr 2022 21:33:34 GMT Subject: Integrated: 8283706: Add final or sealed modifier to appropriate javax.swing API classes In-Reply-To: References: Message-ID: On Sat, 2 Apr 2022 23:21:03 GMT, Phil Race wrote: > Update Swing classes to use JEP 409 sealed and non-sealed modifiers and add the final modifier where appropriate. > > jtreg tests and JCK API tests pass > > CSR for review here : https://bugs.openjdk.java.net/browse/JDK-8284214 This pull request has now been integrated. Changeset: eab4c0c4 Author: Phil Race URL: https://git.openjdk.java.net/jdk/commit/eab4c0c49934bd6f37a0b6174ca10e5c8708d13b Stats: 25 lines in 6 files changed: 10 ins; 0 del; 15 mod 8283706: Add final or sealed modifier to appropriate javax.swing API classes Reviewed-by: darcy, psadhukhan, aivanov, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8082 From serb at openjdk.java.net Sat Apr 9 05:30:38 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 9 Apr 2022 05:30:38 GMT Subject: RFR: 8284521: Write an automated regression test for RFE 4371575 [v2] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 07:08:25 GMT, Manukumar V S wrote: >> Write an automated regression test for [JDK-4371575](https://bugs.openjdk.java.net/browse/JDK-4371575) >> >> Issue: >> As part of the Merlin focus project, JComponent.setRequestFocusEnabled was >> deprecated and its implementation was changed to map exactly to the new >> method Component.setFocusable. Scott believes that the old behavior may be >> preferable. He would like to be able to specify that a Component is focusable, >> and should receive focus during keyboard traversal, but that it should not >> automatically take focus when the user clicks on it with the mouse. >> >> We are concerned that the accessibility team would be against this behavior, >> and this also seems like more of a PLAF issue. Nevertheless, we should look >> into it before beta ships. >> >> Fix: >> After some discussion we decided that the best balance of the old and new would be to make this an advisory property. This property will not be synonymous with focusable. Instead our mouse listeners will check this property before requesting focus. This provides as closely as possible the old behavior, while allowing people to use the new focusable property if they don't want a component focusable at all. >> >> Testing: >> Tested in mach5, 10 times with all the 3 available platform like macosx, windows and linux and got all Pass. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Review comment fixed: Removed unwanted directory Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8143 From serb at openjdk.java.net Sat Apr 9 05:37:35 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 9 Apr 2022 05:37:35 GMT Subject: RFR: 8284077: Create an automated test for JDK-4170173 In-Reply-To: <8iul_waSMDD6G1oVVmwPtW89ihAc6YoMFrTR1-XFmmw=.7802104e-60cb-4b90-9ef5-cc479d3f5a78@github.com> References: <8iul_waSMDD6G1oVVmwPtW89ihAc6YoMFrTR1-XFmmw=.7802104e-60cb-4b90-9ef5-cc479d3f5a78@github.com> Message-ID: On Thu, 7 Apr 2022 07:40:18 GMT, Srinivas Mandalika wrote: > Create an automated test for [JDK-4170173](https://bugs.openjdk.java.net/browse/JDK-4170173) > > Issue > JTextComponent.AccessibleJTextComponent.getAfterIndex(int part, int index) works incorrectly, when 'part' parameter is AccessibleText.WORD. > It returns a space (" ") instead of the correct word. > > The test verifies the fix for this behavior by checking the getAfterIndex for AccessibleText.CHARACTER,AccessibleText.WORD,AccessibleText.SENTENCE for the components JTextField, JTextArea, JEditorPane. > > While working on this test case there was a related bug relevant to this [JDK-4170174](https://bugs.openjdk.java.net/browse/JDK-4170174) > This is marked as duplicate, addressess a similar issue. > It indicates that JTextComponent.AccessibleJTextComponent.getBeforeIndex(int part, int index) works incorrectly, when part parameter is AccessibleText.WORD. > It returns a space (" ") instead of correct word. > > Hence an additional test was added for this, for verifying the behavior of getBeforeIndex. > AccessibleText.CHARACTER,AccessibleText.WORD,AccessibleText.SENTENCE for the components JTextField, JTextArea, JEditorPane. > > The two tests have multiple distinct assertions. For this reason, as well as for maintainability, the two were not clubbed into a single test. > However, the two tests are still similar in the functional flow of the code and the functionality they are testing as well - hence they have been clubbed into a single review. > This review is for migrating tests from a closed test suite to open. > > Testing: > The tests ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. test/jdk/javax/accessibility/4170173/AccessibleJTextAfterIndexTest.java line 114: > 112: jTextComponent.getAccessibleContext().getAccessibleText() > 113: .getAfterIndex(character, characterPosition)); > 114: It feels that the code above is too smart=) Can we simplify/reformat it a little bit. I do not think that you need to jump from the main thread to the EDT and back for each testcase, just wrap the "doTest" by the invokeAndWait ------------- PR: https://git.openjdk.java.net/jdk/pull/8138 From serb at openjdk.java.net Sat Apr 9 05:39:02 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 9 Apr 2022 05:39:02 GMT Subject: RFR: 8282716: [macos] Enable javax/swing/JScrollPane/TestMouseWheelScroll.java on macos In-Reply-To: <-tuJ1M1iwo7tJ_hOHvrEylZmUdS3DPOSbySVFnJGrBI=.212c7ea6-e12a-48af-a4fa-ee3a586e4a38@github.com> References: <-tuJ1M1iwo7tJ_hOHvrEylZmUdS3DPOSbySVFnJGrBI=.212c7ea6-e12a-48af-a4fa-ee3a586e4a38@github.com> Message-ID: On Wed, 6 Apr 2022 10:11:33 GMT, Prasanta Sadhukhan wrote: > The test was failing on macos and was excluded in macos because the viewposition was not changed after mouse wheel scroll. Seems like mouse wheel scroll direction is opposite in macos compared to windows etc so if we try to down-wheel scroll in macos when view position is at center of viewport (say element 3 is selected out of visible 7 elements), it cannot change viewposition as it cannot "scroll up" (since we are already at topmost viewport) whereas in windows, when we do down-wheel scroll in mouse wheel, it "scroll down" the viewport so viewposition is changed. > > Fix is to use opposite scrolling motion in macos to check mouse wheel scroll is happening, which is what the testcase is meant for. CI testing of this test on all platform is ok. The scroll direction on macOS can be configured, can the test check what type of scroll is used on the current system and then use that to verify the old fix? ------------- PR: https://git.openjdk.java.net/jdk/pull/8123 From serb at openjdk.java.net Sat Apr 9 05:43:41 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 9 Apr 2022 05:43:41 GMT Subject: RFR: 8283507: Create a regression test for RFE 4287690 [v3] In-Reply-To: <8I-5r07BeDPRL2uLjrILbcFMQAYszp2c5xpI8v_ZM0c=.c0d2f711-1281-435b-9c83-b31d94d4a3eb@github.com> References: <8I-5r07BeDPRL2uLjrILbcFMQAYszp2c5xpI8v_ZM0c=.c0d2f711-1281-435b-9c83-b31d94d4a3eb@github.com> Message-ID: On Fri, 8 Apr 2022 07:12:21 GMT, Manukumar V S wrote: >> Create a regression test for [JDK-4287690](https://bugs.openjdk.java.net/browse/JDK-4287690) >> Issue description: >> I want JComboBox to send an event just before the popup (drop down) list is displayed. >> >> Fix: >> This requires some additional API targeted for major release of the JDK (1.4).The PopupMenuEvent will from the JPopupMenu will be forwarded to the JComboBox. A client of the JComboBox can register itself as a PopupMenuListener to receive the notification. >> So JComboBox should send drop down events when the drop down popup is visible as well as invisible. JComboBox.addPopupMenuListener(PopupMenuListener) can be used to register for pop up events. >> >> Testing: >> Tested using Mach5 in all platforms available(macos,linux and windows) and got all pass. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Review comment fixed: Removed unwanted directory Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7906 From serb at openjdk.java.net Sat Apr 9 05:44:42 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 9 Apr 2022 05:44:42 GMT Subject: RFR: 8283245: Create a test for JDK-4670319 [v2] In-Reply-To: <_N3uh9GNNdLPg-kiacOdc2fEJJeeBdhRM644g_CsV0s=.90175acf-34bf-4db7-a107-469a8611cbdf@github.com> References: <_N3uh9GNNdLPg-kiacOdc2fEJJeeBdhRM644g_CsV0s=.90175acf-34bf-4db7-a107-469a8611cbdf@github.com> Message-ID: On Thu, 7 Apr 2022 08:18:21 GMT, Srinivas Mandalika wrote: >> Write an automated regression test for JDK-4670319 >> >> Issue >> When a JTree node is expanded or collapsed, an Accessibility PropertyChange event is fired with the old state of "collapsed" and new state of "expanded" (or vice versa). The problem is that the source of the event is the AccessibeJTree, and not the AccessibleJTreeNode. This means that an assistive technology listening to this event is unable to report to the user what node was expanded/collapsed. >> >> Fix >> Fix for [JDK-4670319](https://bugs.openjdk.java.net/browse/JDK-4670319) addresses the above issue. When tree node is expanded/collapsed, PropertyChangeEventSource is the Node. >> This review is for a test for validating the above issue. >> >> This review is for migrating tests from a closed test suite to open. >> >> Testing: >> The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. > > Srinivas Mandalika has updated the pull request incrementally with two additional commits since the last revision: > > - Review Comments Fixed: 80 characters line fixed, typo in File Name fixed > - Review Comments Fixed: 80 characters line fixed, typo in File Name fixed Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8012 From serb at openjdk.java.net Sat Apr 9 05:46:33 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 9 Apr 2022 05:46:33 GMT Subject: RFR: 8282640: Create a test for JDK-4740761 [v4] In-Reply-To: References: Message-ID: <6uEz3V4PKVcSz23k26xYuTm2z-QjcX4Ihcvkj-Dzfds=.b8421bfe-cd1b-4408-9c42-531c8e33ea83@github.com> On Wed, 30 Mar 2022 10:33:32 GMT, Srinivas Mandalika wrote: >> Create a test for [JDK-4740761](https://bugs.openjdk.java.net/browse/JDK-4740761) >> >> The issue observed is in a JFrame with a JTextField and a JScrollPane which contains focused component. When the JScrollPane was >> is removed from its parent, focus stays with the the scroller >> of the removed JScrollPane, instead of moving to the TextField. >> >> The test verifies the same - i.e. it verifies that the removal of the scrollpane moves the focus to the JTextField present in the JFrame. >> This review is for migrating tests from a closed test suite to open. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > Review Comment Fixed: Line Length fixed to < 80 characters. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7686 From serb at openjdk.java.net Sat Apr 9 06:05:45 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 9 Apr 2022 06:05:45 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v3] In-Reply-To: References: <1s3rujPqPuQFiA9xp2Rq4UoXMfP5fSpzQX_CNfl-UXw=.4b2a2871-1647-4c2f-a368-44ef8c7896c4@github.com> <6bK-iNlPfRxkowIW1_7WYUulcJ9qpcvCBgcG44Q0mHs=.e04e5fc2-d532-4684-bab1-3fd94ba58048@github.com> Message-ID: On Fri, 8 Apr 2022 19:14:38 GMT, Maxim Kartashev wrote: >> I don't understand why this was extracted out. It isn't called anywhere else and again makes the diff harder to understand. > >> I don't understand why this was extracted out. It isn't called anywhere else and again makes the diff harder to understand. > > This AWT lock should be held for a very small portion of the original method. Initially, I left the code guarded by it in place and it looked weird and out of place. I understand that this is a judgement call, though. > > As for the diffs, they are not very significant (essentially, 4 lines of code were re-grouped and moved around) and we only have to look at them here for a few days. The (refactored) code itself will be looked at by (presumably) a greater number of people over a far greater period of time. Less of a judgement call. >This is just a named copy of lines 67 to 75. Since now this is the only piece of code that needs to work holding the AWT lock, I thought it best to isolate it. As I understand, the purpose of the piece is to find the "new" X11GraphicsDevice with the screen number same to the given "old" GraphicsConfiguration. I am not sure that we can have some "old" and "new" devices which have the same screen id. * If the list of devices was not changed then the "screenid" for old device is the index of that "old" device in the device array. So the new and old devices are the same. * If the list of devices was changed, then the "screenid" for the old device was invalidated, and it is again an index of that "old" device in the device array. Please take a look to the fix for JDK-6804747, initially that method get the screen index as a parameter, and then replaced by the GC. The code of the method did not changed but the index just requested from the GC. Probably the code is just buggies? ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From serb at openjdk.java.net Sat Apr 9 06:34:33 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 9 Apr 2022 06:34:33 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v6] In-Reply-To: References: Message-ID: On Thu, 7 Apr 2022 15:09:27 GMT, lawrence.andrews wrote: >> We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following >> 1) Frame which contains test instruction . >> 2) Pass & Fail button so that user can mark the test pass or fail >> 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. >> 4) Disposing of all the frames. >> >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception Just an idea can we replace the builtin in the jtreg "manual" tests machinery by something like this? Also would like to raise a question: should we show the test instructions in the same VM where the test executed or we can shoiw it in a separate VM? ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From smandalika at openjdk.java.net Sat Apr 9 08:18:33 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Sat, 9 Apr 2022 08:18:33 GMT Subject: RFR: 8282640: Create a test for JDK-4740761 [v4] In-Reply-To: <6uEz3V4PKVcSz23k26xYuTm2z-QjcX4Ihcvkj-Dzfds=.b8421bfe-cd1b-4408-9c42-531c8e33ea83@github.com> References: <6uEz3V4PKVcSz23k26xYuTm2z-QjcX4Ihcvkj-Dzfds=.b8421bfe-cd1b-4408-9c42-531c8e33ea83@github.com> Message-ID: On Sat, 9 Apr 2022 05:43:26 GMT, Sergey Bylokhov wrote: >> Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: >> >> Review Comment Fixed: Line Length fixed to < 80 characters. > > Marked as reviewed by serb (Reviewer). @mrserb Can you please sponsor this PR? ------------- PR: https://git.openjdk.java.net/jdk/pull/7686 From smandalika at openjdk.java.net Sat Apr 9 08:18:31 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Sat, 9 Apr 2022 08:18:31 GMT Subject: RFR: 8283245: Create a test for JDK-4670319 [v2] In-Reply-To: References: <_N3uh9GNNdLPg-kiacOdc2fEJJeeBdhRM644g_CsV0s=.90175acf-34bf-4db7-a107-469a8611cbdf@github.com> Message-ID: On Sat, 9 Apr 2022 05:41:26 GMT, Sergey Bylokhov wrote: >> Srinivas Mandalika has updated the pull request incrementally with two additional commits since the last revision: >> >> - Review Comments Fixed: 80 characters line fixed, typo in File Name fixed >> - Review Comments Fixed: 80 characters line fixed, typo in File Name fixed > > Marked as reviewed by serb (Reviewer). @mrserb Can you please sponsor this PR? ------------- PR: https://git.openjdk.java.net/jdk/pull/8012 From duke at openjdk.java.net Sat Apr 9 09:38:40 2022 From: duke at openjdk.java.net (Maxim Kartashev) Date: Sat, 9 Apr 2022 09:38:40 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v3] In-Reply-To: References: <1s3rujPqPuQFiA9xp2Rq4UoXMfP5fSpzQX_CNfl-UXw=.4b2a2871-1647-4c2f-a368-44ef8c7896c4@github.com> <6bK-iNlPfRxkowIW1_7WYUulcJ9qpcvCBgcG44Q0mHs=.e04e5fc2-d532-4684-bab1-3fd94ba58048@github.com> Message-ID: On Sat, 9 Apr 2022 06:02:13 GMT, Sergey Bylokhov wrote: >>> I don't understand why this was extracted out. It isn't called anywhere else and again makes the diff harder to understand. >> >> This AWT lock should be held for a very small portion of the original method. Initially, I left the code guarded by it in place and it looked weird and out of place. I understand that this is a judgement call, though. >> >> As for the diffs, they are not very significant (essentially, 4 lines of code were re-grouped and moved around) and we only have to look at them here for a few days. The (refactored) code itself will be looked at by (presumably) a greater number of people over a far greater period of time. Less of a judgement call. > >>This is just a named copy of lines 67 to 75. Since now this is the only piece of code that needs to work holding the AWT lock, I thought it best to isolate it. > As I understand, the purpose of the piece is to find the "new" X11GraphicsDevice with the screen number same to the given "old" GraphicsConfiguration. > > I am not sure that we can have some "old" and "new" devices which have the same screen id. > * If the list of devices was not changed then the "screenid" for old device is the index of that "old" device in the device array. So the new and old devices are the same. > * If the list of devices was changed, then the "screenid" for the old device was invalidated, and it is again an index of that "old" device in the device array. Also I do not think that we can change the "requested device" in this method, The purpose of this method is to request the best "GC" from the device passed as a parameter(via another GC). > > Please take a look to the fix for JDK-6804747, initially that method get the screen index as a parameter, and then replaced by the GC. The code of the method did not changed but the index just requested from the GC. > > Probably the code is just buggies? @mrserb I agree with your logic, but fixing this now would certainly be not a semantically null change and would complicate the fix that has already been under review for over two months. I'd be happy to file a bug for this separate issue. ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From duke at openjdk.java.net Sat Apr 9 19:46:37 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Sat, 9 Apr 2022 19:46:37 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v9] In-Reply-To: References: Message-ID: > Previously while tabbing through the JTable cell, the cell highlighter/focus ring was not visible against the selection background. > > Changes are made to Aqua LAF to derive a lighter focus ring color by changing saturation and setting brightness component to 100% of original focus ring color so that it is visible while tabbing through `JTable` cells. A new method is added for this purpose which takes in `focusRingColor`, does adjustment to saturation and brightness and returns a new focus ring color. There are edge cases where the HSB transformation does not yield the right focus ring color, for these cases a default color is returned. > > **Edge Cases** > ![image](https://user-images.githubusercontent.com/95945681/161360456-3929acf1-282b-4c2b-95d1-1d5707c1e238.png) > > The edge case condition consists of two parts ? > To handle white/black colors - (hsbValues[0] == 0 && hsbValues[1] == 0) - representing hue and saturation of zero obtained for black, white or exactly grey (red=green=color) conditions > To handle grayish colors - hsbValues[1] <= satGrayScale where satGrayScale <= 0.10 . For any given hue and brightness, a saturation of less than or equal to 10% represents grayish tint colors. > (The second case was added to accommodate grayish focus ring color returned by system when Accent color = Graphite. The returned color is not exactly gray but grayish (r=135, g=135, b=140)). > To accommodate a more generic case of grayish colors, the satGrayScale has a threshold or buffer of 0.10 or 10%. > > Used the following resources to test out different grayish colors and optimal saturation offsets used in `deriveLighterFocusRing()`. > > - [RapidTables](https://www.rapidtables.com/convert/color/rgb-to-hsl.html) > - [Colorizer](http://colorizer.org/). > - [Chart Link](https://codepen.io/HunorMarton/details/eWvewo) > > A test case is added to compare the RGB difference between the original focus ring color & selection background and the new focus ring color & selection background. > > PS: The native L&F (Mac OS) and Swing L&F for JTable cell tabbing differs (on native tables the cell background turns white on focus with a cell focus ring). Since the background for Swing tables can be set by users and also overridden by subclassing `DefaultTableCellRenderer`, and to adhere to current implementation of Swing, the white cell background changes are not incorporated. Only the Focus Ring/ Cell Highlighter is made more prominent. Harshitha Onkar 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 10 additional commits since the last revision: - added new type property and changed method name - Merge branch 'master' into focusRing_7124282 - added more generic condition for edge case and formatted line lengths - Merge branch 'openjdk:master' into focusRing_7124282 - on-the-fly focus ring color changes added - updated deriveContrastFocusRing method - changed javadocs for the new method and expanded imports - formatting changes to test case - formatted line lengths, added method-level comments - Cell Focus Ring Changes for Aqua LAF ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7768/files - new: https://git.openjdk.java.net/jdk/pull/7768/files/6f1359e4..3e7afcdb Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7768&range=08 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7768&range=07-08 Stats: 33413 lines in 1107 files changed: 22513 ins; 4710 del; 6190 mod Patch: https://git.openjdk.java.net/jdk/pull/7768.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7768/head:pull/7768 PR: https://git.openjdk.java.net/jdk/pull/7768 From serb at openjdk.java.net Sat Apr 9 22:18:12 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 9 Apr 2022 22:18:12 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v3] In-Reply-To: References: <1s3rujPqPuQFiA9xp2Rq4UoXMfP5fSpzQX_CNfl-UXw=.4b2a2871-1647-4c2f-a368-44ef8c7896c4@github.com> <6bK-iNlPfRxkowIW1_7WYUulcJ9qpcvCBgcG44Q0mHs=.e04e5fc2-d532-4684-bab1-3fd94ba58048@github.com> Message-ID: On Sat, 9 Apr 2022 09:35:39 GMT, Maxim Kartashev wrote: >>>This is just a named copy of lines 67 to 75. Since now this is the only piece of code that needs to work holding the AWT lock, I thought it best to isolate it. >> As I understand, the purpose of the piece is to find the "new" X11GraphicsDevice with the screen number same to the given "old" GraphicsConfiguration. >> >> I am not sure that we can have some "old" and "new" devices which have the same screen id. >> * If the list of devices was not changed then the "screenid" for old device is the index of that "old" device in the device array. So the new and old devices are the same. >> * If the list of devices was changed, then the "screenid" for the old device was invalidated, and it is again an index of that "old" device in the device array. Also I do not think that we can change the "requested device" in this method, The purpose of this method is to request the best "GC" from the device passed as a parameter(via another GC). >> >> Please take a look to the fix for JDK-6804747, initially that method get the screen index as a parameter, and then replaced by the GC. The code of the method did not changed but the index just requested from the GC. >> >> Probably the code is just buggies? > > @mrserb I agree with your logic, but fixing this now would certainly be not a semantically null change and would complicate the fix that has already been under review for over two months. I'd be happy to file a bug for this separate issue. The separate CR would be fine. ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From psadhukhan at openjdk.java.net Sun Apr 10 04:56:42 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Sun, 10 Apr 2022 04:56:42 GMT Subject: RFR: 8282716: [macos] Enable javax/swing/JScrollPane/TestMouseWheelScroll.java on macos In-Reply-To: References: <-tuJ1M1iwo7tJ_hOHvrEylZmUdS3DPOSbySVFnJGrBI=.212c7ea6-e12a-48af-a4fa-ee3a586e4a38@github.com> Message-ID: <5u81VPNyWXQD1LpDm7Vblfq4mwvKJHHkhsJjhvIipL4=.417639ac-b2f2-477c-8733-ec694919f360@github.com> On Sat, 9 Apr 2022 05:35:30 GMT, Sergey Bylokhov wrote: > The scroll direction on macOS can be configured, can the test check what type of scroll is used on the current system and then use that to verify the old fix? I see "Scroll direction: Natural" check in mouse in SystemPreference which is by default checked, which causes down-wheel scroll to "move up" and up-wheel scroll to "move down" and if unchecked, then it causes reverse. But I could not find anyway to find in Java in Robot how to get scroll type of macos or for other platforms. If you are aware, let me know.. I guess we always test with default settings.. ------------- PR: https://git.openjdk.java.net/jdk/pull/8123 From psadhukhan at openjdk.java.net Sun Apr 10 06:12:26 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Sun, 10 Apr 2022 06:12:26 GMT Subject: RFR: 8282716: [macos] Enable javax/swing/JScrollPane/TestMouseWheelScroll.java on macos [v2] In-Reply-To: <-tuJ1M1iwo7tJ_hOHvrEylZmUdS3DPOSbySVFnJGrBI=.212c7ea6-e12a-48af-a4fa-ee3a586e4a38@github.com> References: <-tuJ1M1iwo7tJ_hOHvrEylZmUdS3DPOSbySVFnJGrBI=.212c7ea6-e12a-48af-a4fa-ee3a586e4a38@github.com> Message-ID: > The test was failing on macos and was excluded in macos because the viewposition was not changed after mouse wheel scroll. Seems like mouse wheel scroll direction is opposite in macos compared to windows etc so if we try to down-wheel scroll in macos when view position is at center of viewport (say element 3 is selected out of visible 7 elements), it cannot change viewposition as it cannot "scroll up" (since we are already at topmost viewport) whereas in windows, when we do down-wheel scroll in mouse wheel, it "scroll down" the viewport so viewposition is changed. > > Fix is to use opposite scrolling motion in macos to check mouse wheel scroll is happening, which is what the testcase is meant for. CI testing of this test on all platform is ok. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Check mousewheel rotation direction at runtime ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8123/files - new: https://git.openjdk.java.net/jdk/pull/8123/files/6494c339..61d23995 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8123&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8123&range=00-01 Stats: 14 lines in 1 file changed: 10 ins; 1 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/8123.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8123/head:pull/8123 PR: https://git.openjdk.java.net/jdk/pull/8123 From psadhukhan at openjdk.java.net Sun Apr 10 06:14:15 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Sun, 10 Apr 2022 06:14:15 GMT Subject: RFR: 8282716: [macos] Enable javax/swing/JScrollPane/TestMouseWheelScroll.java on macos In-Reply-To: <5u81VPNyWXQD1LpDm7Vblfq4mwvKJHHkhsJjhvIipL4=.417639ac-b2f2-477c-8733-ec694919f360@github.com> References: <-tuJ1M1iwo7tJ_hOHvrEylZmUdS3DPOSbySVFnJGrBI=.212c7ea6-e12a-48af-a4fa-ee3a586e4a38@github.com> <5u81VPNyWXQD1LpDm7Vblfq4mwvKJHHkhsJjhvIipL4=.417639ac-b2f2-477c-8733-ec694919f360@github.com> Message-ID: <6skAe2ei9eFYxhoi4cLuxjny85bnh9kYQqwZ8R5NRfs=.060f5526-dbf0-4eb7-b7bb-186205202a0a@github.com> On Sun, 10 Apr 2022 04:53:38 GMT, Prasanta Sadhukhan wrote: > > The scroll direction on macOS can be configured, can the test check what type of scroll is used on the current system and then use that to verify the old fix? > > I see "Scroll direction: Natural" check in mouse in SystemPreference which is by default checked, which causes down-wheel scroll to "move up" and up-wheel scroll to "move down" and if unchecked, then it causes reverse. But I could not find anyway to find in Java in Robot how to get scroll type of macos or for other platforms. If you are aware, let me know.. I guess we always test with default settings.. I have updated test to check wheel scroll type at runtime ------------- PR: https://git.openjdk.java.net/jdk/pull/8123 From mvs at openjdk.java.net Sun Apr 10 10:44:43 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Sun, 10 Apr 2022 10:44:43 GMT Subject: RFR: 8284521: Write an automated regression test for RFE 4371575 [v2] In-Reply-To: <1UClEcAOD__BqjYbWR5fbG6fe_sopD9EgEPJCNMM-UA=.9c77864c-714c-403b-bc9f-3a2ca1dedc84@github.com> References: <1UClEcAOD__BqjYbWR5fbG6fe_sopD9EgEPJCNMM-UA=.9c77864c-714c-403b-bc9f-3a2ca1dedc84@github.com> Message-ID: On Fri, 8 Apr 2022 17:57:42 GMT, Phil Race wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comment fixed: Removed unwanted directory > > test/jdk/javax/swing/JComponent/JComponentSetRequestFocusEnabledTest.java line 76: > >> 74: } >> 75: robot.waitForIdle(); >> 76: > > Since you specified robot.setAutoWaitForIdle(true) I wonder if this is needed ? Shouldn't do any harm though. I thought robot.setAutoWaitForIdle(true) works only when some robot events like 'Mouse Press' or 'Key Events' got generated and it will call for robot.waitForIdle() for each of these generated event. But in this case we want to make sure the UI creation is completed and all the corresponding events are flushed, thats why its used here specifically. Please correct me if I'm wrong. ------------- PR: https://git.openjdk.java.net/jdk/pull/8143 From psadhukhan at openjdk.java.net Mon Apr 11 04:54:37 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 11 Apr 2022 04:54:37 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v2] In-Reply-To: References: <_UplvB0h9bWCInEGLRAN4bN3_sMypgu0hf0nU57pJgI=.8eef0557-500c-4939-b00f-ae9c0dd5a5b8@github.com> Message-ID: On Fri, 8 Apr 2022 12:06:06 GMT, Tejesh R wrote: > Yes, the original issue was observed and raised in Windows alone...... In Mac and Linux the control wont even enters this logic - > > ``` > if (endOfLineProperty != null && !endOfLine.equals("\n")) { > // There is an end of line string that isn't \n, have to iterate > // through and find all \n's and translate to end of line string. > ``` Since you mentioned in mac/linux it wont even enter the above path, then I guess in below code if (array[counter - 1] == '\r') { out.write(array, last, counter - last - 1); } else { out.write(array, last, counter - last); } the else part is a no-op as in windows \r\n is present so I think always the check `if (array[counter - 1] == '\r')` will be satisfied If this is true, then I guess we can remove `if (array[counter - 1] == '\r')` check too as it is always true in windows.. ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Mon Apr 11 04:59:58 2022 From: duke at openjdk.java.net (Tejesh R) Date: Mon, 11 Apr 2022 04:59:58 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v5] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 12:37:36 GMT, Alexey Ivanov wrote: > What happens if you add `\r` to an arbitrary location in text? > > What happens if you read in such a text? It doesn't matter, since the data is appended only if '\n' is present when EndofLine is '\r\n'...... ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Mon Apr 11 05:18:46 2022 From: duke at openjdk.java.net (Tejesh R) Date: Mon, 11 Apr 2022 05:18:46 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v2] In-Reply-To: References: <_UplvB0h9bWCInEGLRAN4bN3_sMypgu0hf0nU57pJgI=.8eef0557-500c-4939-b00f-ae9c0dd5a5b8@github.com> Message-ID: On Mon, 11 Apr 2022 04:51:18 GMT, Prasanta Sadhukhan wrote: > If this is true, then I guess we can remove `if (array[counter - 1] == '\r')` check too as it is always true in windows. If user uses system line separator then it vll be '\r\n' and it vll enter this loop, but if user manually enters \n in the string (unusual case) then it vll enter the else part....... To handle those unusual scenarios else case is required I guess....... ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From psadhukhan at openjdk.java.net Mon Apr 11 05:24:36 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 11 Apr 2022 05:24:36 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v2] In-Reply-To: References: <_UplvB0h9bWCInEGLRAN4bN3_sMypgu0hf0nU57pJgI=.8eef0557-500c-4939-b00f-ae9c0dd5a5b8@github.com> Message-ID: On Mon, 11 Apr 2022 05:15:22 GMT, Tejesh R wrote: > > If this is true, then I guess we can remove `if (array[counter - 1] == '\r')` check too as it is always true in windows. > > If user uses system line separator then it vll be '\r\n' and it vll enter this loop, but if user manually enters \n in the string (unusual case) then it vll enter the else part....... To handle those unusual scenarios else case is required I guess....... I guess in that case "else" part in l359 will be executed...I was talking about requirement of "else" part in l345 ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Mon Apr 11 05:29:45 2022 From: duke at openjdk.java.net (Tejesh R) Date: Mon, 11 Apr 2022 05:29:45 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v2] In-Reply-To: References: <_UplvB0h9bWCInEGLRAN4bN3_sMypgu0hf0nU57pJgI=.8eef0557-500c-4939-b00f-ae9c0dd5a5b8@github.com> Message-ID: <-BtJH5mB_rQX1P5oar_9Sf0aZRf9tKfJ8Hf1YA34P4M=.8b74bdce-0ace-4e43-8713-af4916b3a831@github.com> On Mon, 11 Apr 2022 05:21:49 GMT, Prasanta Sadhukhan wrote: > I guess in that case "else" part in l359 will be executed...I was talking about requirement of "else" part in l345 I did a sample test for this case, it did entered l345, I added \n manually at the end of string, since it passes `if (array[counter] == '\n') {` (l340) condition and fails `if (array[counter - 1] == '\r')` (l342), it executes the else part in l345..... ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Mon Apr 11 05:53:57 2022 From: duke at openjdk.java.net (Maxim Kartashev) Date: Mon, 11 Apr 2022 05:53:57 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v3] In-Reply-To: References: <1s3rujPqPuQFiA9xp2Rq4UoXMfP5fSpzQX_CNfl-UXw=.4b2a2871-1647-4c2f-a368-44ef8c7896c4@github.com> <6bK-iNlPfRxkowIW1_7WYUulcJ9qpcvCBgcG44Q0mHs=.e04e5fc2-d532-4684-bab1-3fd94ba58048@github.com> Message-ID: On Sat, 9 Apr 2022 22:13:57 GMT, Sergey Bylokhov wrote: >> @mrserb I agree with your logic, but fixing this now would certainly be not a semantically null change and would complicate the fix that has already been under review for over two months. I'd be happy to file a bug for this separate issue. > > The separate CR would be fine. @mrserb I filed [JDK-8284645](https://bugs.openjdk.java.net/browse/JDK-8284645). Please, add more info there if necessary. ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From duke at openjdk.java.net Mon Apr 11 06:27:44 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Mon, 11 Apr 2022 06:27:44 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v8] In-Reply-To: References: <7ot0fBLQsvKiNsxLdrbnv4R_MNr6qdLN_GBwNPjU-rY=.dcad59a1-d0d6-42b9-bdf4-6290f31a88e0@github.com> Message-ID: On Fri, 8 Apr 2022 07:55:57 GMT, Prasanta Sadhukhan wrote: >> @prrace @prsadhuk >> The issue with the system color returned by **keyboardFocusIndicatorColor** mentioned above, persists on macOS 12.3 as well. > > "accentColor" is swift property so not usable for jdk but you can use "controlAccentColor" which seems to work with 10.15 and 12.1 as per my limited testing. > You need to use @available check though.. > Even though it may not work for version lesser than 10.14, I guess it's ok as those versions are more or less obsolete and we will not be worse off than where we are now... > While you are at it, please consider renaming this function as told. @prsadhuk Update PR with the recommended changes. The "controlAccentColor" changes works as expected in Mac 12.3 as well. One thing that I wanted to clarify with the fix is - the focus ring color ("Focus.ring") is used at two other places AquaButtonUI and AquaFocus (for focused icon). With the current fix I'm setting **KEYBOARD_FOCUS_COLOR** as below - image Before and After images of focused icon - **Before** image **After (focus around icon slightly darker - focus ring color obtained from controlAccentColor property)** image Please let me know in case I need to add a NEW color (as shown below) instead of reusing the KEYBOARD_FOCUS_COLOR if the color effects on focused icon/ button doesn't look correct. image ------------- PR: https://git.openjdk.java.net/jdk/pull/7768 From psadhukhan at openjdk.java.net Mon Apr 11 07:10:43 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 11 Apr 2022 07:10:43 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v8] In-Reply-To: References: <7ot0fBLQsvKiNsxLdrbnv4R_MNr6qdLN_GBwNPjU-rY=.dcad59a1-d0d6-42b9-bdf4-6290f31a88e0@github.com> Message-ID: On Mon, 11 Apr 2022 06:24:46 GMT, Harshitha Onkar wrote: >> "accentColor" is swift property so not usable for jdk but you can use "controlAccentColor" which seems to work with 10.15 and 12.1 as per my limited testing. >> You need to use @available check though.. >> Even though it may not work for version lesser than 10.14, I guess it's ok as those versions are more or less obsolete and we will not be worse off than where we are now... >> While you are at it, please consider renaming this function as told. > > @prsadhuk Update PR with the recommended changes. The "controlAccentColor" changes works as expected in Mac 12.3 as well. > One thing that I wanted to clarify with the fix is - the focus ring color ("Focus.ring") is used at two other places AquaButtonUI and AquaFocus (for focused icon). With the current fix I'm setting **KEYBOARD_FOCUS_COLOR** as below - > > image > > Before and After images of focused icon - > > **Before** > > image > > **After (focus around icon slightly darker - focus ring color obtained from controlAccentColor property)** > > image > > Please let me know in case I need to add a NEW color (as shown below) instead of reusing the KEYBOARD_FOCUS_COLOR if the color effects on focused icon/ button doesn't look correct. > > image It seems KEYBOARD_FOCUS_COLOR via `focusRingColor` is also used for menuSelectedBackgroundColor which is used for CheckBoxMenuItem.selectionBackground ComboBox.selectionBackground Menu.selectionBackground MenuBar.selectionBackground MenuItem.selectionBackground "PopupMenu.selectionBackground", menuSelectedBackgroundColor, RadioButtonMenuItem.selectionBackground which might also get affected if you use new property, so you need to test all those widgets if you intend to use reuse KEYBOARD_FOCUS_COLOR so I guess safe bet is to use new color as you mentioned to limit the change to highlight color. ------------- PR: https://git.openjdk.java.net/jdk/pull/7768 From psadhukhan at openjdk.java.net Mon Apr 11 08:45:25 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 11 Apr 2022 08:45:25 GMT Subject: RFR: 8284646: Some swing test fail in macos12-aarch64 host Message-ID: Few tests are seen to be failing in macos12 M1 system due to slight difference in color as mentioned in [JDK-8277816](https://bugs.openjdk.java.net/browse/JDK-8277816) It seems the color difference was around 6-7 for swing tests, so these tests are extracted out in this issue and fixed by adding tolerance. I could not find, in M1 osx12.3 SystemPreferences, any way to set Color Profile to sRGB IEC61966-2.1 Profile so it seems osx12.x M1 use default setting. Several runs in CI system in all platforms including 12.x M1 pass with this change (test job link in JBS) ------------- Commit messages: - 8284646: Some swing test fail in macos12-aarch64 host Changes: https://git.openjdk.java.net/jdk/pull/8176/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8176&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284646 Stats: 28 lines in 5 files changed: 19 ins; 4 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/8176.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8176/head:pull/8176 PR: https://git.openjdk.java.net/jdk/pull/8176 From psadhukhan at openjdk.java.net Mon Apr 11 09:54:40 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 11 Apr 2022 09:54:40 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v2] In-Reply-To: <-BtJH5mB_rQX1P5oar_9Sf0aZRf9tKfJ8Hf1YA34P4M=.8b74bdce-0ace-4e43-8713-af4916b3a831@github.com> References: <_UplvB0h9bWCInEGLRAN4bN3_sMypgu0hf0nU57pJgI=.8eef0557-500c-4939-b00f-ae9c0dd5a5b8@github.com> <-BtJH5mB_rQX1P5oar_9Sf0aZRf9tKfJ8Hf1YA34P4M=.8b74bdce-0ace-4e43-8713-af4916b3a831@github.com> Message-ID: <2iwYbrtwatppiRFOhkdbKlHnx8Yzy_pspg8M66vb7Gc=.0311637d-9422-4685-b734-b28f5b0759f3@github.com> On Mon, 11 Apr 2022 05:26:29 GMT, Tejesh R wrote: > > I guess in that case "else" part in l359 will be executed...I was talking about requirement of "else" part in l345 > > I did a sample test for this case, it did entered l345, I added \n manually at the end of string, since it passes `if (array[counter] == '\n') {` (l340) condition and fails `if (array[counter - 1] == '\r')` (l342), it executes the else part in l345..... If you manually add \n to end of string, then as per your previous statements, this code block should have `\n\r\n` and then `\n` , right? Then, I guess user would expect one new line because he manually added \n, but as per your observation, the "else" part is executed so wouldn't `out.write(array, last, counter - last);` write the full \n\r\n\n again, ie 3 new lines? ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From aivanov at openjdk.java.net Mon Apr 11 10:13:42 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 11 Apr 2022 10:13:42 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v2] In-Reply-To: <2iwYbrtwatppiRFOhkdbKlHnx8Yzy_pspg8M66vb7Gc=.0311637d-9422-4685-b734-b28f5b0759f3@github.com> References: <_UplvB0h9bWCInEGLRAN4bN3_sMypgu0hf0nU57pJgI=.8eef0557-500c-4939-b00f-ae9c0dd5a5b8@github.com> <-BtJH5mB_rQX1P5oar_9Sf0aZRf9tKfJ8Hf1YA34P4M=.8b74bdce-0ace-4e43-8713-af4916b3a831@github.com> <2iwYbrtwatppiRFOhkdbKlHnx8Yzy_pspg8 M66vb7Gc=.0311637d-9422-4685-b734-b28f5b0759f3@github.com> Message-ID: On Mon, 11 Apr 2022 09:51:12 GMT, Prasanta Sadhukhan wrote: > > > I guess in that case "else" part in l359 will be executed...I was talking about requirement of "else" part in l345 > > > > > > I did a sample test for this case, it did entered l345, I added \n manually at the end of string, since it passes `if (array[counter] == '\n') {` (l340) condition and fails `if (array[counter - 1] == '\r')` (l342), it executes the else part in l345..... > > If you manually add \n to end of string, then as per your previous statements, this code block should have `\n\r\n` and then `\n` , right? Then, I guess user would expect one new line because he manually added \n, but as per your observation, the "else" part is executed so wouldn't `out.write(array, last, counter - last);` write the full \n\r\n\n again, ie 3 new lines? I admit I got lost in the discussion. If I understand correctly, the text model removes `\r` from `\r\n` when reading text files. In the `Document` model, `\n` represents the end of the line. The user explicitly added a text with Windows line end into the text model. When such a text is written out on Windows, an extra `\r` gets added. Then when this text is read in, the `\r` which is not followed by `\n` gets converted to `\n` which results in a new line break. The `else` block is needed, and it's the most common branch. The text model doesn't contain `\r` (should not contain). When the text is written out on Windows, line ends of `\n` are converted to `\r\n`. ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Mon Apr 11 10:13:44 2022 From: duke at openjdk.java.net (Tejesh R) Date: Mon, 11 Apr 2022 10:13:44 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v5] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 12:17:37 GMT, Tejesh R wrote: >> getText function returned extra endOfLine when appended. The reason was in `EditorEditorKit` class, `write(Writer out, Document doc, int pos, int len)` method, where translation happens from buffer to Out(Writer Object) if endOfLine is other than '\n' ( which is '\r\n' in windows). In order to write each line till End of line, the string till '\n' is written including '\r' and again endOfLine is written which results in extra Carriage Return. To solve this issue, a Condition is added which checks if previous character to '\n' is '\r', if true then whole string except Carriage Return ('\r') is written, else whole string till before '\n' is written. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on Review Comments > If I add '\n' after the string then it would be "\n\r\n" which would be mapped to "\r\n\r\n" resulting in extra space...... ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From aivanov at openjdk.java.net Mon Apr 11 10:13:45 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 11 Apr 2022 10:13:45 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v5] In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 04:56:08 GMT, Tejesh R wrote: > > What happens if you add `\r` to an arbitrary location in text? > > What happens if you read in such a text? > > It doesn't matter, since the data is appended only if '\n' is present when EndofLine is '\r\n'...... I'm not as sure? Well, yes, the text will be written out like expected and `\r` character will be preserved. Yet when such a text will be read in, the stranded `\r` will be converted to `\n` which will create an unexpected line break. Or am I wrong? ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Mon Apr 11 10:13:46 2022 From: duke at openjdk.java.net (Tejesh R) Date: Mon, 11 Apr 2022 10:13:46 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v2] In-Reply-To: References: <_UplvB0h9bWCInEGLRAN4bN3_sMypgu0hf0nU57pJgI=.8eef0557-500c-4939-b00f-ae9c0dd5a5b8@github.com> <-BtJH5mB_rQX1P5oar_9Sf0aZRf9tKfJ8Hf1YA34P4M=.8b74bdce-0ace-4e43-8713-af4916b3a831@github.com> <2iwYbrtwatppiRFOhkdbKlHnx8Yzy_pspg8 M66vb7Gc=.0311637d-9422-4685-b734-b28f5b0759f3@github.com> Message-ID: On Mon, 11 Apr 2022 10:07:40 GMT, Alexey Ivanov wrote: > The user explicitly added a text with Windows line end into the text model. When such a text is written out on Windows, an extra `\r` gets added. Then when this text is read in, the `\r` which is not followed by `\n` gets converted to `\n` which results in a new line break. > > The `else` block is needed, and it's the most common branch. The text model doesn't contain `\r` (should not contain). When the text is written out on Windows, line ends of `\n` are converted to `\r\n`. Yes, exactly...... ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Mon Apr 11 10:28:59 2022 From: duke at openjdk.java.net (Tejesh R) Date: Mon, 11 Apr 2022 10:28:59 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v5] In-Reply-To: References: Message-ID: <7jWZ42U57HbI58cze_Z9FxJA-O_19gQBpojKQzJx_1s=.e29e4f45-5925-4c01-9449-1c7a06186d66@github.com> On Mon, 11 Apr 2022 10:10:07 GMT, Alexey Ivanov wrote: > > > What happens if you add `\r` to an arbitrary location in text? > > > What happens if you read in such a text? > > > > > > It doesn't matter, since the data is appended only if '\n' is present when EndofLine is '\r\n'...... > > I'm not as sure? Well, yes, the text will be written out like expected and `\r` character will be preserved. Yet when such a text will be read in, the stranded `\r` will be converted to `\n` which will create an unexpected line break. Or am I wrong? In `read(Reader in, Document doc, int pos)`, of DefaultEditorKit class, the logic states this ` // Read in a block at a time, mapping \r\n to \n, as well as single // \r's to \n's. If a \r\n is encountered, \r\n will be set as the // newline string for the document, if \r is encountered it will // be set as the newline character, otherwise the newline property // for the document will be removed. ` ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From aivanov at openjdk.java.net Mon Apr 11 10:29:00 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 11 Apr 2022 10:29:00 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v5] In-Reply-To: <7jWZ42U57HbI58cze_Z9FxJA-O_19gQBpojKQzJx_1s=.e29e4f45-5925-4c01-9449-1c7a06186d66@github.com> References: <7jWZ42U57HbI58cze_Z9FxJA-O_19gQBpojKQzJx_1s=.e29e4f45-5925-4c01-9449-1c7a06186d66@github.com> Message-ID: On Mon, 11 Apr 2022 10:15:43 GMT, Tejesh R wrote: > > > What happens if you add `\r` to an arbitrary location in text? > > > What happens if you read in such a text? > > > > > > It doesn't matter, since the data is appended only if '\n' is present when EndofLine is '\r\n'...... > > I'm not as sure? Well, yes, the text will be written out like expected and `\r` character will be preserved. Yet when such a text will be read in, the stranded `\r` will be converted to `\n` which will create an unexpected line break. Or am I wrong? I edited your test case at line 119: pane0.appendLine("MyJTextPane using append()\r and then calling setText()"); And it creates a new line break after `append()` in the first `JTextPane`. > > > > What happens if you add `\r` to an arbitrary location in text? > > > > What happens if you read in such a text? > > > > > > > > > It doesn't matter, since the data is appended only if '\n' is present when EndofLine is '\r\n'...... > > > > > > I'm not as sure? Well, yes, the text will be written out like expected and `\r` character will be preserved. Yet when such a text will be read in, the stranded `\r` will be converted to `\n` which will create an unexpected line break. Or am I wrong? > > In `read(Reader in, Document doc, int pos)`, of DefaultEditorKit class, the logic states this `// Read in a block at a time, mapping \r\n to \n, as well as single // \r's to \n's. If a \r\n is encountered, \r\n will be set as the // newline string for the document, if \r is encountered it will // be set as the newline character, otherwise the newline property // for the document will be removed.` Is it a bug then? The test case in the bug description behaves according to the spec too: `\r` gets converted to `\n`. ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Mon Apr 11 10:29:03 2022 From: duke at openjdk.java.net (Tejesh R) Date: Mon, 11 Apr 2022 10:29:03 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v5] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 12:17:37 GMT, Tejesh R wrote: >> getText function returned extra endOfLine when appended. The reason was in `EditorEditorKit` class, `write(Writer out, Document doc, int pos, int len)` method, where translation happens from buffer to Out(Writer Object) if endOfLine is other than '\n' ( which is '\r\n' in windows). In order to write each line till End of line, the string till '\n' is written including '\r' and again endOfLine is written which results in extra Carriage Return. To solve this issue, a Condition is added which checks if previous character to '\n' is '\r', if true then whole string except Carriage Return ('\r') is written, else whole string till before '\n' is written. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on Review Comments > > > > What happens if you add `\r` to an arbitrary location in text? > > > > What happens if you read in such a text? > > > > > > > > > It doesn't matter, since the data is appended only if '\n' is present when EndofLine is '\r\n'...... > > > > > > I'm not as sure? Well, yes, the text will be written out like expected and `\r` character will be preserved. Yet when such a text will be read in, the stranded `\r` will be converted to `\n` which will create an unexpected line break. Or am I wrong? > > I edited your test case at line 119: > > ```java > pane0.appendLine("MyJTextPane using append()\r and then calling setText()"); > ``` > > And it creates a new line break after `append()` in the first `JTextPane`. Yeah, \r converted to newline character...... ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From aivanov at openjdk.java.net Mon Apr 11 10:29:05 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 11 Apr 2022 10:29:05 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v5] In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 10:08:24 GMT, Tejesh R wrote: > > > > If I add '\n' after the string then it would be "\n\r\n" which would be mapped to "\r\n\r\n" resulting in extra space...... Resulting in extra space? As far as I can see, both samples have two line breaks and they're preserved. *With the updated code*, right? ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Mon Apr 11 10:29:07 2022 From: duke at openjdk.java.net (Tejesh R) Date: Mon, 11 Apr 2022 10:29:07 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v5] In-Reply-To: References: <7jWZ42U57HbI58cze_Z9FxJA-O_19gQBpojKQzJx_1s=.e29e4f45-5925-4c01-9449-1c7a06186d66@github.com> Message-ID: On Mon, 11 Apr 2022 10:20:52 GMT, Alexey Ivanov wrote: > Is it a bug then? It is not a bug I guess, it is as expected and as commented out about the logic in `read()` method...... The bug states this statement " But if we use append() first and then setText(pane.getText + newText), before every \r\n another \r is added, and in output, extra blank line are added."...... In windows extra \r was added because of the previous logic, it was causing an extra empty line...... ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Mon Apr 11 10:35:47 2022 From: duke at openjdk.java.net (Tejesh R) Date: Mon, 11 Apr 2022 10:35:47 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v5] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 12:17:37 GMT, Tejesh R wrote: >> getText function returned extra endOfLine when appended. The reason was in `EditorEditorKit` class, `write(Writer out, Document doc, int pos, int len)` method, where translation happens from buffer to Out(Writer Object) if endOfLine is other than '\n' ( which is '\r\n' in windows). In order to write each line till End of line, the string till '\n' is written including '\r' and again endOfLine is written which results in extra Carriage Return. To solve this issue, a Condition is added which checks if previous character to '\n' is '\r', if true then whole string except Carriage Return ('\r') is written, else whole string till before '\n' is written. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on Review Comments > > > > > > > > > If I add '\n' after the string then it would be "\n\r\n" which would be mapped to "\r\n\r\n" resulting in extra space...... > > Resulting in extra space? > > As far as I can see, both samples have two line breaks and they're preserved. _With the updated code_, right? Yeah, in old code also the result for this sample would be same I guess, the old code bug was only w.r.t "\r\n" (one line break) resulting in "\r\r\n" (two line breaks). ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From aivanov at openjdk.java.net Mon Apr 11 10:42:36 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 11 Apr 2022 10:42:36 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v5] In-Reply-To: References: <7jWZ42U57HbI58cze_Z9FxJA-O_19gQBpojKQzJx_1s=.e29e4f45-5925-4c01-9449-1c7a06186d66@github.com> Message-ID: On Mon, 11 Apr 2022 10:26:35 GMT, Tejesh R wrote: > > Is it a bug then? > > It is not a bug I guess, it is as expected and as commented out about the logic in `read()` method...... The bug states this statement " But if we use append() first and then setText(pane.getText + newText), before every \r\n another \r is added, and in output, extra blank line are added."...... In windows extra \r was added because of the previous logic, it was causing an extra empty line...... There will be no extra line if `System.lineSeparator()` is not used. And it shouldn't be used with text APIs: the text model always uses Linux/macOS style line ends that is `\n` only. If you add `\r` into the text model, eventually it'll get converted to `\n` as specified by `DefaultEditorKit`. ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From aivanov at openjdk.java.net Mon Apr 11 12:11:56 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 11 Apr 2022 12:11:56 GMT Subject: RFR: 8283507: Create a regression test for RFE 4287690 [v3] In-Reply-To: <8I-5r07BeDPRL2uLjrILbcFMQAYszp2c5xpI8v_ZM0c=.c0d2f711-1281-435b-9c83-b31d94d4a3eb@github.com> References: <8I-5r07BeDPRL2uLjrILbcFMQAYszp2c5xpI8v_ZM0c=.c0d2f711-1281-435b-9c83-b31d94d4a3eb@github.com> Message-ID: On Fri, 8 Apr 2022 07:12:21 GMT, Manukumar V S wrote: >> Create a regression test for [JDK-4287690](https://bugs.openjdk.java.net/browse/JDK-4287690) >> Issue description: >> I want JComboBox to send an event just before the popup (drop down) list is displayed. >> >> Fix: >> This requires some additional API targeted for major release of the JDK (1.4).The PopupMenuEvent will from the JPopupMenu will be forwarded to the JComboBox. A client of the JComboBox can register itself as a PopupMenuListener to receive the notification. >> So JComboBox should send drop down events when the drop down popup is visible as well as invisible. JComboBox.addPopupMenuListener(PopupMenuListener) can be used to register for pop up events. >> >> Testing: >> Tested using Mach5 in all platforms available(macos,linux and windows) and got all pass. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Review comment fixed: Removed unwanted directory Looks good. test/jdk/javax/swing/JComboBox/JComboBoxPopupMenuEventTest.java line 60: > 58: > 59: private static final String[] compStrs = > 60: {"apple", "citibank", "cisco", "cienna", "Oracle", "IBM"}; Probably, all company names should be capitalised? test/jdk/javax/swing/JComboBox/JComboBoxPopupMenuEventTest.java line 134: > 132: .invokeAndWait(() -> loc.set(jComponent.getLocationOnScreen())); > 133: final Point location = loc.get(); > 134: return location; Could be simplified to Suggestion: return loc.get(); test/jdk/javax/swing/JComboBox/JComboBoxPopupMenuEventTest.java line 166: > 164: for (String comp : comps) { > 165: comboBox.addItem(comp); > 166: } Just a suggestion: use `.forEach` and add items to the `comboBox` right in the stream without creating an intermediate list. ------------- Marked as reviewed by aivanov (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7906 From aivanov at openjdk.java.net Mon Apr 11 12:22:47 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 11 Apr 2022 12:22:47 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v6] In-Reply-To: References: Message-ID: <0tBOmlX8CMkaVB8l0nQcd_YKXtQSlAH_8S0_SNQQmUk=.01cb6513-7667-4baa-bf4d-27b20337bfa1@github.com> On Sat, 9 Apr 2022 06:31:21 GMT, Sergey Bylokhov wrote: > Just an idea can we replace the builtin in the jtreg "manual" tests machinery by something like this? An interesting idea. However, this would require updating all the existing tests including those that use its custom UI for `run/manual`. Is it worth? I doubt it? > Also would like to raise a question: should we show the test instructions in the same VM where the test executed or we can show it in a separate VM? A good idea. The instructions used to be shown in the same VM. And the majority of UI tests don't cause the VM to crash therefore the complexity of separating instructions from the test UI doesn't seem to provide much benefit. ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From aturbanov at openjdk.java.net Mon Apr 11 12:26:14 2022 From: aturbanov at openjdk.java.net (Andrey Turbanov) Date: Mon, 11 Apr 2022 12:26:14 GMT Subject: RFR: 8284672: Collapse identical catch branches in java.desktop Message-ID: Let's take advantage of Java 7 language feature - "Catching Multiple Exception Types". It simplifies code. Reduces duplication. Found by IntelliJ IDEA inspection Identical 'catch' branches in 'try' statement ------------- Commit messages: - [PATCH] Collapse identical catch branches in java.desktop Changes: https://git.openjdk.java.net/jdk/pull/8154/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8154&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284672 Stats: 300 lines in 45 files changed: 2 ins; 170 del; 128 mod Patch: https://git.openjdk.java.net/jdk/pull/8154.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8154/head:pull/8154 PR: https://git.openjdk.java.net/jdk/pull/8154 From neugens at openjdk.java.net Mon Apr 11 13:29:48 2022 From: neugens at openjdk.java.net (Mario Torre) Date: Mon, 11 Apr 2022 13:29:48 GMT Subject: RFR: 8284093: Memory leak: X11SD_DisposeXImage should also free obdata In-Reply-To: <1X0DLnuKgL-jVip5RrGZZcxQof6Z0njfXDrymX1lojs=.35d58243-f34c-4737-a217-6118ebead825@github.com> References: <1X0DLnuKgL-jVip5RrGZZcxQof6Z0njfXDrymX1lojs=.35d58243-f34c-4737-a217-6118ebead825@github.com> Message-ID: <8H73Ke-nAWQ5bYn8x7RfYN8AwCba6hCkzRJb8dzDLLw=.5db7403b-77e3-439a-b1a5-895ffc25455c@github.com> On Thu, 31 Mar 2022 13:30:40 GMT, Zhengyu Gu wrote: > Please review this small patch to fix leaking `XShmSegmentInfo` that is attached to `XImage`. > > Test: > > - [x] jdk_2d I'm not officially a reviewer but afaik there isn't any other place where the obdata is freed, and X11SD_DropSharedSegment doesn't do it, so we probably need to do it there. Since obdata is malloced in X11SD_CreateSharedImage, it seems correct to free it in X11SD_DisposeXImage (instead of directly within X11SD_DropSharedSegment), so the patch looks good to me. ------------- PR: https://git.openjdk.java.net/jdk/pull/8060 From andrew at openjdk.java.net Mon Apr 11 13:36:51 2022 From: andrew at openjdk.java.net (Andrew John Hughes) Date: Mon, 11 Apr 2022 13:36:51 GMT Subject: RFR: 8284093: Memory leak: X11SD_DisposeXImage should also free obdata In-Reply-To: <1X0DLnuKgL-jVip5RrGZZcxQof6Z0njfXDrymX1lojs=.35d58243-f34c-4737-a217-6118ebead825@github.com> References: <1X0DLnuKgL-jVip5RrGZZcxQof6Z0njfXDrymX1lojs=.35d58243-f34c-4737-a217-6118ebead825@github.com> Message-ID: On Thu, 31 Mar 2022 13:30:40 GMT, Zhengyu Gu wrote: > Please review this small patch to fix leaking `XShmSegmentInfo` that is attached to `XImage`. > > Test: > > - [x] jdk_2d This looks correct to me. There is another similar block: if (xsdo->shmPMData.shmSegInfo != NULL) { X11SD_DropSharedSegment(xsdo->shmPMData.shmSegInfo); xsdo->shmPMData.shmSegInfo = NULL; } But `xsdo->shmPMData.shmSegInfo` is assigned `img->obdata` in `X11SD_CreateSharedPixmap`, so looks like this is the one and only place to free this. ------------- Marked as reviewed by andrew (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8060 From zgu at openjdk.java.net Mon Apr 11 13:36:53 2022 From: zgu at openjdk.java.net (Zhengyu Gu) Date: Mon, 11 Apr 2022 13:36:53 GMT Subject: RFR: 8284093: Memory leak: X11SD_DisposeXImage should also free obdata In-Reply-To: <8H73Ke-nAWQ5bYn8x7RfYN8AwCba6hCkzRJb8dzDLLw=.5db7403b-77e3-439a-b1a5-895ffc25455c@github.com> References: <1X0DLnuKgL-jVip5RrGZZcxQof6Z0njfXDrymX1lojs=.35d58243-f34c-4737-a217-6118ebead825@github.com> <8H73Ke-nAWQ5bYn8x7RfYN8AwCba6hCkzRJb8dzDLLw=.5db7403b-77e3-439a-b1a5-895ffc25455c@github.com> Message-ID: On Mon, 11 Apr 2022 13:26:03 GMT, Mario Torre wrote: >> Please review this small patch to fix leaking `XShmSegmentInfo` that is attached to `XImage`. >> >> Test: >> >> - [x] jdk_2d > > I'm not officially a reviewer but afaik there isn't any other place where the obdata is freed, and X11SD_DropSharedSegment doesn't do it, so we probably need to do it there. Since obdata is malloced in X11SD_CreateSharedImage, it seems correct to free it in X11SD_DisposeXImage (instead of directly within X11SD_DropSharedSegment), so the patch looks good to me. Thanks, @neugens @gnu-andrew ------------- PR: https://git.openjdk.java.net/jdk/pull/8060 From zgu at openjdk.java.net Mon Apr 11 13:39:43 2022 From: zgu at openjdk.java.net (Zhengyu Gu) Date: Mon, 11 Apr 2022 13:39:43 GMT Subject: Integrated: 8284093: Memory leak: X11SD_DisposeXImage should also free obdata In-Reply-To: <1X0DLnuKgL-jVip5RrGZZcxQof6Z0njfXDrymX1lojs=.35d58243-f34c-4737-a217-6118ebead825@github.com> References: <1X0DLnuKgL-jVip5RrGZZcxQof6Z0njfXDrymX1lojs=.35d58243-f34c-4737-a217-6118ebead825@github.com> Message-ID: On Thu, 31 Mar 2022 13:30:40 GMT, Zhengyu Gu wrote: > Please review this small patch to fix leaking `XShmSegmentInfo` that is attached to `XImage`. > > Test: > > - [x] jdk_2d This pull request has now been integrated. Changeset: 205cfb84 Author: Zhengyu Gu URL: https://git.openjdk.java.net/jdk/commit/205cfb84968fe93cbfe7d509e1e7d051ed05f97c Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod 8284093: Memory leak: X11SD_DisposeXImage should also free obdata Reviewed-by: prr, andrew ------------- PR: https://git.openjdk.java.net/jdk/pull/8060 From mvs at openjdk.java.net Mon Apr 11 13:51:41 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Mon, 11 Apr 2022 13:51:41 GMT Subject: RFR: 8283507: Create a regression test for RFE 4287690 [v4] In-Reply-To: References: Message-ID: > Create a regression test for [JDK-4287690](https://bugs.openjdk.java.net/browse/JDK-4287690) > Issue description: > I want JComboBox to send an event just before the popup (drop down) list is displayed. > > Fix: > This requires some additional API targeted for major release of the JDK (1.4).The PopupMenuEvent will from the JPopupMenu will be forwarded to the JComboBox. A client of the JComboBox can register itself as a PopupMenuListener to receive the notification. > So JComboBox should send drop down events when the drop down popup is visible as well as invisible. JComboBox.addPopupMenuListener(PopupMenuListener) can be used to register for pop up events. > > Testing: > Tested using Mach5 in all platforms available(macos,linux and windows) and got all pass. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Review comments fixed: Formatting changes, removed unwanted for loop, company names in Camel ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7906/files - new: https://git.openjdk.java.net/jdk/pull/7906/files/cba696d7..a30db6a1 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7906&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7906&range=02-03 Stats: 14 lines in 1 file changed: 0 ins; 5 del; 9 mod Patch: https://git.openjdk.java.net/jdk/pull/7906.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7906/head:pull/7906 PR: https://git.openjdk.java.net/jdk/pull/7906 From aivanov at openjdk.java.net Mon Apr 11 14:01:41 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 11 Apr 2022 14:01:41 GMT Subject: RFR: 8283507: Create a regression test for RFE 4287690 [v4] In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 13:51:41 GMT, Manukumar V S wrote: >> Create a regression test for [JDK-4287690](https://bugs.openjdk.java.net/browse/JDK-4287690) >> Issue description: >> I want JComboBox to send an event just before the popup (drop down) list is displayed. >> >> Fix: >> This requires some additional API targeted for major release of the JDK (1.4).The PopupMenuEvent will from the JPopupMenu will be forwarded to the JComboBox. A client of the JComboBox can register itself as a PopupMenuListener to receive the notification. >> So JComboBox should send drop down events when the drop down popup is visible as well as invisible. JComboBox.addPopupMenuListener(PopupMenuListener) can be used to register for pop up events. >> >> Testing: >> Tested using Mach5 in all platforms available(macos,linux and windows) and got all pass. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Review comments fixed: Formatting changes, removed unwanted for loop, company names in Camel Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7906 From mvs at openjdk.java.net Mon Apr 11 14:04:52 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Mon, 11 Apr 2022 14:04:52 GMT Subject: Integrated: 8283507: Create a regression test for RFE 4287690 In-Reply-To: References: Message-ID: <4iPckKBvqPA5HmmxC41SZykZlmqoOKgGE_0D_ZzlP98=.b6a4b975-2b30-472f-8c38-a715dd51cd7f@github.com> On Tue, 22 Mar 2022 15:48:39 GMT, Manukumar V S wrote: > Create a regression test for [JDK-4287690](https://bugs.openjdk.java.net/browse/JDK-4287690) > Issue description: > I want JComboBox to send an event just before the popup (drop down) list is displayed. > > Fix: > This requires some additional API targeted for major release of the JDK (1.4).The PopupMenuEvent will from the JPopupMenu will be forwarded to the JComboBox. A client of the JComboBox can register itself as a PopupMenuListener to receive the notification. > So JComboBox should send drop down events when the drop down popup is visible as well as invisible. JComboBox.addPopupMenuListener(PopupMenuListener) can be used to register for pop up events. > > Testing: > Tested using Mach5 in all platforms available(macos,linux and windows) and got all pass. This pull request has now been integrated. Changeset: 7edd1861 Author: Manukumar V S Committer: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/7edd18612155b8e66f214a17e65ef775b470955e Stats: 200 lines in 1 file changed: 200 ins; 0 del; 0 mod 8283507: Create a regression test for RFE 4287690 Reviewed-by: serb, aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/7906 From avu at openjdk.java.net Mon Apr 11 15:01:40 2022 From: avu at openjdk.java.net (Alexey Ushakov) Date: Mon, 11 Apr 2022 15:01:40 GMT Subject: RFR: 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill [v2] In-Reply-To: References: Message-ID: On Fri, 1 Apr 2022 15:43:29 GMT, Alexey Ushakov wrote: >> Throwing InvalidPipeException for incompatible surfaces > > Alexey Ushakov has updated the pull request incrementally with one additional commit since the last revision: > > 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill > > Extracted try/catch logic of SurfaceData cast to particular SurfaceData subclass into convenience method SurfaceData.convertTo(). Applied the method to XRTextRenderer.drawGlyphList() and XRMaskFill.MaskFill(). Refactored try/catch blocks handling similar cases. @aghaisas Could you please review these changes. ------------- PR: https://git.openjdk.java.net/jdk/pull/8015 From aivanov at openjdk.java.net Mon Apr 11 16:00:56 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 11 Apr 2022 16:00:56 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v6] In-Reply-To: References: Message-ID: On Thu, 7 Apr 2022 15:09:27 GMT, lawrence.andrews wrote: >> We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following >> 1) Frame which contains test instruction . >> 2) Pass & Fail button so that user can mark the test pass or fail >> 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. >> 4) Disposing of all the frames. >> >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 26: > 24: /* > 25: * @test > 26: * @bug 8022536 Why is [800535](https://bugs.openjdk.java.net/browse/JDK-8008535) removed? It's the bug this test is written for. The additional bug [8022536](https://bugs.openjdk.java.net/browse/JDK-8022536) may cause NPE on Linux if a (default) remote printer is unavailable. test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 52: > 50: private static String info = """ > 51: To test 8022536, if a remote printer is the system default, > 52: it should show in the dialog as the selected printer. Should these two lines be moved to the bottom of the instructions? This case is not the main test case of this test and it's also covered by another test `javax/print/TextFlavorTest.java`. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 58: > 56: private static final Timer timer = new Timer(0, null); > 57: > 58: public enum POSITION {HORIZONTAL, VERTICAL} Suggestion: public enum Position {HORIZONTAL, VERTICAL} The type shouldn't be all-capital, should it? test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 78: > 76: * @throws HeadlessException HeadlessException > 77: * @throws InterruptedException exception thrown for invokeAndWait > 78: * @throws InvocationTargetException exception thrown for invokeAndWait I expected a more reasonable descriptions when any of the exceptions may be thrown. Anyway, it's unimportant. :) test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 102: > 100: instructionsText.setLineWrap(true); > 101: > 102: int testTimeout = (int) TimeUnit.MINUTES.toMillis(timeoutInMinutes); Use `long`, it's safer and it's used everywhere when working with time. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 109: > 107: timer.setDelay(1000); > 108: timer.addActionListener((e) -> { > 109: int leftTime = testTimeout - (int) (System.currentTimeMillis() - startTime); `long timeLeft` is better. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 113: > 111: timer.stop(); > 112: testFailedReason = "Failure Reason:\n Timeout " + > 113: "User did not perform testing."; A suggestion: break string at the line break. Suggestion: testFailedReason = "Failure Reason:\n" + "Timeout - User did not perform testing."; test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 144: > 142: super.windowClosing(e); > 143: testFailedReason = "Failure Reason:\n User closed the " + > 144: "instruction Frame"; Suggestion: testFailedReason = "Failure Reason:\n" + "User closed the instruction frame"; I think it's easier to read this way, the parts of the phrase aren't broken. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 181: > 179: if (isEventDispatchThread()) { > 180: disposeFrames(); > 181: } else invokeAndWait(PassFailJFrame::disposeFrames); This is bad from Java Code Style point of view. Additionally, you stated this method is not to be called on EDT, therefore you know `disposeFrames` should be called via `invokeAndWait`. Shall this method throw an exception if it's called on EDT? It will prevent accidental mistakes. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 208: > 206: * example in the jtreg .jtr file. > 207: */ > 208: public static void getFailureReason() { It's not public actually. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 232: > 230: super.windowClosing(e); > 231: testFailedReason = "User closed the " + > 232: "dialog"; I see no reason to break this string, it fits into 80-column. Yet it's not an error: I'd rather leave the failure reason empty. In this case, the window listener can be dropped. You can safely remove `super.windowClosing(e);`, the implementation in `WindowAdapter` does nothing. ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From aivanov at openjdk.java.net Mon Apr 11 16:20:58 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 11 Apr 2022 16:20:58 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v6] In-Reply-To: References: Message-ID: On Thu, 7 Apr 2022 15:09:27 GMT, lawrence.andrews wrote: >> We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following >> 1) Frame which contains test instruction . >> 2) Pass & Fail button so that user can mark the test pass or fail >> 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. >> 4) Disposing of all the frames. >> >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 52: > 50: private final static CountDownLatch latch = new CountDownLatch(1); > 51: private static volatile boolean failed = false; > 52: private static volatile boolean timeout = false; `false` is the default value, so you can skip assigning `false`. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 198: > 196: * well as the frame that is added via addTestFrame(Frame frame) > 197: */ > 198: private static void disposeFrames() { It should be `synchronized` to prevent access to `frameList` from another thread while it's being iterated. ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From dcubed at openjdk.java.net Mon Apr 11 17:16:16 2022 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Mon, 11 Apr 2022 17:16:16 GMT Subject: RFR: 8284691: ProblemList javax/swing/JTable/8236907/LastVisibleRow.java on macosx Message-ID: A trivial fix to ProblemList javax/swing/JTable/8236907/LastVisibleRow.java on macosx. This new bug was filed late Friday and already has 6 sightings. ------------- Commit messages: - 8284691: ProblemList javax/swing/JTable/8236907/LastVisibleRow.java on macosx Changes: https://git.openjdk.java.net/jdk/pull/8186/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8186&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284691 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8186.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8186/head:pull/8186 PR: https://git.openjdk.java.net/jdk/pull/8186 From azvegint at openjdk.java.net Mon Apr 11 17:22:41 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Mon, 11 Apr 2022 17:22:41 GMT Subject: RFR: 8284691: ProblemList javax/swing/JTable/8236907/LastVisibleRow.java on macosx In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 17:10:27 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList javax/swing/JTable/8236907/LastVisibleRow.java on macosx. > > This new bug was filed late Friday and already has 6 sightings. Marked as reviewed by azvegint (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8186 From rriggs at openjdk.java.net Mon Apr 11 17:33:43 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Mon, 11 Apr 2022 17:33:43 GMT Subject: RFR: 8284691: ProblemList javax/swing/JTable/8236907/LastVisibleRow.java on macosx In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 17:10:27 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList javax/swing/JTable/8236907/LastVisibleRow.java on macosx. > > This new bug was filed late Friday and already has 6 sightings. Marked as reviewed by rriggs (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8186 From duke at openjdk.java.net Mon Apr 11 17:50:34 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Mon, 11 Apr 2022 17:50:34 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v7] In-Reply-To: References: Message-ID: > We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following > 1) Frame which contains test instruction . > 2) Pass & Fail button so that user can mark the test pass or fail > 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. > 4) Disposing of all the frames. > > @aivanov-jdk lawrence.andrews has updated the pull request incrementally with two additional commits since the last revision: - Fixed jcheck issue - Fixed review comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7966/files - new: https://git.openjdk.java.net/jdk/pull/7966/files/a10ac21b..1f6852e8 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7966&range=06 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7966&range=05-06 Stats: 40 lines in 2 files changed: 5 ins; 12 del; 23 mod Patch: https://git.openjdk.java.net/jdk/pull/7966.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7966/head:pull/7966 PR: https://git.openjdk.java.net/jdk/pull/7966 From aivanov at openjdk.java.net Mon Apr 11 18:01:46 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 11 Apr 2022 18:01:46 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v7] In-Reply-To: References: Message-ID: <7tDDRAVTkMS3RuT-ckGxnFQosOwKB_khWpcQU0BRqsk=.0b343022-14c6-4cd4-93f1-86351e5398e5@github.com> On Mon, 11 Apr 2022 17:50:34 GMT, lawrence.andrews wrote: >> We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following >> 1) Frame which contains test instruction . >> 2) Pass & Fail button so that user can mark the test pass or fail >> 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. >> 4) Disposing of all the frames. >> >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with two additional commits since the last revision: > > - Fixed jcheck issue > - Fixed review comments test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 55: > 53: the output to the printer, and examine it. It should have > 54: text looking like this : \u4e00\u4e01\u4e02\u4e03\u4e04English > 55: To test 8022536, if a remote printer is the system default, Maybe a blank line will separate the two cases clearer. ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From zgu at openjdk.java.net Mon Apr 11 18:12:07 2022 From: zgu at openjdk.java.net (Zhengyu Gu) Date: Mon, 11 Apr 2022 18:12:07 GMT Subject: RFR: 8284680: sun.font.FontConfigManager.getFontConfig() leaks charset Message-ID: Please review this small patch that releases temporary charsets to avoid memory leak. Test: - [x] jdk_2d ------------- Commit messages: - v0 Changes: https://git.openjdk.java.net/jdk/pull/8187/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8187&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284680 Stats: 10 lines in 1 file changed: 9 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8187.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8187/head:pull/8187 PR: https://git.openjdk.java.net/jdk/pull/8187 From duke at openjdk.java.net Mon Apr 11 18:17:34 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Mon, 11 Apr 2022 18:17:34 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v8] In-Reply-To: References: Message-ID: <0FlPbWDHC___agVYDwtV0diWiQRTw8KOIFwckJZLZ-Y=.8a596090-2dd0-45f1-a24d-933c4f6ecd4f@github.com> > We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following > 1) Frame which contains test instruction . > 2) Pass & Fail button so that user can mark the test pass or fail > 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. > 4) Disposing of all the frames. > > @aivanov-jdk lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Mark info as final ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7966/files - new: https://git.openjdk.java.net/jdk/pull/7966/files/1f6852e8..07735ce4 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7966&range=07 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7966&range=06-07 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/7966.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7966/head:pull/7966 PR: https://git.openjdk.java.net/jdk/pull/7966 From aivanov at openjdk.java.net Mon Apr 11 18:17:34 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 11 Apr 2022 18:17:34 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v7] In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 17:50:34 GMT, lawrence.andrews wrote: >> We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following >> 1) Frame which contains test instruction . >> 2) Pass & Fail button so that user can mark the test pass or fail >> 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. >> 4) Disposing of all the frames. >> >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with two additional commits since the last revision: > > - Fixed jcheck issue > - Fixed review comments Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From aivanov at openjdk.java.net Mon Apr 11 18:17:34 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 11 Apr 2022 18:17:34 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v8] In-Reply-To: <0FlPbWDHC___agVYDwtV0diWiQRTw8KOIFwckJZLZ-Y=.8a596090-2dd0-45f1-a24d-933c4f6ecd4f@github.com> References: <0FlPbWDHC___agVYDwtV0diWiQRTw8KOIFwckJZLZ-Y=.8a596090-2dd0-45f1-a24d-933c4f6ecd4f@github.com> Message-ID: On Mon, 11 Apr 2022 18:13:57 GMT, lawrence.andrews wrote: >> We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following >> 1) Frame which contains test instruction . >> 2) Pass & Fail button so that user can mark the test pass or fail >> 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. >> 4) Disposing of all the frames. >> >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Mark info as final Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From aivanov at openjdk.java.net Mon Apr 11 18:17:35 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 11 Apr 2022 18:17:35 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v7] In-Reply-To: <7tDDRAVTkMS3RuT-ckGxnFQosOwKB_khWpcQU0BRqsk=.0b343022-14c6-4cd4-93f1-86351e5398e5@github.com> References: <7tDDRAVTkMS3RuT-ckGxnFQosOwKB_khWpcQU0BRqsk=.0b343022-14c6-4cd4-93f1-86351e5398e5@github.com> Message-ID: <-2osUj4MJg3pQ38I64L9LAlTEtnsx49SSKXpHQZQRRg=.75571155-d4d6-4e7f-bddb-7d32b36b2f3b@github.com> On Mon, 11 Apr 2022 17:57:38 GMT, Alexey Ivanov wrote: >> lawrence.andrews has updated the pull request incrementally with two additional commits since the last revision: >> >> - Fixed jcheck issue >> - Fixed review comments > > test/jdk/java/awt/print/PrinterJob/PrintLatinCJKTest.java line 55: > >> 53: the output to the printer, and examine it. It should have >> 54: text looking like this : \u4e00\u4e01\u4e02\u4e03\u4e04English >> 55: To test 8022536, if a remote printer is the system default, > > Maybe a blank line will separate the two cases clearer. Thanks! ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From dcubed at openjdk.java.net Mon Apr 11 18:58:43 2022 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Mon, 11 Apr 2022 18:58:43 GMT Subject: RFR: 8284691: ProblemList javax/swing/JTable/8236907/LastVisibleRow.java on macosx In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 17:19:42 GMT, Alexander Zvegintsev wrote: >> A trivial fix to ProblemList javax/swing/JTable/8236907/LastVisibleRow.java on macosx. >> >> This new bug was filed late Friday and already has 6 sightings. > > Marked as reviewed by azvegint (Reviewer). @azvegint and @RogerRiggs - Thanks for the reviews! ------------- PR: https://git.openjdk.java.net/jdk/pull/8186 From dcubed at openjdk.java.net Mon Apr 11 18:58:44 2022 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Mon, 11 Apr 2022 18:58:44 GMT Subject: Integrated: 8284691: ProblemList javax/swing/JTable/8236907/LastVisibleRow.java on macosx In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 17:10:27 GMT, Daniel D. Daugherty wrote: > A trivial fix to ProblemList javax/swing/JTable/8236907/LastVisibleRow.java on macosx. > > This new bug was filed late Friday and already has 6 sightings. This pull request has now been integrated. Changeset: 929f5871 Author: Daniel D. Daugherty URL: https://git.openjdk.java.net/jdk/commit/929f58714aca877f5b9d97db34a9c01ff7c7e45f Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod 8284691: ProblemList javax/swing/JTable/8236907/LastVisibleRow.java on macosx Reviewed-by: azvegint, rriggs ------------- PR: https://git.openjdk.java.net/jdk/pull/8186 From serb at openjdk.java.net Mon Apr 11 22:24:12 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 11 Apr 2022 22:24:12 GMT Subject: RFR: 8284699: Include all image types to the J2DBench.ColorConvertOpTests Message-ID: The J2DBench.ColorConvertOp tests are used to track the performance of the littlecms library in the JDK. The new version of the littlecms will add support for the premultiplied alpha. But right now the J2DBench does not test the pre-alpha formats, so I have added all standard types we have. FYI: I have tested all combinations of these flags w/o issues. ------------- Commit messages: - Update ColorConvertOpTests.java - Initial version of JDK-8284699 Changes: https://git.openjdk.java.net/jdk/pull/8188/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8188&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284699 Stats: 15 lines in 1 file changed: 11 ins; 1 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/8188.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8188/head:pull/8188 PR: https://git.openjdk.java.net/jdk/pull/8188 From duke at openjdk.java.net Mon Apr 11 22:49:40 2022 From: duke at openjdk.java.net (lukeu) Date: Mon, 11 Apr 2022 22:49:40 GMT Subject: RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v8] In-Reply-To: References: Message-ID: <0g-tqs8KPJDkijGscIODMu5xLieQRH6sIJH13e7tWvA=.b0d9467d-3e93-4536-8c8d-f713e93f297b@github.com> On Thu, 7 Apr 2022 20:24:29 GMT, Alisen Chung wrote: >> Changed the drawing area to be increased by 0.5 on the left side to prevent clipping > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > fixed 1.25 scaling overdraw, fixed calcs for right and bottom side borders Printing, looks good. (Well, ignoring the missing checkboxes! I assume that's a separate thing.) ![JDK-8279614-patch4-printed-cropped](https://user-images.githubusercontent.com/2722420/162843419-6f84983b-71e3-4e53-ad99-5a1808456499.png) You're going to hate me (I'm sorry!) but I spotted that at 225% and 350% scaling the bottom shadow line can sometime overhang by 1px. (Not that you can really spot it without zooming / looking specifically for it, mind you.) ![JDK-8279614-patch4-scaling_225-zoomed](https://user-images.githubusercontent.com/2722420/162843428-f8fb47f5-9056-4c10-bb16-2d5034fbd104.png) ------------- PR: https://git.openjdk.java.net/jdk/pull/7449 From duke at openjdk.java.net Tue Apr 12 00:13:13 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Tue, 12 Apr 2022 00:13:13 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v10] In-Reply-To: References: Message-ID: > Previously while tabbing through the JTable cell, the cell highlighter/focus ring was not visible against the selection background. > > Changes are made to Aqua LAF to derive a lighter focus ring color by changing saturation and setting brightness component to 100% of original focus ring color so that it is visible while tabbing through `JTable` cells. A new method is added for this purpose which takes in `focusRingColor`, does adjustment to saturation and brightness and returns a new focus ring color. There are edge cases where the HSB transformation does not yield the right focus ring color, for these cases a default color is returned. > > **Edge Cases** > ![image](https://user-images.githubusercontent.com/95945681/161360456-3929acf1-282b-4c2b-95d1-1d5707c1e238.png) > > The edge case condition consists of two parts ? > To handle white/black colors - (hsbValues[0] == 0 && hsbValues[1] == 0) - representing hue and saturation of zero obtained for black, white or exactly grey (red=green=color) conditions > To handle grayish colors - hsbValues[1] <= satGrayScale where satGrayScale <= 0.10 . For any given hue and brightness, a saturation of less than or equal to 10% represents grayish tint colors. > (The second case was added to accommodate grayish focus ring color returned by system when Accent color = Graphite. The returned color is not exactly gray but grayish (r=135, g=135, b=140)). > To accommodate a more generic case of grayish colors, the satGrayScale has a threshold or buffer of 0.10 or 10%. > > Used the following resources to test out different grayish colors and optimal saturation offsets used in `deriveLighterFocusRing()`. > > - [RapidTables](https://www.rapidtables.com/convert/color/rgb-to-hsl.html) > - [Colorizer](http://colorizer.org/). > - [Chart Link](https://codepen.io/HunorMarton/details/eWvewo) > > A test case is added to compare the RGB difference between the original focus ring color & selection background and the new focus ring color & selection background. > > PS: The native L&F (Mac OS) and Swing L&F for JTable cell tabbing differs (on native tables the cell background turns white on focus with a cell focus ring). Since the background for Swing tables can be set by users and also overridden by subclassing `DefaultTableCellRenderer`, and to adhere to current implementation of Swing, the white cell background changes are not incorporated. Only the Focus Ring/ Cell Highlighter is made more prominent. Harshitha Onkar 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 11 additional commits since the last revision: - Merge branch 'master' into focusRing_7124282 - added new type property and changed method name - Merge branch 'master' into focusRing_7124282 - added more generic condition for edge case and formatted line lengths - Merge branch 'openjdk:master' into focusRing_7124282 - on-the-fly focus ring color changes added - updated deriveContrastFocusRing method - changed javadocs for the new method and expanded imports - formatting changes to test case - formatted line lengths, added method-level comments - ... and 1 more: https://git.openjdk.java.net/jdk/compare/df9f0c9c...c796a99d ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7768/files - new: https://git.openjdk.java.net/jdk/pull/7768/files/3e7afcdb..c796a99d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7768&range=09 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7768&range=08-09 Stats: 136076 lines in 1047 files changed: 98527 ins; 5221 del; 32328 mod Patch: https://git.openjdk.java.net/jdk/pull/7768.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7768/head:pull/7768 PR: https://git.openjdk.java.net/jdk/pull/7768 From duke at openjdk.java.net Tue Apr 12 00:22:31 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Tue, 12 Apr 2022 00:22:31 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v11] In-Reply-To: References: Message-ID: <9T2LZvjkusyRd4JjbAU5_Yn277lAOnC02Esvq_R8yyg=.136fa8f8-0768-4774-8461-4591ca071453@github.com> > Previously while tabbing through the JTable cell, the cell highlighter/focus ring was not visible against the selection background. > > Changes are made to Aqua LAF to derive a lighter focus ring color by changing saturation and setting brightness component to 100% of original focus ring color so that it is visible while tabbing through `JTable` cells. A new method is added for this purpose which takes in `focusRingColor`, does adjustment to saturation and brightness and returns a new focus ring color. There are edge cases where the HSB transformation does not yield the right focus ring color, for these cases a default color is returned. > > **Edge Cases** > ![image](https://user-images.githubusercontent.com/95945681/161360456-3929acf1-282b-4c2b-95d1-1d5707c1e238.png) > > The edge case condition consists of two parts ? > To handle white/black colors - (hsbValues[0] == 0 && hsbValues[1] == 0) - representing hue and saturation of zero obtained for black, white or exactly grey (red=green=color) conditions > To handle grayish colors - hsbValues[1] <= satGrayScale where satGrayScale <= 0.10 . For any given hue and brightness, a saturation of less than or equal to 10% represents grayish tint colors. > (The second case was added to accommodate grayish focus ring color returned by system when Accent color = Graphite. The returned color is not exactly gray but grayish (r=135, g=135, b=140)). > To accommodate a more generic case of grayish colors, the satGrayScale has a threshold or buffer of 0.10 or 10%. > > Used the following resources to test out different grayish colors and optimal saturation offsets used in `deriveLighterFocusRing()`. > > - [RapidTables](https://www.rapidtables.com/convert/color/rgb-to-hsl.html) > - [Colorizer](http://colorizer.org/). > - [Chart Link](https://codepen.io/HunorMarton/details/eWvewo) > > A test case is added to compare the RGB difference between the original focus ring color & selection background and the new focus ring color & selection background. > > PS: The native L&F (Mac OS) and Swing L&F for JTable cell tabbing differs (on native tables the cell background turns white on focus with a cell focus ring). Since the background for Swing tables can be set by users and also overridden by subclassing `DefaultTableCellRenderer`, and to adhere to current implementation of Swing, the white cell background changes are not incorporated. Only the Focus Ring/ Cell Highlighter is made more prominent. Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: added new color to CSystemColors.m - CELL_HIGHLIGHT_COLOR ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7768/files - new: https://git.openjdk.java.net/jdk/pull/7768/files/c796a99d..d13e37f8 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7768&range=10 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7768&range=09-10 Stats: 51 lines in 6 files changed: 15 ins; 0 del; 36 mod Patch: https://git.openjdk.java.net/jdk/pull/7768.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7768/head:pull/7768 PR: https://git.openjdk.java.net/jdk/pull/7768 From duke at openjdk.java.net Tue Apr 12 00:43:42 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Tue, 12 Apr 2022 00:43:42 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v8] In-Reply-To: References: <7ot0fBLQsvKiNsxLdrbnv4R_MNr6qdLN_GBwNPjU-rY=.dcad59a1-d0d6-42b9-bdf4-6290f31a88e0@github.com> Message-ID: On Mon, 11 Apr 2022 07:06:59 GMT, Prasanta Sadhukhan wrote: >> @prsadhuk Update PR with the recommended changes. The "controlAccentColor" changes works as expected in Mac 12.3 as well. >> One thing that I wanted to clarify with the fix is - the focus ring color ("Focus.ring") is used at two other places AquaButtonUI and AquaFocus (for focused icon). With the current fix I'm setting **KEYBOARD_FOCUS_COLOR** as below - >> >> image >> >> Before and After images of focused icon - >> >> **Before** >> >> image >> >> **After (focus around icon slightly darker - focus ring color obtained from controlAccentColor property)** >> >> image >> >> Please let me know in case I need to add a NEW color (as shown below) instead of reusing the KEYBOARD_FOCUS_COLOR if the color effects on focused icon/ button doesn't look correct. >> >> image > > It seems KEYBOARD_FOCUS_COLOR via `focusRingColor` is also used for menuSelectedBackgroundColor which is used for > > CheckBoxMenuItem.selectionBackground > ComboBox.selectionBackground > Menu.selectionBackground > MenuBar.selectionBackground > MenuItem.selectionBackground > "PopupMenu.selectionBackground", menuSelectedBackgroundColor, > RadioButtonMenuItem.selectionBackground > > which might also get affected if you use new property, so you need to test all those widgets if you intend to use reuse KEYBOARD_FOCUS_COLOR so I guess safe bet is to use new color as you mentioned to limit the change to highlight color. @prsadhuk Following code changes were pushed and ready for re-review - New color added to CSystemColor.m - CELL_HIGHLIGHT_COLOR, to limit the effects of highlight color changes - AquaImageFactory and LWCToolkit changed as part of addition of new color - method renamed from deriveLighterFocusRing() to deriveProminentFocusRing() - Test case made headful to load system colors ------------- PR: https://git.openjdk.java.net/jdk/pull/7768 From serb at openjdk.java.net Tue Apr 12 01:28:46 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 12 Apr 2022 01:28:46 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v6] In-Reply-To: <0tBOmlX8CMkaVB8l0nQcd_YKXtQSlAH_8S0_SNQQmUk=.01cb6513-7667-4baa-bf4d-27b20337bfa1@github.com> References: <0tBOmlX8CMkaVB8l0nQcd_YKXtQSlAH_8S0_SNQQmUk=.01cb6513-7667-4baa-bf4d-27b20337bfa1@github.com> Message-ID: On Mon, 11 Apr 2022 12:19:28 GMT, Alexey Ivanov wrote: > An interesting idea. However, this would require updating all the existing tests including those that use its custom UI for run/manual. Isn't this a goal of this fix: >We need a common manual test framework code that can be shared across all the client manual test. ? >A good idea. The instructions used to be shown in the same VM. And the majority of UI tests don't cause the VM to crash therefore the complexity of separating instructions from the test UI doesn't seem to provide much benefit It means that the java options such as L&F selection/etc will affect the instruction. ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From serb at openjdk.java.net Tue Apr 12 01:29:53 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 12 Apr 2022 01:29:53 GMT Subject: RFR: JDK-8282778: Create a regression test for JDK-4699544 [v3] In-Reply-To: References: Message-ID: On Wed, 30 Mar 2022 10:54:32 GMT, Srinivas Mandalika wrote: >> Create a regression test for JDK-4699544 >> >> The subclass of javax.swing.JRootPane (AccessibleJRootPane) that implements the accessibility interface javax.accessibility.AccessibleComponent is derived from java.awt.AccessibleAWTComponent, which returns null for getAccessibleAt() because a component does not necessarily have childs. >> >> The root pane always has a content pane child, so getAccessibleAt() should be overwritten by AccessibleJRootPane appropriately. >> The test added verifies the same. >> This review is for migrating tests from a closed test suite to open. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > Review Comments Fixed: Frame on EDT, Line length <= 80 characters test/jdk/javax/accessibility/4699544/JRootPaneAccessiblAtTest.java line 39: > 37: public class JRootPaneAccessiblAtTest extends JFrame { > 38: JRootPane rootPane; > 39: AccessibleComponent accessibleComponent; Look like these fields became redundant. ------------- PR: https://git.openjdk.java.net/jdk/pull/7739 From smandalika at openjdk.java.net Tue Apr 12 01:34:43 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Tue, 12 Apr 2022 01:34:43 GMT Subject: Integrated: 8282640: Create a test for JDK-4740761 In-Reply-To: References: Message-ID: On Fri, 4 Mar 2022 05:35:38 GMT, Srinivas Mandalika wrote: > Create a test for [JDK-4740761](https://bugs.openjdk.java.net/browse/JDK-4740761) > > The issue observed is in a JFrame with a JTextField and a JScrollPane which contains focused component. When the JScrollPane was > is removed from its parent, focus stays with the the scroller > of the removed JScrollPane, instead of moving to the TextField. > > The test verifies the same - i.e. it verifies that the removal of the scrollpane moves the focus to the JTextField present in the JFrame. > This review is for migrating tests from a closed test suite to open. This pull request has now been integrated. Changeset: fad3b947 Author: Srinivas Mandalika Committer: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/fad3b9478663d319d1136422e6b4bea72a540544 Stats: 131 lines in 1 file changed: 131 ins; 0 del; 0 mod 8282640: Create a test for JDK-4740761 Reviewed-by: prr, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/7686 From prr at openjdk.java.net Tue Apr 12 02:53:14 2022 From: prr at openjdk.java.net (Phil Race) Date: Tue, 12 Apr 2022 02:53:14 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v6] In-Reply-To: <0tBOmlX8CMkaVB8l0nQcd_YKXtQSlAH_8S0_SNQQmUk=.01cb6513-7667-4baa-bf4d-27b20337bfa1@github.com> References: <0tBOmlX8CMkaVB8l0nQcd_YKXtQSlAH_8S0_SNQQmUk=.01cb6513-7667-4baa-bf4d-27b20337bfa1@github.com> Message-ID: On Mon, 11 Apr 2022 12:19:28 GMT, Alexey Ivanov wrote: >>Just an idea can we replace the builtin in the jtreg "manual" tests machinery by something like this? It might be a nice project to update all of the rest of the tests but it'll be incremental and should start with tests we need to update anyway. >> Also would like to raise a question: should we show the test instructions in the same VM where the test executed or we can shoiw it in a separate VM? Separate VM would seem to introduce a lot of questions about how results are communicated and how you launch the target which file is really the @test ... if someone were to introduce such a helper class along side the one here and let test developers choose which one they want for a while, we could perhaps see which approach works out better. But that would be an exercise outside of the scope of this proposal. ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From psadhukhan at openjdk.java.net Tue Apr 12 03:21:32 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 12 Apr 2022 03:21:32 GMT Subject: RFR: 8282716: [macos] Enable javax/swing/JScrollPane/TestMouseWheelScroll.java on macos In-Reply-To: References: <-tuJ1M1iwo7tJ_hOHvrEylZmUdS3DPOSbySVFnJGrBI=.212c7ea6-e12a-48af-a4fa-ee3a586e4a38@github.com> Message-ID: <49Qf2bhX-mIeQ2AofD8Iw1BWjRLxrJqUZEqcy-oK3pY=.4ebc0703-bd15-4843-a63d-852846524c0e@github.com> On Sat, 9 Apr 2022 05:35:30 GMT, Sergey Bylokhov wrote: >> The test was failing on macos and was excluded in macos because the viewposition was not changed after mouse wheel scroll. Seems like mouse wheel scroll direction is opposite in macos compared to windows etc so if we try to down-wheel scroll in macos when view position is at center of viewport (say element 3 is selected out of visible 7 elements), it cannot change viewposition as it cannot "scroll up" (since we are already at topmost viewport) whereas in windows, when we do down-wheel scroll in mouse wheel, it "scroll down" the viewport so viewposition is changed. >> >> Fix is to use opposite scrolling motion in macos to check mouse wheel scroll is happening, which is what the testcase is meant for. CI testing of this test on all platform is ok. > > The scroll direction on macOS can be configured, can the test check what type of scroll is used on the current system and then use that to verify the old fix? Any more comments @mrserb ? ------------- PR: https://git.openjdk.java.net/jdk/pull/8123 From aghaisas at openjdk.java.net Tue Apr 12 04:19:33 2022 From: aghaisas at openjdk.java.net (Ajit Ghaisas) Date: Tue, 12 Apr 2022 04:19:33 GMT Subject: RFR: 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill [v2] In-Reply-To: References: Message-ID: On Fri, 1 Apr 2022 15:43:29 GMT, Alexey Ushakov wrote: >> Throwing InvalidPipeException for incompatible surfaces > > Alexey Ushakov has updated the pull request incrementally with one additional commit since the last revision: > > 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill > > Extracted try/catch logic of SurfaceData cast to particular SurfaceData subclass into convenience method SurfaceData.convertTo(). Applied the method to XRTextRenderer.drawGlyphList() and XRMaskFill.MaskFill(). Refactored try/catch blocks handling similar cases. I am on vacation this week. I will review this PR on priority next week. ------------- PR: https://git.openjdk.java.net/jdk/pull/8015 From serb at openjdk.java.net Tue Apr 12 04:20:39 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 12 Apr 2022 04:20:39 GMT Subject: RFR: 8284646: Some swing test fail in macos12-aarch64 host In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 08:38:43 GMT, Prasanta Sadhukhan wrote: > Few tests are seen to be failing in macos12 M1 system due to slight difference in color as mentioned in [JDK-8277816](https://bugs.openjdk.java.net/browse/JDK-8277816) > > It seems the color difference was around 6-7 for swing tests, so these tests are extracted out in this issue and fixed by adding tolerance. > I could not find, in M1 osx12.3 SystemPreferences, any way to set Color Profile to sRGB IEC61966-2.1 Profile so it seems osx12.x M1 use default setting. > > Several runs in CI system in all platforms including 12.x M1 pass with this change (test job link in JBS) Please double check that it is not possible to set the "sRGB IEC61966-2.1" color profile(probbaly you need to press some key to see an additional options, or there some user permission issue). I have macOS 12.3 and there is an option to set that profile, and if it is set all theses tests works fine. ------------- PR: https://git.openjdk.java.net/jdk/pull/8176 From serb at openjdk.java.net Tue Apr 12 04:21:41 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 12 Apr 2022 04:21:41 GMT Subject: RFR: 8282716: [macos] Enable javax/swing/JScrollPane/TestMouseWheelScroll.java on macos [v2] In-Reply-To: References: <-tuJ1M1iwo7tJ_hOHvrEylZmUdS3DPOSbySVFnJGrBI=.212c7ea6-e12a-48af-a4fa-ee3a586e4a38@github.com> Message-ID: On Sun, 10 Apr 2022 06:12:26 GMT, Prasanta Sadhukhan wrote: >> The test was failing on macos and was excluded in macos because the viewposition was not changed after mouse wheel scroll. Seems like mouse wheel scroll direction is opposite in macos compared to windows etc so if we try to down-wheel scroll in macos when view position is at center of viewport (say element 3 is selected out of visible 7 elements), it cannot change viewposition as it cannot "scroll up" (since we are already at topmost viewport) whereas in windows, when we do down-wheel scroll in mouse wheel, it "scroll down" the viewport so viewposition is changed. >> >> Fix is to use opposite scrolling motion in macos to check mouse wheel scroll is happening, which is what the testcase is meant for. CI testing of this test on all platform is ok. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Check mousewheel rotation direction at runtime Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8123 From psadhukhan at openjdk.java.net Tue Apr 12 04:25:36 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 12 Apr 2022 04:25:36 GMT Subject: RFR: 8284646: Some swing test fail in macos12-aarch64 host In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 08:38:43 GMT, Prasanta Sadhukhan wrote: > Few tests are seen to be failing in macos12 M1 system due to slight difference in color as mentioned in [JDK-8277816](https://bugs.openjdk.java.net/browse/JDK-8277816) > > It seems the color difference was around 6-7 for swing tests, so these tests are extracted out in this issue and fixed by adding tolerance. > I could not find, in M1 osx12.3 SystemPreferences, any way to set Color Profile to sRGB IEC61966-2.1 Profile so it seems osx12.x M1 use default setting. > > Several runs in CI system in all platforms including 12.x M1 pass with this change (test job link in JBS) I dont see in M1 osx12.3. Attached "DIsplay" where usually we have COlor tab where we used to set the profile Screenshot 2022-04-12 at 9 48 55 AM ------------- PR: https://git.openjdk.java.net/jdk/pull/8176 From smandalika at openjdk.java.net Tue Apr 12 04:25:40 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Tue, 12 Apr 2022 04:25:40 GMT Subject: Integrated: 8283245: Create a test for JDK-4670319 In-Reply-To: References: Message-ID: On Tue, 29 Mar 2022 08:04:42 GMT, Srinivas Mandalika wrote: > Write an automated regression test for JDK-4670319 > > Issue > When a JTree node is expanded or collapsed, an Accessibility PropertyChange event is fired with the old state of "collapsed" and new state of "expanded" (or vice versa). The problem is that the source of the event is the AccessibeJTree, and not the AccessibleJTreeNode. This means that an assistive technology listening to this event is unable to report to the user what node was expanded/collapsed. > > Fix > Fix for [JDK-4670319](https://bugs.openjdk.java.net/browse/JDK-4670319) addresses the above issue. When tree node is expanded/collapsed, PropertyChangeEventSource is the Node. > This review is for a test for validating the above issue. > > This review is for migrating tests from a closed test suite to open. > > Testing: > The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. This pull request has now been integrated. Changeset: 4ce3cf12 Author: Srinivas Mandalika Committer: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/4ce3cf12bff025441f658e1857e92486b5d73ee6 Stats: 115 lines in 1 file changed: 115 ins; 0 del; 0 mod 8283245: Create a test for JDK-4670319 Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8012 From smandalika at openjdk.java.net Tue Apr 12 06:09:35 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Tue, 12 Apr 2022 06:09:35 GMT Subject: RFR: 8284077: Create an automated test for JDK-4170173 [v2] In-Reply-To: <8iul_waSMDD6G1oVVmwPtW89ihAc6YoMFrTR1-XFmmw=.7802104e-60cb-4b90-9ef5-cc479d3f5a78@github.com> References: <8iul_waSMDD6G1oVVmwPtW89ihAc6YoMFrTR1-XFmmw=.7802104e-60cb-4b90-9ef5-cc479d3f5a78@github.com> Message-ID: > Create an automated test for [JDK-4170173](https://bugs.openjdk.java.net/browse/JDK-4170173) > > Issue > JTextComponent.AccessibleJTextComponent.getAfterIndex(int part, int index) works incorrectly, when 'part' parameter is AccessibleText.WORD. > It returns a space (" ") instead of the correct word. > > The test verifies the fix for this behavior by checking the getAfterIndex for AccessibleText.CHARACTER,AccessibleText.WORD,AccessibleText.SENTENCE for the components JTextField, JTextArea, JEditorPane. > > While working on this test case there was a related bug relevant to this [JDK-4170174](https://bugs.openjdk.java.net/browse/JDK-4170174) > This is marked as duplicate, addressess a similar issue. > It indicates that JTextComponent.AccessibleJTextComponent.getBeforeIndex(int part, int index) works incorrectly, when part parameter is AccessibleText.WORD. > It returns a space (" ") instead of correct word. > > Hence an additional test was added for this, for verifying the behavior of getBeforeIndex. > AccessibleText.CHARACTER,AccessibleText.WORD,AccessibleText.SENTENCE for the components JTextField, JTextArea, JEditorPane. > > The two tests have multiple distinct assertions. For this reason, as well as for maintainability, the two were not clubbed into a single test. > However, the two tests are still similar in the functional flow of the code and the functionality they are testing as well - hence they have been clubbed into a single review. > This review is for migrating tests from a closed test suite to open. > > Testing: > The tests ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: Review Comments Fixed: Simplied test ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8138/files - new: https://git.openjdk.java.net/jdk/pull/8138/files/0d7673fb..d4c97f68 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8138&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8138&range=00-01 Stats: 159 lines in 2 files changed: 48 ins; 44 del; 67 mod Patch: https://git.openjdk.java.net/jdk/pull/8138.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8138/head:pull/8138 PR: https://git.openjdk.java.net/jdk/pull/8138 From smandalika at openjdk.java.net Tue Apr 12 06:14:40 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Tue, 12 Apr 2022 06:14:40 GMT Subject: RFR: 8284077: Create an automated test for JDK-4170173 [v2] In-Reply-To: References: <8iul_waSMDD6G1oVVmwPtW89ihAc6YoMFrTR1-XFmmw=.7802104e-60cb-4b90-9ef5-cc479d3f5a78@github.com> Message-ID: On Sat, 9 Apr 2022 05:32:02 GMT, Sergey Bylokhov wrote: >> Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: >> >> Review Comments Fixed: Simplied test > > test/jdk/javax/accessibility/4170173/AccessibleJTextAfterIndexTest.java line 114: > >> 112: jTextComponent.getAccessibleContext().getAccessibleText() >> 113: .getAfterIndex(character, characterPosition)); >> 114: > > It feels that the code above is too smart=) Can we simplify/reformat it a little bit. I do not think that you need to jump from the main thread to the EDT and back for each testcase, just wrap the "doTest" by the invokeAndWait This is a really good suggestion, thank you. I have simplified the test. ------------- PR: https://git.openjdk.java.net/jdk/pull/8138 From psadhukhan at openjdk.java.net Tue Apr 12 07:33:34 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 12 Apr 2022 07:33:34 GMT Subject: Integrated: 8282716: [macos] Enable javax/swing/JScrollPane/TestMouseWheelScroll.java on macos In-Reply-To: <-tuJ1M1iwo7tJ_hOHvrEylZmUdS3DPOSbySVFnJGrBI=.212c7ea6-e12a-48af-a4fa-ee3a586e4a38@github.com> References: <-tuJ1M1iwo7tJ_hOHvrEylZmUdS3DPOSbySVFnJGrBI=.212c7ea6-e12a-48af-a4fa-ee3a586e4a38@github.com> Message-ID: <0tQzvYQchFOqOJGtalWR7Pw57peOHnPz5A8rhDp4XUk=.efdc7e25-b193-4b8e-b318-c30b632da3c5@github.com> On Wed, 6 Apr 2022 10:11:33 GMT, Prasanta Sadhukhan wrote: > The test was failing on macos and was excluded in macos because the viewposition was not changed after mouse wheel scroll. Seems like mouse wheel scroll direction is opposite in macos compared to windows etc so if we try to down-wheel scroll in macos when view position is at center of viewport (say element 3 is selected out of visible 7 elements), it cannot change viewposition as it cannot "scroll up" (since we are already at topmost viewport) whereas in windows, when we do down-wheel scroll in mouse wheel, it "scroll down" the viewport so viewposition is changed. > > Fix is to use opposite scrolling motion in macos to check mouse wheel scroll is happening, which is what the testcase is meant for. CI testing of this test on all platform is ok. This pull request has now been integrated. Changeset: 9545ba7d Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/9545ba7dd95eba78cf234b2cf63165afca513787 Stats: 14 lines in 1 file changed: 13 ins; 1 del; 0 mod 8282716: [macos] Enable javax/swing/JScrollPane/TestMouseWheelScroll.java on macos Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8123 From avu at openjdk.java.net Tue Apr 12 08:05:36 2022 From: avu at openjdk.java.net (Alexey Ushakov) Date: Tue, 12 Apr 2022 08:05:36 GMT Subject: RFR: 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill [v2] In-Reply-To: References: Message-ID: <2pJSq0VxkgghzQ6KybO7uhmuZ7vIAarHJ08J6hkjMbA=.0cf673c1-242a-4654-850e-8c5a7ad4515b@github.com> On Tue, 12 Apr 2022 04:15:56 GMT, Ajit Ghaisas wrote: >> Alexey Ushakov has updated the pull request incrementally with one additional commit since the last revision: >> >> 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill >> >> Extracted try/catch logic of SurfaceData cast to particular SurfaceData subclass into convenience method SurfaceData.convertTo(). Applied the method to XRTextRenderer.drawGlyphList() and XRMaskFill.MaskFill(). Refactored try/catch blocks handling similar cases. > > I am on vacation this week. I will review this PR on priority next week. Thank you very much @aghaisas ! ------------- PR: https://git.openjdk.java.net/jdk/pull/8015 From psadhukhan at openjdk.java.net Tue Apr 12 08:53:12 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 12 Apr 2022 08:53:12 GMT Subject: RFR: 8196465: javax/swing/JComboBox/8182031/ComboPopupTest.java fails on Linux Message-ID: Test was seen to be failing in linux CI system although passing locally. Added waitForIdle(). Test is now passing in all CI systems including linux and mac. Several iterations of the test in CI run is ok (link in JBS) ------------- Commit messages: - 8196465: javax/swing/JComboBox/8182031/ComboPopupTest.java fails on Linux Changes: https://git.openjdk.java.net/jdk/pull/8197/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8197&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8196465 Stats: 29 lines in 2 files changed: 6 ins; 18 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/8197.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8197/head:pull/8197 PR: https://git.openjdk.java.net/jdk/pull/8197 From smandalika at openjdk.java.net Tue Apr 12 09:05:56 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Tue, 12 Apr 2022 09:05:56 GMT Subject: RFR: JDK-8282778: Create a regression test for JDK-4699544 [v4] In-Reply-To: References: Message-ID: > Create a regression test for JDK-4699544 > > The subclass of javax.swing.JRootPane (AccessibleJRootPane) that implements the accessibility interface javax.accessibility.AccessibleComponent is derived from java.awt.AccessibleAWTComponent, which returns null for getAccessibleAt() because a component does not necessarily have childs. > > The root pane always has a content pane child, so getAccessibleAt() should be overwritten by AccessibleJRootPane appropriately. > The test added verifies the same. > This review is for migrating tests from a closed test suite to open. Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: Review Comments Fixed: removed redundant class variables ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7739/files - new: https://git.openjdk.java.net/jdk/pull/7739/files/bcc3bd6c..15bc3210 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7739&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7739&range=02-03 Stats: 4 lines in 1 file changed: 0 ins; 2 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/7739.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7739/head:pull/7739 PR: https://git.openjdk.java.net/jdk/pull/7739 From smandalika at openjdk.java.net Tue Apr 12 09:05:59 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Tue, 12 Apr 2022 09:05:59 GMT Subject: RFR: JDK-8282778: Create a regression test for JDK-4699544 [v3] In-Reply-To: References: Message-ID: On Tue, 12 Apr 2022 01:26:15 GMT, Sergey Bylokhov wrote: >> Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: >> >> Review Comments Fixed: Frame on EDT, Line length <= 80 characters > > test/jdk/javax/accessibility/4699544/JRootPaneAccessiblAtTest.java line 39: > >> 37: public class JRootPaneAccessiblAtTest extends JFrame { >> 38: JRootPane rootPane; >> 39: AccessibleComponent accessibleComponent; > > Look like these fields became redundant. Fixed. ------------- PR: https://git.openjdk.java.net/jdk/pull/7739 From smandalika at openjdk.java.net Tue Apr 12 09:19:33 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Tue, 12 Apr 2022 09:19:33 GMT Subject: RFR: 8284524: Create an automated test for JDK-4422362 [v2] In-Reply-To: References: Message-ID: > Create an automated test for [JDK-4422362](https://bugs.openjdk.java.net/browse/JDK-4422362) > > The BoundedRangeModel components (JScrollBar, JSlider, JProgressBar) return > BoundedRangeModel.getMaximum() from getMaximumAccessibleValue() in their > AccessibleValue implementation. > The real maximum value (due to the constraints on BoundedRangeModel) is > model.getMaximum() - model.getExtent(). > > The test verifies that the above is adhered to as expected. > > This review is for migrating tests from a closed test suite to open. > > Testing: > The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: 8284524: Create an automated test for JDK-4422362 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8158/files - new: https://git.openjdk.java.net/jdk/pull/8158/files/5cc47305..0dd792c1 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8158&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8158&range=00-01 Stats: 29 lines in 1 file changed: 0 ins; 15 del; 14 mod Patch: https://git.openjdk.java.net/jdk/pull/8158.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8158/head:pull/8158 PR: https://git.openjdk.java.net/jdk/pull/8158 From psadhukhan at openjdk.java.net Tue Apr 12 12:34:53 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 12 Apr 2022 12:34:53 GMT Subject: RFR: 8194946: Regression automated Test 'javax/swing/JFileChooser/6738668/bug6738668.java' fails Message-ID: Test was failing in CI system in nightly testing. Saw it failed with HeadlessException in macos-x64 and mascos-aarch64 and with GTKL&F not supported in linux-x64 in headless CI system. Made the test headful and test now passes in all platforms (link in JBS) ------------- Commit messages: - 8194946: Regression automated Test 'javax/swing/JFileChooser/6738668/bug6738668.java' fails Changes: https://git.openjdk.java.net/jdk/pull/8202/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8202&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8194946 Stats: 11 lines in 2 files changed: 9 ins; 1 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8202.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8202/head:pull/8202 PR: https://git.openjdk.java.net/jdk/pull/8202 From azvegint at openjdk.java.net Tue Apr 12 12:40:37 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Tue, 12 Apr 2022 12:40:37 GMT Subject: RFR: 8196465: javax/swing/JComboBox/8182031/ComboPopupTest.java fails on Linux In-Reply-To: References: Message-ID: On Tue, 12 Apr 2022 08:46:09 GMT, Prasanta Sadhukhan wrote: > Test was seen to be failing in linux CI system although passing locally. > Added waitForIdle(). > Test is now passing in all CI systems including linux and mac. Several iterations of the test in CI run is ok (link in JBS) Marked as reviewed by azvegint (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8197 From psadhukhan at openjdk.java.net Tue Apr 12 13:12:41 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 12 Apr 2022 13:12:41 GMT Subject: Integrated: 8196465: javax/swing/JComboBox/8182031/ComboPopupTest.java fails on Linux In-Reply-To: References: Message-ID: On Tue, 12 Apr 2022 08:46:09 GMT, Prasanta Sadhukhan wrote: > Test was seen to be failing in linux CI system although passing locally. > Added waitForIdle(). > Test is now passing in all CI systems including linux and mac. Several iterations of the test in CI run is ok (link in JBS) This pull request has now been integrated. Changeset: 83466434 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/83466434fda3bd048fa8e2d274a797a7d9506c16 Stats: 29 lines in 2 files changed: 6 ins; 18 del; 5 mod 8196465: javax/swing/JComboBox/8182031/ComboPopupTest.java fails on Linux Reviewed-by: azvegint ------------- PR: https://git.openjdk.java.net/jdk/pull/8197 From psadhukhan at openjdk.java.net Tue Apr 12 13:25:15 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 12 Apr 2022 13:25:15 GMT Subject: RFR: 8194946: Regression automated Test 'javax/swing/JFileChooser/6738668/bug6738668.java' fails [v2] In-Reply-To: References: Message-ID: > Test was failing in CI system in nightly testing. > Saw it failed with HeadlessException in macos-x64 and mascos-aarch64 and with GTKL&F not supported in linux-x64 in headless CI system. > Made the test headful and test now passes in all platforms (link in JBS) Prasanta Sadhukhan has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: - Merge branch 'master' into JDK-8194946 - 8194946: Regression automated Test 'javax/swing/JFileChooser/6738668/bug6738668.java' fails ------------- Changes: https://git.openjdk.java.net/jdk/pull/8202/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8202&range=01 Stats: 11 lines in 2 files changed: 9 ins; 1 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8202.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8202/head:pull/8202 PR: https://git.openjdk.java.net/jdk/pull/8202 From aivanov at openjdk.java.net Tue Apr 12 13:52:46 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 12 Apr 2022 13:52:46 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v8] In-Reply-To: <0FlPbWDHC___agVYDwtV0diWiQRTw8KOIFwckJZLZ-Y=.8a596090-2dd0-45f1-a24d-933c4f6ecd4f@github.com> References: <0FlPbWDHC___agVYDwtV0diWiQRTw8KOIFwckJZLZ-Y=.8a596090-2dd0-45f1-a24d-933c4f6ecd4f@github.com> Message-ID: On Mon, 11 Apr 2022 18:17:34 GMT, lawrence.andrews wrote: >> We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following >> 1) Frame which contains test instruction . >> 2) Pass & Fail button so that user can mark the test pass or fail >> 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. >> 4) Disposing of all the frames. >> >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Mark info as final > > An interesting idea. However, this would require updating all the existing tests including those that use its custom UI for run/manual. > > Isn't this a goal of this fix: > > > _We need a common manual test framework code that can be shared across all the client manual test._ > > ? Doesn't this accomplish this goal? No, it doesn't replace the (outdated) built-in machinery in jtreg for `manual=yesno`. At the same time, it provides a building block to update those tests. I like this approach better, in which a test can be easily run without the need for jtreg, I think it greatly simplifies debugging and updating the test. However, you're right that `applet/manual=yesno` in jtreg can be reimplemented using this new class `PassFailJFrame` even though it's not a goal at this very time. Initially I interpreted your suggestion as replacing all `manual` tests, which doesn't seem a right thing to do because it will break all existing manual tests. ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From duke at openjdk.java.net Tue Apr 12 13:52:47 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Tue, 12 Apr 2022 13:52:47 GMT Subject: Integrated: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception In-Reply-To: References: Message-ID: On Fri, 25 Mar 2022 21:06:12 GMT, lawrence.andrews wrote: > We need a common manual test framework code that can be shared across all the client manual test. This framework class should have the following > 1) Frame which contains test instruction . > 2) Pass & Fail button so that user can mark the test pass or fail > 3) Upon failing the test user should be able to elaborate why the test failed and this can be added to the test failure. > 4) Disposing of all the frames. > > @aivanov-jdk This pull request has now been integrated. Changeset: 3f26d84f Author: lawrence.andrews Committer: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/3f26d84f6a03030080328e36a1fd1a08c982838c Stats: 362 lines in 2 files changed: 312 ins; 31 del; 19 mod 8284535: Fix PrintLatinCJKTest.java test that is failing with Parse Exception 8283712: Create a manual test framework class Reviewed-by: prr, aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From aivanov at openjdk.java.net Tue Apr 12 15:37:40 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 12 Apr 2022 15:37:40 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v5] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 12:17:37 GMT, Tejesh R wrote: >> getText function returned extra endOfLine when appended. The reason was in `EditorEditorKit` class, `write(Writer out, Document doc, int pos, int len)` method, where translation happens from buffer to Out(Writer Object) if endOfLine is other than '\n' ( which is '\r\n' in windows). In order to write each line till End of line, the string till '\n' is written including '\r' and again endOfLine is written which results in extra Carriage Return. To solve this issue, a Condition is added which checks if previous character to '\n' is '\r', if true then whole string except Carriage Return ('\r') is written, else whole string till before '\n' is written. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on Review Comments The [`DefaultEditorKit`](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/text/DefaultEditorKit.html) class defines handling of new lines: _??while the document is in memory, the "\n" character is used to define a newline??_. [The comment inside its `read` method](https://github.com/openjdk/jdk/blob/096bca4a9c5e8ac2668dd965df92153ea1d80add/src/java.desktop/share/classes/javax/swing/text/DefaultEditorKit.java#L212) explains `\r` is converted to `\n` upon reading. As such, the behaviour described in [JDK-8180276](https://bugs.openjdk.java.net/browse/JDK-8180276) is not a bug. The mistake is that the user uses `System.lineSeparator()` to add a line break to the document model. Since it's the model, `\n` is to be used, which is _system-independent_. When document is written to disk, line breaks are converted to system-dependent according to the value of [`EndOfLineStringProperty`](https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/text/DefaultEditorKit.html#EndOfLineStringProperty) property of the document. If we handle `\r` before `\n` when writing out a document, we may get another bug report where `\r` not followed by `\n` results in a line break too. This is why I consider the current behaviour correct. The questions by @prsadhuk and the resulted discussion have led me to this conclusion. The bug should be closed as *Not an Issue* with the explanation that `\n` should always be used to add line break in a `Document` model, `System.lineSeparator()` should not be used. Does it sound reasonable? ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From duke at openjdk.java.net Tue Apr 12 16:23:25 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Tue, 12 Apr 2022 16:23:25 GMT Subject: RFR: 8283803 : Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test [v2] In-Reply-To: References: Message-ID: > Fixed the following issue. > 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" > 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. > So added Pass and Fail button to mark the test result. > 3) Added timeout if in case user does not interact with the test UI. > > @shurymury > @aivanov-jdk lawrence.andrews 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: - Merge branch 'openjdk:master' into JDK-8283803 - 8283803 : Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8004/files - new: https://git.openjdk.java.net/jdk/pull/8004/files/97ac125b..e4e53fc6 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=00-01 Stats: 165232 lines in 2102 files changed: 116171 ins; 10863 del; 38198 mod Patch: https://git.openjdk.java.net/jdk/pull/8004.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8004/head:pull/8004 PR: https://git.openjdk.java.net/jdk/pull/8004 From duke at openjdk.java.net Tue Apr 12 17:42:31 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Tue, 12 Apr 2022 17:42:31 GMT Subject: RFR: 8283803 : Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test [v3] In-Reply-To: References: Message-ID: > Fixed the following issue. > 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" > 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. > So added Pass and Fail button to mark the test result. > 3) Added timeout if in case user does not interact with the test UI. > > @shurymury > @aivanov-jdk lawrence.andrews 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 'openjdk:master' into JDK-8283803 - Merge branch 'openjdk:master' into JDK-8283803 - 8283803 : Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8004/files - new: https://git.openjdk.java.net/jdk/pull/8004/files/e4e53fc6..1c765353 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=01-02 Stats: 60 lines in 2 files changed: 51 ins; 0 del; 9 mod Patch: https://git.openjdk.java.net/jdk/pull/8004.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8004/head:pull/8004 PR: https://git.openjdk.java.net/jdk/pull/8004 From aturbanov at openjdk.java.net Tue Apr 12 19:58:10 2022 From: aturbanov at openjdk.java.net (Andrey Turbanov) Date: Tue, 12 Apr 2022 19:58:10 GMT Subject: RFR: 8284775: Simplify String.substring(_, length()) calls Message-ID: Default `to` index for String.substring method call is length of the String. We can simplify code a bit, by omitting default value. ------------- Commit messages: - [PATCH] Unnecessary string length argument for String.substring in java.desktop - [PATCH] Unnecessary string length argument for String.substring in java.desktop Changes: https://git.openjdk.java.net/jdk/pull/8212/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8212&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284775 Stats: 19 lines in 6 files changed: 0 ins; 5 del; 14 mod Patch: https://git.openjdk.java.net/jdk/pull/8212.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8212/head:pull/8212 PR: https://git.openjdk.java.net/jdk/pull/8212 From duke at openjdk.java.net Tue Apr 12 20:14:26 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Tue, 12 Apr 2022 20:14:26 GMT Subject: RFR: 8283803 : Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test [v4] In-Reply-To: References: Message-ID: > Fixed the following issue. > 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" > 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. > So added Pass and Fail button to mark the test result. > 3) Added timeout if in case user does not interact with the test UI. > > @shurymury > @aivanov-jdk lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Fixed PrintGlyphVectorTest.java to use PassFailJFrame ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8004/files - new: https://git.openjdk.java.net/jdk/pull/8004/files/1c765353..9e4e95a4 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=02-03 Stats: 110 lines in 1 file changed: 13 ins; 69 del; 28 mod Patch: https://git.openjdk.java.net/jdk/pull/8004.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8004/head:pull/8004 PR: https://git.openjdk.java.net/jdk/pull/8004 From bpb at openjdk.java.net Tue Apr 12 20:24:55 2022 From: bpb at openjdk.java.net (Brian Burkhalter) Date: Tue, 12 Apr 2022 20:24:55 GMT Subject: RFR: 8284775: Simplify String.substring(_, length()) calls In-Reply-To: References: Message-ID: On Tue, 12 Apr 2022 19:38:33 GMT, Andrey Turbanov wrote: > Default `to` index for String.substring method call is length of the String. > We can simplify code a bit, by omitting default value. Marked as reviewed by bpb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8212 From aivanov at openjdk.java.net Tue Apr 12 20:29:39 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 12 Apr 2022 20:29:39 GMT Subject: RFR: 8283803 : Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test [v4] In-Reply-To: References: Message-ID: On Tue, 12 Apr 2022 20:14:26 GMT, lawrence.andrews wrote: >> Fixed the following issue. >> 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" >> 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. >> So added Pass and Fail button to mark the test result. >> 3) Added timeout if in case user does not interact with the test UI. >> >> @shurymury >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Fixed PrintGlyphVectorTest.java to use PassFailJFrame test/jdk/java/awt/print/PrinterJob/PrintGlyphVectorTest.java line 72: > 70: GlyphVector v = font.createGlyphVector(frc, testString); > 71: > 72: float x = 50f, y = 50f; A better way would be: float x = 50f; float y = 50f; Declaring the two variables on the same line is discouraged. test/jdk/java/awt/print/PrinterJob/PrintGlyphVectorTest.java line 97: > 95: public void paint(Graphics g) { > 96: g.setColor(Color.white); > 97: g.fillRect(0,0,getSize().width, getSize().height); Since you're updating the line any way, please add a space after commas. test/jdk/java/awt/print/PrinterJob/PrintGlyphVectorTest.java line 128: > 126: if (pj == null || pj.getPrintService() == null || > 127: !pj.printDialog()) { > 128: return; Isn't it a failure? test/jdk/java/awt/print/PrinterJob/PrintGlyphVectorTest.java line 132: > 130: pj.setPrintable(new PrintGlyphVectorTest()); > 131: try { > 132: pj.print(); Does it show Print dialog? Should the test fail if the user clicks Cancel there? Any exception thrown should also fail the test, we expect no exceptions. ------------- PR: https://git.openjdk.java.net/jdk/pull/8004 From aivanov at openjdk.java.net Tue Apr 12 20:32:46 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 12 Apr 2022 20:32:46 GMT Subject: RFR: 8194946: Regression automated Test 'javax/swing/JFileChooser/6738668/bug6738668.java' fails [v2] In-Reply-To: References: Message-ID: <2sepNi7UtvWxTzUszDkHPgKhFfGxQsjk_5n78HoFOHU=.cf6b762f-64c9-4158-aba2-a840fcc34a76@github.com> On Tue, 12 Apr 2022 13:25:15 GMT, Prasanta Sadhukhan wrote: >> Test was failing in CI system in nightly testing. >> Saw it failed with HeadlessException in macos-x64 and mascos-aarch64 and with GTKL&F not supported in linux-x64 in headless CI system. >> Made the test headful and test now passes in all platforms (link in JBS) > > Prasanta Sadhukhan has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: > > - Merge branch 'master' into JDK-8194946 > - 8194946: Regression automated Test 'javax/swing/JFileChooser/6738668/bug6738668.java' fails Marked as reviewed by aivanov (Reviewer). test/jdk/javax/swing/JFileChooser/6738668/bug6738668.java line 43: > 41: UIManager.setLookAndFeel(lookAndFeelInfo.getClassName()); > 42: } catch (UnsupportedLookAndFeelException ignored) { > 43: System.out.println("Unsupported L&F: " + lookAndFeelInfo.getClassName()); Add `continue;` to skip? ------------- PR: https://git.openjdk.java.net/jdk/pull/8202 From prr at openjdk.java.net Tue Apr 12 20:53:16 2022 From: prr at openjdk.java.net (Phil Race) Date: Tue, 12 Apr 2022 20:53:16 GMT Subject: RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v14] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 08:51:30 GMT, Tejesh R wrote: >> Removed the println() line from the Interrupted catch block. Since waitForID() Interrupt indicates completion of Image Loading, println as Interrupt handling was not required. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on Review Comments Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7754 From prr at openjdk.java.net Tue Apr 12 20:53:20 2022 From: prr at openjdk.java.net (Phil Race) Date: Tue, 12 Apr 2022 20:53:20 GMT Subject: RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v11] In-Reply-To: References: Message-ID: On Tue, 5 Apr 2022 17:30:31 GMT, Alexey Ivanov wrote: >> test/jdk/javax/swing/ImageIcon/LoadInterruptTest.java line 74: >> >>> 72: >>> 73: Thread.currentThread().interrupt(); >>> 74: ImageIcon i = new ImageIcon("https://openjdk.java.net/images/openjdk.png"); >> >> This is just asking for trouble. Test machines which can't access that URL might cause the test to behave differently than you expect. >> Use some local image file loaded from a file: URL >> We have plenty you can choose from in other tests. > > This is intentional, it makes sure the image is in `LOADING` state to verify that the newly added resets it to `ABORTED`. > > I don't expect the image to load, we don't care. If it succeeds, the status is `COMPLETE`; if it times outs or another error occurs, the status is `ERRORED`. ok .. I trust this test has been verified in mach5 already .. ------------- PR: https://git.openjdk.java.net/jdk/pull/7754 From serb at openjdk.java.net Wed Apr 13 00:57:19 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 13 Apr 2022 00:57:19 GMT Subject: RFR: 8284535 : Fix PrintLatinCJKTest.java test that is failing with Parse Exception [v8] In-Reply-To: References: <0FlPbWDHC___agVYDwtV0diWiQRTw8KOIFwckJZLZ-Y=.8a596090-2dd0-45f1-a24d-933c4f6ecd4f@github.com> Message-ID: On Tue, 12 Apr 2022 13:48:23 GMT, Alexey Ivanov wrote: > I like this approach better, in which a test can be easily run without the need for jtreg, I think it greatly simplifies debugging and updating the test. The new code depends on the PassFailJFrame from the library so it is not a simple test-in-one-file anyway. The jtreg could be just a wrapper that shows the instructions from the txt file and initialized/run the test via the main method, so the test will not have any external dependenies. I just worry that we added one more library class and eventually will have one more way to write a manual test. ------------- PR: https://git.openjdk.java.net/jdk/pull/7966 From serb at openjdk.java.net Wed Apr 13 01:05:14 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 13 Apr 2022 01:05:14 GMT Subject: RFR: 8284775: Simplify String.substring(_, length()) calls In-Reply-To: References: Message-ID: On Tue, 12 Apr 2022 19:38:33 GMT, Andrey Turbanov wrote: > Default `to` index for String.substring method call is length of the String. > We can simplify code a bit, by omitting default value. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8212 From psadhukhan at openjdk.java.net Wed Apr 13 07:57:38 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 13 Apr 2022 07:57:38 GMT Subject: RFR: 8277816: Client tests fail on macos-Aarch64 host Message-ID: This tests was failing on macos12 M1 systems due to wrong color profile configurations set in CI systems. If correct sRGB IEC61966-2.1 is set, then these test passed. Test job link in JBS.. So, removing from Problem list.. ------------- Commit messages: - 8277816: Client tests fail on macos-Aarch64 host Changes: https://git.openjdk.java.net/jdk/pull/8216/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8216&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8277816 Stats: 8 lines in 1 file changed: 0 ins; 8 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8216.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8216/head:pull/8216 PR: https://git.openjdk.java.net/jdk/pull/8216 From psadhukhan at openjdk.java.net Wed Apr 13 08:56:53 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 13 Apr 2022 08:56:53 GMT Subject: RFR: 8194946: Regression automated Test 'javax/swing/JFileChooser/6738668/bug6738668.java' fails [v3] In-Reply-To: References: Message-ID: <0hmR3bQDOs7CMrLN_UF1MLhcS3ZhCrDZqrOa0jhE3jI=.939302f5-c23b-4ff7-a3cb-21b19ccbb2be@github.com> > Test was failing in CI system in nightly testing. > Saw it failed with HeadlessException in macos-x64 and mascos-aarch64 and with GTKL&F not supported in linux-x64 in headless CI system. > Made the test headful and test now passes in all platforms (link in JBS) Prasanta Sadhukhan has updated the pull request incrementally with two additional commits since the last revision: - Merge branch 'JDK-8194946' of github.com:prsadhuk/jdk into JDK-8194946 - Add continue ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8202/files - new: https://git.openjdk.java.net/jdk/pull/8202/files/9b60c728..bb99222b Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8202&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8202&range=01-02 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8202.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8202/head:pull/8202 PR: https://git.openjdk.java.net/jdk/pull/8202 From psadhukhan at openjdk.java.net Wed Apr 13 08:56:56 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 13 Apr 2022 08:56:56 GMT Subject: RFR: 8194946: Regression automated Test 'javax/swing/JFileChooser/6738668/bug6738668.java' fails [v2] In-Reply-To: <2sepNi7UtvWxTzUszDkHPgKhFfGxQsjk_5n78HoFOHU=.cf6b762f-64c9-4158-aba2-a840fcc34a76@github.com> References: <2sepNi7UtvWxTzUszDkHPgKhFfGxQsjk_5n78HoFOHU=.cf6b762f-64c9-4158-aba2-a840fcc34a76@github.com> Message-ID: On Tue, 12 Apr 2022 20:28:43 GMT, Alexey Ivanov wrote: >> Prasanta Sadhukhan has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: >> >> - Merge branch 'master' into JDK-8194946 >> - 8194946: Regression automated Test 'javax/swing/JFileChooser/6738668/bug6738668.java' fails > > test/jdk/javax/swing/JFileChooser/6738668/bug6738668.java line 43: > >> 41: UIManager.setLookAndFeel(lookAndFeelInfo.getClassName()); >> 42: } catch (UnsupportedLookAndFeelException ignored) { >> 43: System.out.println("Unsupported L&F: " + lookAndFeelInfo.getClassName()); > > Add `continue;` to skip? Yes, added... ------------- PR: https://git.openjdk.java.net/jdk/pull/8202 From aivanov at openjdk.java.net Wed Apr 13 09:54:13 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 13 Apr 2022 09:54:13 GMT Subject: RFR: 8194946: Regression automated Test 'javax/swing/JFileChooser/6738668/bug6738668.java' fails [v3] In-Reply-To: <0hmR3bQDOs7CMrLN_UF1MLhcS3ZhCrDZqrOa0jhE3jI=.939302f5-c23b-4ff7-a3cb-21b19ccbb2be@github.com> References: <0hmR3bQDOs7CMrLN_UF1MLhcS3ZhCrDZqrOa0jhE3jI=.939302f5-c23b-4ff7-a3cb-21b19ccbb2be@github.com> Message-ID: On Wed, 13 Apr 2022 08:56:53 GMT, Prasanta Sadhukhan wrote: >> Test was failing in CI system in nightly testing. >> Saw it failed with HeadlessException in macos-x64 and mascos-aarch64 and with GTKL&F not supported in linux-x64 in headless CI system. >> Made the test headful and test now passes in all platforms (link in JBS) > > Prasanta Sadhukhan has updated the pull request incrementally with two additional commits since the last revision: > > - Merge branch 'JDK-8194946' of github.com:prsadhuk/jdk into JDK-8194946 > - Add continue Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8202 From psadhukhan at openjdk.java.net Wed Apr 13 11:01:16 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 13 Apr 2022 11:01:16 GMT Subject: Integrated: 8194946: Regression automated Test 'javax/swing/JFileChooser/6738668/bug6738668.java' fails In-Reply-To: References: Message-ID: <-f_pJjXSuDedpCrLbeJUUa6qnLynG3EjG03pGPDlz5w=.5547fc42-cf58-4e3d-8dda-a010025c107e@github.com> On Tue, 12 Apr 2022 12:27:22 GMT, Prasanta Sadhukhan wrote: > Test was failing in CI system in nightly testing. > Saw it failed with HeadlessException in macos-x64 and mascos-aarch64 and with GTKL&F not supported in linux-x64 in headless CI system. > Made the test headful and test now passes in all platforms (link in JBS) This pull request has now been integrated. Changeset: 70251b06 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/70251b064d0174cd902fc0179fbbd6e00c08c0e4 Stats: 12 lines in 2 files changed: 10 ins; 1 del; 1 mod 8194946: Regression automated Test 'javax/swing/JFileChooser/6738668/bug6738668.java' fails Reviewed-by: aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/8202 From smandalika at openjdk.java.net Wed Apr 13 11:14:51 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 13 Apr 2022 11:14:51 GMT Subject: RFR: 8284767: Create an automated test for JDK-4422535 Message-ID: Create an automated test for [JDK-4422535](https://bugs.openjdk.java.net/browse/JDK-4422535) AccessibleValue implementation only accept Integers The AccessibleValue implementations of the following components: java.awt.Scrollbar javax.swing.AbstractButton javax.swing.JInternalFrame javax.swing.JSplitPane javax.swing.JScrollBar javax.swing.JProgressBar javax.swing.JSlider require the argument to setCurrentAccessibleValue(Number) to be an Integer, else they completely ignore it - it returns a false indicating that the value has not been set by the return value, but they cannot know the reason for that). The test verifies that for each of the above components, the AccessibleValue is set when it is set to a Number (Float, Double, long etc) and not just for an Integer. his review is for migrating tests from a closed test suite to open. Testing: The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. ------------- Commit messages: - 8284767: Create an automated test for JDK-4422535 - 8284767: Create an automated test for JDK-4422535 Changes: https://git.openjdk.java.net/jdk/pull/8220/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8220&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284767 Stats: 321 lines in 1 file changed: 321 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8220.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8220/head:pull/8220 PR: https://git.openjdk.java.net/jdk/pull/8220 From azvegint at openjdk.java.net Wed Apr 13 11:35:33 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Wed, 13 Apr 2022 11:35:33 GMT Subject: RFR: 8159694: HiDPI, Unity, java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java Message-ID: Window's title height was increased in Gnome/Unity since it was written, so the test tries to initiate drag on frame's header instead of its body. Making the frame undecorated solves the issue. Testing is green on all platforms. ------------- Commit messages: - initial Changes: https://git.openjdk.java.net/jdk/pull/8221/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8221&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8159694 Stats: 11 lines in 3 files changed: 6 ins; 1 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/8221.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8221/head:pull/8221 PR: https://git.openjdk.java.net/jdk/pull/8221 From mvs at openjdk.java.net Wed Apr 13 15:50:18 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Wed, 13 Apr 2022 15:50:18 GMT Subject: RFR: 8284521: Write an automated regression test for RFE 4371575 [v2] In-Reply-To: References: Message-ID: <_T-d7GvItcowh91b5_cqgiMPiqLQQlNmBIB_PN34sRI=.c5e9a555-a8e7-4d08-8a27-ef0180594b95@github.com> On Sat, 9 Apr 2022 05:27:37 GMT, Sergey Bylokhov wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comment fixed: Removed unwanted directory > > Marked as reviewed by serb (Reviewer). @mrserb Can you sponsor this PR? ------------- PR: https://git.openjdk.java.net/jdk/pull/8143 From prr at openjdk.java.net Wed Apr 13 17:15:35 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 13 Apr 2022 17:15:35 GMT Subject: RFR: 8223543: [TESTBUG] Regression test java/awt/Graphics2D/DrawString/LCDTextSrcEa.java has issues Message-ID: This test had problem described in the bug report, and most of it was related to being headful. But actually the test didn't need to be headful - it did the actual rendering it wanted to test to a software BufferedImage. So make it headless. Also only Windows always supports LCD text, so run the test there and not Linux or Mac. ------------- Commit messages: - 8223543 Changes: https://git.openjdk.java.net/jdk/pull/8227/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8227&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8223543 Stats: 51 lines in 1 file changed: 18 ins; 25 del; 8 mod Patch: https://git.openjdk.java.net/jdk/pull/8227.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8227/head:pull/8227 PR: https://git.openjdk.java.net/jdk/pull/8227 From duke at openjdk.java.net Wed Apr 13 18:19:52 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Wed, 13 Apr 2022 18:19:52 GMT Subject: RFR: 8283803 : Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test [v5] In-Reply-To: References: Message-ID: > Fixed the following issue. > 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" > 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. > So added Pass and Fail button to mark the test result. > 3) Added timeout if in case user does not interact with the test UI. > > @shurymury > @aivanov-jdk lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Handled printer not available case ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8004/files - new: https://git.openjdk.java.net/jdk/pull/8004/files/9e4e95a4..4a5d327d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=03-04 Stats: 28 lines in 1 file changed: 16 ins; 5 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/8004.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8004/head:pull/8004 PR: https://git.openjdk.java.net/jdk/pull/8004 From aturbanov at openjdk.java.net Wed Apr 13 19:12:16 2022 From: aturbanov at openjdk.java.net (Andrey Turbanov) Date: Wed, 13 Apr 2022 19:12:16 GMT Subject: Integrated: 8284775: Simplify String.substring(_, length()) calls In-Reply-To: References: Message-ID: On Tue, 12 Apr 2022 19:38:33 GMT, Andrey Turbanov wrote: > Default `to` index for String.substring method call is length of the String. > We can simplify code a bit, by omitting default value. This pull request has now been integrated. Changeset: bf1c3ef0 Author: Andrey Turbanov URL: https://git.openjdk.java.net/jdk/commit/bf1c3ef02b22a615101530642d245fef899d33b7 Stats: 19 lines in 6 files changed: 0 ins; 5 del; 14 mod 8284775: Simplify String.substring(_, length()) calls Reviewed-by: bpb, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8212 From aturbanov at openjdk.java.net Wed Apr 13 20:45:35 2022 From: aturbanov at openjdk.java.net (Andrey Turbanov) Date: Wed, 13 Apr 2022 20:45:35 GMT Subject: RFR: 8284853: Fix varios 'expected' typo Message-ID: <32dmK9fPqvYhxpZmTgVYMYCfJNLZ3bI8ROg9UqUIRHc=.25e61d1a-6f26-4ea4-b5d3-3c6a80ce08dd@github.com> Found various typos of expected: `exepected`, `exept`, `epectedly`, `expeced`, `Unexpeted`, etc. ------------- Commit messages: - [PATCH] Fix 'expected' typo - [PATCH] Fix 'expected' typo - [PATCH] Fix 'expected' typo Changes: https://git.openjdk.java.net/jdk/pull/8231/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8231&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284853 Stats: 65 lines in 28 files changed: 0 ins; 0 del; 65 mod Patch: https://git.openjdk.java.net/jdk/pull/8231.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8231/head:pull/8231 PR: https://git.openjdk.java.net/jdk/pull/8231 From azvegint at openjdk.java.net Wed Apr 13 21:02:26 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Wed, 13 Apr 2022 21:02:26 GMT Subject: RFR: 6626492: Event time in future part 2, now on X Message-ID: This fix simply remove the test from ProblemList, since the issue is no longer reproducible. Multiple CI test runs are green. ------------- Commit messages: - initial Changes: https://git.openjdk.java.net/jdk/pull/8232/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8232&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-6626492 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8232.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8232/head:pull/8232 PR: https://git.openjdk.java.net/jdk/pull/8232 From azvegint at openjdk.java.net Wed Apr 13 21:35:52 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Wed, 13 Apr 2022 21:35:52 GMT Subject: RFR: 8144030: [macosx] test java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java fails (again) Message-ID: This test has two undecorated frames: 1. background, 300x300 2. shaped foreground, 200x200 After displaying this frames it tries to check color outside of shape but within frame 2 bounds. Unfortunately, on Linux and macOS there is a shadow around the shaped frame: ![image](https://user-images.githubusercontent.com/77687766/163270586-8dd97e93-582f-481f-999d-f08d4aaafba1.png) (changed color to green to make it more noticeable). One way to fix the test would be to add tolerance to color check. But with old check points blue color may vary in 222-255 range, which is a bit too much. Instead of this I made this shaped window the size of background window. This allows us to move check points away from shape border and its shadow, but still be able to check whether shape is applied or not. Testing is green on all platforms. ------------- Commit messages: - initial Changes: https://git.openjdk.java.net/jdk/pull/8233/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8233&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8144030 Stats: 105 lines in 2 files changed: 31 ins; 30 del; 44 mod Patch: https://git.openjdk.java.net/jdk/pull/8233.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8233/head:pull/8233 PR: https://git.openjdk.java.net/jdk/pull/8233 From azvegint at openjdk.java.net Wed Apr 13 21:35:52 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Wed, 13 Apr 2022 21:35:52 GMT Subject: RFR: 8144030: [macosx] test java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java fails (again) In-Reply-To: References: Message-ID: On Wed, 13 Apr 2022 21:28:35 GMT, Alexander Zvegintsev wrote: > This test has two undecorated frames: > > 1. background, 300x300 > 2. shaped foreground, 200x200 > > After displaying this frames it tries to check color outside of shape but within frame 2 bounds. > > Unfortunately, on Linux and macOS there is a shadow around the shaped frame: > ![image](https://user-images.githubusercontent.com/77687766/163270586-8dd97e93-582f-481f-999d-f08d4aaafba1.png) > (changed color to green to make it more noticeable). > > One way to fix the test would be to add tolerance to color check. > But with old check points blue color may vary in 222-255 range, which is a bit too much. > > Instead of this I made this shaped window the size of background window. > This allows us to move check points away from shape border and its shadow, but still be able to check whether shape is applied or not. > > Testing is green on all platforms. test/jdk/java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java line 144: > 142: point.y, > 143: BACKGROUND_COLOR > 144: ); Dunno why the old version was not checking inner points, but I've added one just to check if the shaped frame is above background one. ------------- PR: https://git.openjdk.java.net/jdk/pull/8233 From serb at openjdk.java.net Wed Apr 13 21:50:17 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 13 Apr 2022 21:50:17 GMT Subject: RFR: 8144030: [macosx] test java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java fails (again) In-Reply-To: References: Message-ID: On Wed, 13 Apr 2022 21:30:06 GMT, Alexander Zvegintsev wrote: >> This test has two undecorated frames: >> >> 1. background, 300x300 >> 2. shaped foreground, 200x200 >> >> After displaying this frames it tries to check color outside of shape but within frame 2 bounds. >> >> Unfortunately, on Linux and macOS there is a shadow around the shaped frame: >> ![image](https://user-images.githubusercontent.com/77687766/163270586-8dd97e93-582f-481f-999d-f08d4aaafba1.png) >> (changed color to green to make it more noticeable). >> >> One way to fix the test would be to add tolerance to color check. >> But with old check points blue color may vary in 222-255 range, which is a bit too much. >> >> Instead of this I made this shaped window the size of background window. >> This allows us to move check points away from shape border and its shadow, but still be able to check whether shape is applied or not. >> >> Testing is green on all platforms. > > test/jdk/java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java line 144: > >> 142: point.y, >> 143: BACKGROUND_COLOR >> 144: ); > > Dunno why the old version was not checking inner points, but I've added one just to check if the shaped frame is above background one. Don't we need to check the places where the shadow is rendered that it is not the shape color(to prove that the shape is not simple rectangular)? ------------- PR: https://git.openjdk.java.net/jdk/pull/8233 From serb at openjdk.java.net Wed Apr 13 21:52:23 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 13 Apr 2022 21:52:23 GMT Subject: RFR: 6626492: Event time in future part 2, now on X In-Reply-To: References: Message-ID: <7-ruwhmyTmzmEw6AG_svq2pyebBu-gvMQW4G2hCu7gI=.3b8617c4-80b8-4a01-abc5-d1113e980702@github.com> On Wed, 13 Apr 2022 20:51:41 GMT, Alexander Zvegintsev wrote: > This fix simply remove the test from ProblemList, since the issue is no longer reproducible. > > Multiple CI test runs are green. Looks fine, I think it was fixed as part of JDK-7194219 ------------- Marked as reviewed by serb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8232 From serb at openjdk.java.net Wed Apr 13 21:54:16 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 13 Apr 2022 21:54:16 GMT Subject: RFR: 8223543: [TESTBUG] Regression test java/awt/Graphics2D/DrawString/LCDTextSrcEa.java has issues In-Reply-To: References: Message-ID: On Wed, 13 Apr 2022 17:08:51 GMT, Phil Race wrote: > This test had problem described in the bug report, and most of it was related to being headful. > But actually the test didn't need to be headful - it did the actual rendering it wanted to test to > a software BufferedImage. So make it headless. > Also only Windows always supports LCD text, so run the test there and not Linux or Mac. Are there any differences in rendering LCD to the buffered image or to the volatile image? ------------- PR: https://git.openjdk.java.net/jdk/pull/8227 From serb at openjdk.java.net Wed Apr 13 21:55:13 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 13 Apr 2022 21:55:13 GMT Subject: RFR: 8159694: HiDPI, Unity, java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java In-Reply-To: References: Message-ID: On Wed, 13 Apr 2022 11:27:44 GMT, Alexander Zvegintsev wrote: > Window's title height was increased in Gnome/Unity since it was written, so the test tries to initiate drag on frame's header instead of its body. > Making the frame undecorated solves the issue. > Testing is green on all platforms. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8221 From prr at openjdk.java.net Wed Apr 13 22:01:16 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 13 Apr 2022 22:01:16 GMT Subject: RFR: 8223543: [TESTBUG] Regression test java/awt/Graphics2D/DrawString/LCDTextSrcEa.java has issues In-Reply-To: References: Message-ID: On Wed, 13 Apr 2022 21:50:47 GMT, Sergey Bylokhov wrote: > Are there any differences in rendering LCD to the buffered image or to the volatile image? There shouldn't be since it is the same code (loops) in both cases. We have to read back from a volatile image to get a s/w surface for LCD text - which is part of why LCD text can be slower than greyscale on some graphics cards where that read back is slow. ------------- PR: https://git.openjdk.java.net/jdk/pull/8227 From bpb at openjdk.java.net Wed Apr 13 22:15:15 2022 From: bpb at openjdk.java.net (Brian Burkhalter) Date: Wed, 13 Apr 2022 22:15:15 GMT Subject: RFR: 8284853: Fix varios 'expected' typo In-Reply-To: <32dmK9fPqvYhxpZmTgVYMYCfJNLZ3bI8ROg9UqUIRHc=.25e61d1a-6f26-4ea4-b5d3-3c6a80ce08dd@github.com> References: <32dmK9fPqvYhxpZmTgVYMYCfJNLZ3bI8ROg9UqUIRHc=.25e61d1a-6f26-4ea4-b5d3-3c6a80ce08dd@github.com> Message-ID: On Wed, 13 Apr 2022 20:36:48 GMT, Andrey Turbanov wrote: > Found various typos of expected: `exepected`, `exept`, `epectedly`, `expeced`, `Unexpeted`, etc. Expect the Unexpeted. ------------- Marked as reviewed by bpb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8231 From serb at openjdk.java.net Wed Apr 13 22:22:10 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 13 Apr 2022 22:22:10 GMT Subject: RFR: 8277816: Client tests fail on macos-Aarch64 host In-Reply-To: References: Message-ID: <909PxsAFMSCzddQsanlheMm9C5uZttzdGR8-Ikcagrw=.fd1a241f-13e2-4b1c-8894-80cc0709b0a8@github.com> On Wed, 13 Apr 2022 07:40:50 GMT, Prasanta Sadhukhan wrote: > This tests was failing on macos12 M1 systems due to wrong color profile configurations set in CI systems. > If correct sRGB IEC61966-2.1 is set, then these test passed. Test job link in JBS.. > > So, removing from Problem list.. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8216 From cjplummer at openjdk.java.net Wed Apr 13 22:45:18 2022 From: cjplummer at openjdk.java.net (Chris Plummer) Date: Wed, 13 Apr 2022 22:45:18 GMT Subject: RFR: 8284853: Fix varios 'expected' typo In-Reply-To: <32dmK9fPqvYhxpZmTgVYMYCfJNLZ3bI8ROg9UqUIRHc=.25e61d1a-6f26-4ea4-b5d3-3c6a80ce08dd@github.com> References: <32dmK9fPqvYhxpZmTgVYMYCfJNLZ3bI8ROg9UqUIRHc=.25e61d1a-6f26-4ea4-b5d3-3c6a80ce08dd@github.com> Message-ID: On Wed, 13 Apr 2022 20:36:48 GMT, Andrey Turbanov wrote: > Found various typos of expected: `exepected`, `exept`, `epectedly`, `expeced`, `Unexpeted`, etc. test/jdk/java/lang/StackWalker/StackStreamTest.java line 218: > 216: private static void equalsOrThrow(String label, List list, List expected) { > 217: System.out.println("List: " + list); > 218: System.out.println("Expected: " + list); I think there is a per-existing bug here. Shouldn't the second println print `expected` instead of `list`? ------------- PR: https://git.openjdk.java.net/jdk/pull/8231 From azvegint at openjdk.java.net Wed Apr 13 23:18:07 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Wed, 13 Apr 2022 23:18:07 GMT Subject: RFR: 8144030: [macosx] test java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java fails (again) [v2] In-Reply-To: References: Message-ID: > This test has two undecorated frames: > > 1. background, 300x300 > 2. shaped foreground, 200x200 > > After displaying this frames it tries to check color outside of shape but within frame 2 bounds. > > Unfortunately, on Linux and macOS there is a shadow around the shaped frame: > ![image](https://user-images.githubusercontent.com/77687766/163270586-8dd97e93-582f-481f-999d-f08d4aaafba1.png) > (changed color to green to make it more noticeable). > > One way to fix the test would be to add tolerance to color check. > But with old check points blue color may vary in 222-255 range, which is a bit too much. > > Instead of this I made this shaped window the size of background window. > This allows us to move check points away from shape border and its shadow, but still be able to check whether shape is applied or not. > > Testing is green on all platforms. Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: check around corners ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8233/files - new: https://git.openjdk.java.net/jdk/pull/8233/files/d169081d..dbef3618 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8233&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8233&range=00-01 Stats: 27 lines in 1 file changed: 15 ins; 0 del; 12 mod Patch: https://git.openjdk.java.net/jdk/pull/8233.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8233/head:pull/8233 PR: https://git.openjdk.java.net/jdk/pull/8233 From azvegint at openjdk.java.net Wed Apr 13 23:18:08 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Wed, 13 Apr 2022 23:18:08 GMT Subject: RFR: 8144030: [macosx] test java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java fails (again) [v2] In-Reply-To: References: Message-ID: On Wed, 13 Apr 2022 21:46:57 GMT, Sergey Bylokhov wrote: >> test/jdk/java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java line 144: >> >>> 142: point.y, >>> 143: BACKGROUND_COLOR >>> 144: ); >> >> Dunno why the old version was not checking inner points, but I've added one just to check if the shaped frame is above background one. > > Don't we need to check the places where the shadow is rendered that it is not the shape color(to prove that the shape is not simple rectangular)? Sure, extra check added. ------------- PR: https://git.openjdk.java.net/jdk/pull/8233 From jeremie.bergeron.1 at ens.etsmtl.ca Tue Apr 12 17:05:39 2022 From: jeremie.bergeron.1 at ens.etsmtl.ca (=?iso-8859-1?Q?Bergeron=2C_J=E9r=E9mie?=) Date: Tue, 12 Apr 2022 17:05:39 +0000 Subject: [Request] Post a message to all the list members Message-ID: Hi, I am the person who created this issues: https://bugs.openjdk.java.net/browse/JDK-8284730 I am messaging you, because I don't have an account, so I can't answer Praveen Narayanaswamy. I would like to say to him that his suggestion is not an good solution. I can't copy paste file from "%userprofile%\AppData\Local\Microsoft\Windows\Fonts" to "C:\Windows\Fonts". Yes, it would resolve the problem, but the user probably don't want me to do that (and, they are totally right. It would make a mess in the computer file.). I would like to add that the method getAllFonts() (https://docs.oracle.com/javase/8/docs/api/java/awt/GraphicsEnvironment.html#getAllFonts--) show the font in the directory "%userprofile%\AppData\Local\Microsoft\Windows\Fonts". Here is an example how to use it: GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); Font[] fonts = ge.getAllFonts(); It is for me not logic that getAllFonts can get the font in "%userprofile%\AppData\Local\Microsoft\Windows\Fonts", but PhysicalFont.class.getDeclaredField("platName") could not get them. In brief, I would like to know if it is possible to Praveen Narayanaswamy to reconsider his decision. Have a great day From psadhukhan at openjdk.java.net Thu Apr 14 07:03:30 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 14 Apr 2022 07:03:30 GMT Subject: RFR: 7132796: [macosx] closed/javax/swing/JComboBox/4517214/bug4517214.java fails on MacOS Message-ID: JDK-4517214 was fixed for Metal L&F where JComboBox having TitledBorder used to have double height compared to normal JComboBox. The issue is still observed for macos for Aqua L&F where still double height is seen. Fix is to prevent adding border insets height to combobox size as was done for [MetalComboxUI.getMinimumSize[](url)](https://github.com/openjdk/jdk/blame/master/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalComboBoxUI.java#L384) The closed test is automated and moved to open. ------------- Commit messages: - 7132796: [macosx] closed/javax/swing/JComboBox/4517214/bug4517214.java fails on MacOS - 7132796: [macosx] closed/javax/swing/JComboBox/4517214/bug4517214.java fails on MacOS - 7132796: [macosx] closed/javax/swing/JComboBox/4517214/bug4517214.java fails on MacOS Changes: https://git.openjdk.java.net/jdk/pull/8237/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8237&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-7132796 Stats: 107 lines in 2 files changed: 100 ins; 7 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8237.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8237/head:pull/8237 PR: https://git.openjdk.java.net/jdk/pull/8237 From azvegint at openjdk.java.net Thu Apr 14 07:57:06 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Thu, 14 Apr 2022 07:57:06 GMT Subject: Integrated: 6626492: Event time in future part 2, now on X In-Reply-To: References: Message-ID: On Wed, 13 Apr 2022 20:51:41 GMT, Alexander Zvegintsev wrote: > This fix simply remove the test from ProblemList, since the issue is no longer reproducible. > > Multiple CI test runs are green. This pull request has now been integrated. Changeset: 23c6817c Author: Alexander Zvegintsev URL: https://git.openjdk.java.net/jdk/commit/23c6817c1a3c05b9db05155952c40f1543b99077 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod 6626492: Event time in future part 2, now on X Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8232 From azvegint at openjdk.java.net Thu Apr 14 07:58:13 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Thu, 14 Apr 2022 07:58:13 GMT Subject: Integrated: 8159694: HiDPI, Unity, java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java In-Reply-To: References: Message-ID: On Wed, 13 Apr 2022 11:27:44 GMT, Alexander Zvegintsev wrote: > Window's title height was increased in Gnome/Unity since it was written, so the test tries to initiate drag on frame's header instead of its body. > Making the frame undecorated solves the issue. > Testing is green on all platforms. This pull request has now been integrated. Changeset: c3938ec1 Author: Alexander Zvegintsev URL: https://git.openjdk.java.net/jdk/commit/c3938ec18b4026d70d9654235dcd986d90344f5b Stats: 11 lines in 3 files changed: 6 ins; 1 del; 4 mod 8159694: HiDPI, Unity, java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8221 From serb at openjdk.java.net Thu Apr 14 09:17:18 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 14 Apr 2022 09:17:18 GMT Subject: RFR: 8144030: [macosx] test java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java fails (again) [v2] In-Reply-To: References: Message-ID: On Wed, 13 Apr 2022 23:18:07 GMT, Alexander Zvegintsev wrote: >> This test has two undecorated frames: >> >> 1. background, 300x300 >> 2. shaped foreground, 200x200 >> >> After displaying this frames it tries to check color outside of shape but within frame 2 bounds. >> >> Unfortunately, on Linux and macOS there is a shadow around the shaped frame: >> ![image](https://user-images.githubusercontent.com/77687766/163270586-8dd97e93-582f-481f-999d-f08d4aaafba1.png) >> (changed color to green to make it more noticeable). >> >> One way to fix the test would be to add tolerance to color check. >> But with old check points blue color may vary in 222-255 range, which is a bit too much. >> >> Instead of this I made this shaped window the size of background window. >> This allows us to move check points away from shape border and its shadow, but still be able to check whether shape is applied or not. >> >> Testing is green on all platforms. > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > check around corners Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8233 From serb at openjdk.java.net Thu Apr 14 09:18:35 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 14 Apr 2022 09:18:35 GMT Subject: RFR: 8223543: [TESTBUG] Regression test java/awt/Graphics2D/DrawString/LCDTextSrcEa.java has issues In-Reply-To: References: Message-ID: On Wed, 13 Apr 2022 17:08:51 GMT, Phil Race wrote: > This test had problem described in the bug report, and most of it was related to being headful. > But actually the test didn't need to be headful - it did the actual rendering it wanted to test to > a software BufferedImage. So make it headless. > Also only Windows always supports LCD text, so run the test there and not Linux or Mac. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8227 From serb at openjdk.java.net Thu Apr 14 09:19:37 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 14 Apr 2022 09:19:37 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v5] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 06:49:09 GMT, Maxim Kartashev wrote: >> These crashes were not reproducible, so the fix is based on a hypothesis that there are two possible reasons for them: >> 1. `makeDefaultConfig()` returning `NULL`. >> 2. A race condition when the number of screens changes. >> The race scenario: `X11GraphisDevice.makeDefaultConfiguration()` is called on EDT so the call can race with `X11GraphisDevice.invalidate()` that re-sets the screen number of the device; the latter is invoked on the `AWT-XAWT` thread from `X11GraphicsEnvironment.rebuildDevices()`. So by the time `makeDefaultConfiguration()` makes a native call with the device's current screen number, the `x11Screens` array maintained by the native code could have become shorter. And the native methods like `Java_sun_awt_X11GraphicsDevice_getConfigColormap()` assume that the number passed to them is always current and valid. The AWT lock only protects against the changes during the native methods invocation and does not protect against them being called with an outdated screen number. With a larger screen number, those methods read past the end of the `x11Screens` array. >> >> The fix for (1) is to die gracefully instead of crashing in an attempt to de-reference a `NULL` pointer, which might happen upon returning from `makeDefaultConfig()` in `getAllConfigs()`. >> >> The fix for (2) is to eliminate the race by protecting `X11GraphisDevice.screen` with the AWT lock such that it doesn't change when the native methods working with it are active. >> >> We've been shipping JetBrains Runtime with this fix for a few months now and there were no crash reports with those specific patterns against the versions with the fix. > > Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision: > > Restored the original code in X11GraphicsDevice.java that got auto-formatted The latest version looks fine to me. ------------- Marked as reviewed by serb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7182 From serb at openjdk.java.net Thu Apr 14 09:20:09 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 14 Apr 2022 09:20:09 GMT Subject: RFR: 7132796: [macosx] closed/javax/swing/JComboBox/4517214/bug4517214.java fails on MacOS In-Reply-To: References: Message-ID: <3MS0Dcso0EXEjumdqT0HEYF1MaTdVjQ5XMIyqIWPKJ4=.6aaddd8a-90e5-4dc8-95b3-ed49d244b023@github.com> On Thu, 14 Apr 2022 06:50:10 GMT, Prasanta Sadhukhan wrote: > JDK-4517214 was fixed for Metal L&F where JComboBox having TitledBorder used to have double height compared to normal JComboBox. > The issue is still observed for macos for Aqua L&F where still double height is seen. > Fix is to prevent adding border insets height to combobox size as was done for [MetalComboxUI.getMinimumSize[](url)](https://github.com/openjdk/jdk/blame/master/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalComboBoxUI.java#L384) > The closed test is automated and moved to open. CI testing on all platform is ok. test/jdk/javax/swing/JComboBox/TestComboBoxHeight.java line 48: > 46: > 47: public static void main(String[] args) throws Exception { > 48: try { Can we check all L&Fs? ------------- PR: https://git.openjdk.java.net/jdk/pull/8237 From aturbanov at openjdk.java.net Thu Apr 14 09:28:17 2022 From: aturbanov at openjdk.java.net (Andrey Turbanov) Date: Thu, 14 Apr 2022 09:28:17 GMT Subject: RFR: 8284853: Fix various 'expected' typo [v2] In-Reply-To: <32dmK9fPqvYhxpZmTgVYMYCfJNLZ3bI8ROg9UqUIRHc=.25e61d1a-6f26-4ea4-b5d3-3c6a80ce08dd@github.com> References: <32dmK9fPqvYhxpZmTgVYMYCfJNLZ3bI8ROg9UqUIRHc=.25e61d1a-6f26-4ea4-b5d3-3c6a80ce08dd@github.com> Message-ID: > Found various typos of expected: `exepected`, `exept`, `epectedly`, `expeced`, `Unexpeted`, etc. Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: 8284853: Fix various 'expected' typo improve test log ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8231/files - new: https://git.openjdk.java.net/jdk/pull/8231/files/fe6d9890..9fc75e89 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8231&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8231&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8231.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8231/head:pull/8231 PR: https://git.openjdk.java.net/jdk/pull/8231 From psadhukhan at openjdk.java.net Thu Apr 14 09:38:11 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 14 Apr 2022 09:38:11 GMT Subject: RFR: 7132796: [macosx] closed/javax/swing/JComboBox/4517214/bug4517214.java fails on MacOS In-Reply-To: <3MS0Dcso0EXEjumdqT0HEYF1MaTdVjQ5XMIyqIWPKJ4=.6aaddd8a-90e5-4dc8-95b3-ed49d244b023@github.com> References: <3MS0Dcso0EXEjumdqT0HEYF1MaTdVjQ5XMIyqIWPKJ4=.6aaddd8a-90e5-4dc8-95b3-ed49d244b023@github.com> Message-ID: On Thu, 14 Apr 2022 09:17:17 GMT, Sergey Bylokhov wrote: >> JDK-4517214 was fixed for Metal L&F where JComboBox having TitledBorder used to have double height compared to normal JComboBox. >> The issue is still observed for macos for Aqua L&F where still double height is seen. >> Fix is to prevent adding border insets height to combobox size as was done for [MetalComboxUI.getMinimumSize[](url)](https://github.com/openjdk/jdk/blame/master/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalComboBoxUI.java#L384) >> The closed test is automated and moved to open. CI testing on all platform is ok. > > test/jdk/javax/swing/JComboBox/TestComboBoxHeight.java line 48: > >> 46: >> 47: public static void main(String[] args) throws Exception { >> 48: try { > > Can we check all L&Fs? Not now..we already have open JBS for window L&F JDK-8233469 and it also fails in Nimbus which will be looked into separately.. I will like this PR to be for for default L&F only otherwise it will cause failure in CI systems.. ------------- PR: https://git.openjdk.java.net/jdk/pull/8237 From duke at openjdk.java.net Thu Apr 14 10:34:26 2022 From: duke at openjdk.java.net (Maxim Kartashev) Date: Thu, 14 Apr 2022 10:34:26 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v5] In-Reply-To: <6dun2ppw1GHei7MlyCfLlnQ27NsNRSZ5F3Y1kSWrA7E=.08fadf9c-73f4-499e-8b45-f5e3c147bd91@github.com> References: <6dun2ppw1GHei7MlyCfLlnQ27NsNRSZ5F3Y1kSWrA7E=.08fadf9c-73f4-499e-8b45-f5e3c147bd91@github.com> Message-ID: <8kzfditr4KLCLoieljvFky8980_z0wEFEaHYFzkndvk=.4c71dcaa-2537-429b-b8fa-befa6f32f080@github.com> On Fri, 8 Apr 2022 16:20:10 GMT, Phil Race wrote: >> Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision: >> >> Restored the original code in X11GraphicsDevice.java that got auto-formatted > > src/java.desktop/unix/classes/sun/awt/X11/XCanvasPeer.java line 90: > >> 88: getScreenDevices()[screenNum]. >> 89: getDefaultConfiguration(); >> 90: } > > why did you get rid of the just in case ? > Actually why is this method being modified at all ? > I mean besides adding locking .. @prrace Are you OK with the current state of things? Let me know if you want part of the changes reverted. ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From yyang at openjdk.java.net Thu Apr 14 10:42:11 2022 From: yyang at openjdk.java.net (Yi Yang) Date: Thu, 14 Apr 2022 10:42:11 GMT Subject: RFR: 8284853: Fix various 'expected' typo [v2] In-Reply-To: References: <32dmK9fPqvYhxpZmTgVYMYCfJNLZ3bI8ROg9UqUIRHc=.25e61d1a-6f26-4ea4-b5d3-3c6a80ce08dd@github.com> Message-ID: On Thu, 14 Apr 2022 09:28:17 GMT, Andrey Turbanov wrote: >> Found various typos of expected: `exepected`, `exept`, `epectedly`, `expeced`, `Unexpeted`, etc. > > Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: > > 8284853: Fix various 'expected' typo > improve test log I found [yet another typo](https://github.com/kelthuzadx/jdk/commit/acb9e15bc0bf5395d1c0875f36992f692734f948), I wonder if you can merge this into your patch so that I do not need to submit a new PR for it? Thanks. ------------- PR: https://git.openjdk.java.net/jdk/pull/8231 From azvegint at openjdk.java.net Thu Apr 14 10:54:19 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Thu, 14 Apr 2022 10:54:19 GMT Subject: RFR: 8277816: Client tests fail on macos-Aarch64 host In-Reply-To: References: Message-ID: On Wed, 13 Apr 2022 07:40:50 GMT, Prasanta Sadhukhan wrote: > This tests was failing on macos12 M1 systems due to wrong color profile configurations set in CI systems. > If correct sRGB IEC61966-2.1 is set, then these test passed. Test job link in JBS.. > > So, removing from Problem list.. Marked as reviewed by azvegint (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8216 From duke at openjdk.java.net Thu Apr 14 10:54:45 2022 From: duke at openjdk.java.net (Tejesh R) Date: Thu, 14 Apr 2022 10:54:45 GMT Subject: RFR: 8236987: Remove call to System.out.println from ImageIcon.loadImage [v11] In-Reply-To: References: Message-ID: On Tue, 12 Apr 2022 20:50:48 GMT, Phil Race wrote: >> This is intentional, it makes sure the image is in `LOADING` state to verify that the newly added resets it to `ABORTED`. >> >> I don't expect the image to load, we don't care. If it succeeds, the status is `COMPLETE`; if it times outs or another error occurs, the status is `ERRORED`. > > ok .. I trust this test has been verified in mach5 already .. Yes, I have verified in mach5...... ------------- PR: https://git.openjdk.java.net/jdk/pull/7754 From azvegint at openjdk.java.net Thu Apr 14 11:12:29 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Thu, 14 Apr 2022 11:12:29 GMT Subject: RFR: 8223543: [TESTBUG] Regression test java/awt/Graphics2D/DrawString/LCDTextSrcEa.java has issues In-Reply-To: References: Message-ID: On Wed, 13 Apr 2022 17:08:51 GMT, Phil Race wrote: > This test had problem described in the bug report, and most of it was related to being headful. > But actually the test didn't need to be headful - it did the actual rendering it wanted to test to > a software BufferedImage. So make it headless. > Also only Windows always supports LCD text, so run the test there and not Linux or Mac. Marked as reviewed by azvegint (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8227 From duke at openjdk.java.net Thu Apr 14 11:14:37 2022 From: duke at openjdk.java.net (Tejesh R) Date: Thu, 14 Apr 2022 11:14:37 GMT Subject: Integrated: 8236987: Remove call to System.out.println from ImageIcon.loadImage In-Reply-To: References: Message-ID: On Wed, 9 Mar 2022 10:04:09 GMT, Tejesh R wrote: > Removed the println() line from the Interrupted catch block. Since waitForID() Interrupt indicates completion of Image Loading, println as Interrupt handling was not required. This pull request has now been integrated. Changeset: f2640317 Author: Tejesh R Committer: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/f26403172f2e19e2ed4efd0f06f00beaebde1031 Stats: 96 lines in 2 files changed: 95 ins; 0 del; 1 mod 8236987: Remove call to System.out.println from ImageIcon.loadImage Reviewed-by: aivanov, psadhukhan, prr ------------- PR: https://git.openjdk.java.net/jdk/pull/7754 From aivanov at openjdk.java.net Thu Apr 14 12:48:15 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 14 Apr 2022 12:48:15 GMT Subject: RFR: 8223543: [TESTBUG] Regression test java/awt/Graphics2D/DrawString/LCDTextSrcEa.java has issues In-Reply-To: References: Message-ID: <1EIc_o631mZjO901PBRnvRKHYZQv5mbU6mCUQrggoJw=.eb6fee9e-f5b3-427c-9cf4-933e04b42137@github.com> On Wed, 13 Apr 2022 17:08:51 GMT, Phil Race wrote: > This test had problem described in the bug report, and most of it was related to being headful. > But actually the test didn't need to be headful - it did the actual rendering it wanted to test to > a software BufferedImage. So make it headless. > Also only Windows always supports LCD text, so run the test there and not Linux or Mac. Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8227 From ihse at openjdk.java.net Thu Apr 14 13:13:15 2022 From: ihse at openjdk.java.net (Magnus Ihse Bursie) Date: Thu, 14 Apr 2022 13:13:15 GMT Subject: RFR: 8284853: Fix various 'expected' typo [v2] In-Reply-To: References: <32dmK9fPqvYhxpZmTgVYMYCfJNLZ3bI8ROg9UqUIRHc=.25e61d1a-6f26-4ea4-b5d3-3c6a80ce08dd@github.com> Message-ID: On Thu, 14 Apr 2022 09:28:17 GMT, Andrey Turbanov wrote: >> Found various typos of expected: `exepected`, `exept`, `epectedly`, `expeced`, `Unexpeted`, etc. > > Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision: > > 8284853: Fix various 'expected' typo > improve test log Build changes look good. ------------- Marked as reviewed by ihse (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8231 From azvegint at openjdk.java.net Thu Apr 14 14:31:03 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Thu, 14 Apr 2022 14:31:03 GMT Subject: RFR: 8159599: [TEST_BUG] java/awt/Modal/ModalInternalFrameTest/ModalInternalFrameTest.java Message-ID: The SimpleWindowActivationTest test does not fail even without modifications(multiple CI test runs are green). So just remove it from ProblemList would be enough. However I did some clean up and added some delays for "extra safety". ------------- Commit messages: - initial - initial Changes: https://git.openjdk.java.net/jdk/pull/8244/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8244&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8159599 Stats: 23 lines in 2 files changed: 13 ins; 3 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/8244.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8244/head:pull/8244 PR: https://git.openjdk.java.net/jdk/pull/8244 From ihse at openjdk.java.net Thu Apr 14 16:12:27 2022 From: ihse at openjdk.java.net (Magnus Ihse Bursie) Date: Thu, 14 Apr 2022 16:12:27 GMT Subject: RFR: 8284891: Fix typos in build system files Message-ID: <48sHX_PTeLN0flIYI_TiwTd3gsE3QGm3xw_iaoA6mTU=.2efe1eea-0398-43ca-ad71-3ce4671c0ffe@github.com> I ran `codespell` on the `make` directory, and accepted those changes where it indeed discovered real typos. (Due to false positives this can unfortunately not be run automatically) Most of the fixes are in comments. A few are in messages aimed at the user. ------------- Commit messages: - 8284891: Fix typos in build system files Changes: https://git.openjdk.java.net/jdk/pull/8246/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8246&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284891 Stats: 72 lines in 46 files changed: 0 ins; 0 del; 72 mod Patch: https://git.openjdk.java.net/jdk/pull/8246.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8246/head:pull/8246 PR: https://git.openjdk.java.net/jdk/pull/8246 From erikj at openjdk.java.net Thu Apr 14 16:29:40 2022 From: erikj at openjdk.java.net (Erik Joelsson) Date: Thu, 14 Apr 2022 16:29:40 GMT Subject: RFR: 8284891: Fix typos in build system files In-Reply-To: <48sHX_PTeLN0flIYI_TiwTd3gsE3QGm3xw_iaoA6mTU=.2efe1eea-0398-43ca-ad71-3ce4671c0ffe@github.com> References: <48sHX_PTeLN0flIYI_TiwTd3gsE3QGm3xw_iaoA6mTU=.2efe1eea-0398-43ca-ad71-3ce4671c0ffe@github.com> Message-ID: On Thu, 14 Apr 2022 16:05:48 GMT, Magnus Ihse Bursie wrote: > I ran `codespell` on the `make` directory, and accepted those changes where it indeed discovered real typos. > > (Due to false positives this can unfortunately not be run automatically) > > Most of the fixes are in comments. A few are in messages aimed at the user. Marked as reviewed by erikj (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8246 From duke at openjdk.java.net Thu Apr 14 16:59:33 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Thu, 14 Apr 2022 16:59:33 GMT Subject: RFR: 8274082 : Wrong test case name specified in jtreg run tag for java/awt/print/PrinterJob/SwingUIText.java [v2] In-Reply-To: References: Message-ID: > Following issues were fixed in this test > 1) Fixed - Parser error due to yesno in @run main/manual=yesno > 2) Fixed Wrong test name specified in @run jtreg > @run main/manual=yesno PrintTextTest . It should be @run main/manual=yesno SwingUIText > 3) Instruction frame does not have 'Pass' or 'Fail' button to mark the test as Pass or Fail after verifying Text on UI and print out. > 4) Fixed - Test UI ( test instruction frame, UI frame and Print Dialog) just gets disposed automatically without interacting via running the test case with jtreg. > > @shurymury lawrence.andrews 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: - Merge branch 'openjdk:master' into JDK-8274082 - 8274082 : Wrong test case name specified in jtreg run tag for java/awt/print/PrinterJob/SwingUIText.java ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7946/files - new: https://git.openjdk.java.net/jdk/pull/7946/files/f1dca5de..0916e6ea Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7946&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7946&range=00-01 Stats: 187386 lines in 2481 files changed: 134302 ins; 12666 del; 40418 mod Patch: https://git.openjdk.java.net/jdk/pull/7946.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7946/head:pull/7946 PR: https://git.openjdk.java.net/jdk/pull/7946 From aturbanov at openjdk.java.net Thu Apr 14 18:09:34 2022 From: aturbanov at openjdk.java.net (Andrey Turbanov) Date: Thu, 14 Apr 2022 18:09:34 GMT Subject: RFR: 8284853: Fix various 'expected' typo [v2] In-Reply-To: References: <32dmK9fPqvYhxpZmTgVYMYCfJNLZ3bI8ROg9UqUIRHc=.25e61d1a-6f26-4ea4-b5d3-3c6a80ce08dd@github.com> Message-ID: On Thu, 14 Apr 2022 10:38:33 GMT, Yi Yang wrote: >I found [yet another typo](https://github.com/kelthuzadx/jdk/commit/acb9e15bc0bf5395d1c0875f36992f692734f948), I wonder if you can merge this into your patch so that I do not need to submit a new PR for it? Thanks. I think it deserves a separate ticket. BTW there are a lot of other typos in JDK, especially in comments. ------------- PR: https://git.openjdk.java.net/jdk/pull/8231 From aturbanov at openjdk.java.net Thu Apr 14 18:09:37 2022 From: aturbanov at openjdk.java.net (Andrey Turbanov) Date: Thu, 14 Apr 2022 18:09:37 GMT Subject: Integrated: 8284853: Fix various 'expected' typo In-Reply-To: <32dmK9fPqvYhxpZmTgVYMYCfJNLZ3bI8ROg9UqUIRHc=.25e61d1a-6f26-4ea4-b5d3-3c6a80ce08dd@github.com> References: <32dmK9fPqvYhxpZmTgVYMYCfJNLZ3bI8ROg9UqUIRHc=.25e61d1a-6f26-4ea4-b5d3-3c6a80ce08dd@github.com> Message-ID: On Wed, 13 Apr 2022 20:36:48 GMT, Andrey Turbanov wrote: > Found various typos of expected: `exepected`, `exept`, `epectedly`, `expeced`, `Unexpeted`, etc. This pull request has now been integrated. Changeset: 48c75498 Author: Andrey Turbanov URL: https://git.openjdk.java.net/jdk/commit/48c75498060f076287d3d44c49934db9ac70887b Stats: 65 lines in 28 files changed: 0 ins; 0 del; 65 mod 8284853: Fix various 'expected' typo Reviewed-by: bpb, ihse ------------- PR: https://git.openjdk.java.net/jdk/pull/8231 From ihse at openjdk.java.net Thu Apr 14 19:37:33 2022 From: ihse at openjdk.java.net (Magnus Ihse Bursie) Date: Thu, 14 Apr 2022 19:37:33 GMT Subject: Integrated: 8284891: Fix typos in build system files In-Reply-To: <48sHX_PTeLN0flIYI_TiwTd3gsE3QGm3xw_iaoA6mTU=.2efe1eea-0398-43ca-ad71-3ce4671c0ffe@github.com> References: <48sHX_PTeLN0flIYI_TiwTd3gsE3QGm3xw_iaoA6mTU=.2efe1eea-0398-43ca-ad71-3ce4671c0ffe@github.com> Message-ID: <2mF5V7umZUZe-exsy8TAj69oQs5CZ1A41lGknDaoNVc=.bf65fd9f-8851-4626-8bd1-6f23fef1e945@github.com> On Thu, 14 Apr 2022 16:05:48 GMT, Magnus Ihse Bursie wrote: > I ran `codespell` on the `make` directory, and accepted those changes where it indeed discovered real typos. > > (Due to false positives this can unfortunately not be run automatically) > > Most of the fixes are in comments. A few are in messages aimed at the user. This pull request has now been integrated. Changeset: 160eb2bd Author: Magnus Ihse Bursie URL: https://git.openjdk.java.net/jdk/commit/160eb2bd392fea29dd690ee9781174d14dc0b659 Stats: 72 lines in 46 files changed: 0 ins; 0 del; 72 mod 8284891: Fix typos in build system files Reviewed-by: erikj ------------- PR: https://git.openjdk.java.net/jdk/pull/8246 From aivanov at openjdk.java.net Thu Apr 14 20:31:51 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 14 Apr 2022 20:31:51 GMT Subject: RFR: 8284884: Replace polling with waiting in javax/swing/text/html/parser/Parser/8078268/bug8078268.java Message-ID: A quick fix for the `javax/swing/text/html/parser/Parser/8078268/bug8078268.java` which replaces `Thread.sleep` in a loop with `CountDownLatch.await`. The code is shorter and clearer. The test fails on the builds without the fix for [JDK-8078268](https://bugs.openjdk.java.net/browse/JDK-8078268). I ran it in the CI and it passes. ------------- Commit messages: - 8284884: Drop author - 8284884: Replace polling with waiting in javax/swing/text/html/parser/Parser/8078268/bug8078268.java Changes: https://git.openjdk.java.net/jdk/pull/8252/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8252&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284884 Stats: 21 lines in 1 file changed: 8 ins; 8 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/8252.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8252/head:pull/8252 PR: https://git.openjdk.java.net/jdk/pull/8252 From aivanov at openjdk.java.net Thu Apr 14 20:36:19 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 14 Apr 2022 20:36:19 GMT Subject: RFR: 8284884: Replace polling with waiting in javax/swing/text/html/parser/Parser/8078268/bug8078268.java [v2] In-Reply-To: References: Message-ID: > A quick fix for the `javax/swing/text/html/parser/Parser/8078268/bug8078268.java` which replaces `Thread.sleep` in a loop with `CountDownLatch.await`. > > The code is shorter and clearer. > > The test fails on the builds without the fix for [JDK-8078268](https://bugs.openjdk.java.net/browse/JDK-8078268). I ran it in the CI and it passes. Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: Simplify filename handling ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8252/files - new: https://git.openjdk.java.net/jdk/pull/8252/files/0609a11f..83d6301d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8252&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8252&range=00-01 Stats: 6 lines in 1 file changed: 2 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/8252.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8252/head:pull/8252 PR: https://git.openjdk.java.net/jdk/pull/8252 From duke at openjdk.java.net Thu Apr 14 23:36:28 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Thu, 14 Apr 2022 23:36:28 GMT Subject: RFR: 8283803 : Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test [v6] In-Reply-To: References: Message-ID: > Fixed the following issue. > 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" > 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. > So added Pass and Fail button to mark the test result. > 3) Added timeout if in case user does not interact with the test UI. > > @shurymury > @aivanov-jdk lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Enhance PassFailJFrame.java & fixed PrintGlyphVectorTest.java test ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8004/files - new: https://git.openjdk.java.net/jdk/pull/8004/files/4a5d327d..af60daf0 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=04-05 Stats: 69 lines in 2 files changed: 47 ins; 6 del; 16 mod Patch: https://git.openjdk.java.net/jdk/pull/8004.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8004/head:pull/8004 PR: https://git.openjdk.java.net/jdk/pull/8004 From duke at openjdk.java.net Thu Apr 14 23:45:28 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Thu, 14 Apr 2022 23:45:28 GMT Subject: RFR: 8284898 : Enhance PassFailJFrame [v7] In-Reply-To: References: Message-ID: <3EmU2J5RtgVxJUd0q8x16cb0DI1nj6jPbaswnaiudMg=.509ddf8b-401b-450a-93a6-da64b94bfb2b@github.com> > Fixed the following issue. > 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" > 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. > So added Pass and Fail button to mark the test result. > 3) Added timeout if in case user does not interact with the test UI. > > @shurymury > @aivanov-jdk lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Update PrintGlyphVectorTest.java ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8004/files - new: https://git.openjdk.java.net/jdk/pull/8004/files/af60daf0..e891ed17 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=06 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=05-06 Stats: 2 lines in 1 file changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8004.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8004/head:pull/8004 PR: https://git.openjdk.java.net/jdk/pull/8004 From prr at openjdk.java.net Fri Apr 15 01:08:44 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 15 Apr 2022 01:08:44 GMT Subject: Integrated: 8223543: [TESTBUG] Regression test java/awt/Graphics2D/DrawString/LCDTextSrcEa.java has issues In-Reply-To: References: Message-ID: On Wed, 13 Apr 2022 17:08:51 GMT, Phil Race wrote: > This test had problem described in the bug report, and most of it was related to being headful. > But actually the test didn't need to be headful - it did the actual rendering it wanted to test to > a software BufferedImage. So make it headless. > Also only Windows always supports LCD text, so run the test there and not Linux or Mac. This pull request has now been integrated. Changeset: d41331e6 Author: Phil Race URL: https://git.openjdk.java.net/jdk/commit/d41331e6f2255aa07dbbbbccf62e39c50269e269 Stats: 51 lines in 1 file changed: 18 ins; 25 del; 8 mod 8223543: [TESTBUG] Regression test java/awt/Graphics2D/DrawString/LCDTextSrcEa.java has issues Reviewed-by: serb, azvegint, aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/8227 From prr at openjdk.java.net Fri Apr 15 01:22:39 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 15 Apr 2022 01:22:39 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v5] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 12:17:37 GMT, Tejesh R wrote: >> getText function returned extra endOfLine when appended. The reason was in `EditorEditorKit` class, `write(Writer out, Document doc, int pos, int len)` method, where translation happens from buffer to Out(Writer Object) if endOfLine is other than '\n' ( which is '\r\n' in windows). In order to write each line till End of line, the string till '\n' is written including '\r' and again endOfLine is written which results in extra Carriage Return. To solve this issue, a Condition is added which checks if previous character to '\n' is '\r', if true then whole string except Carriage Return ('\r') is written, else whole string till before '\n' is written. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on Review Comments Not 100% certain on this but "not an issue" sounds safest to me. Doing nothing is the only way to be sure you didn't introduce a regression. I'd expect folks who were doing this from code learned .. but what happens if a user pastes a few lines of text from windows Notepad - and it contains \r\n ? You can't stop users doing that and they will be surprised. If that is happening I'd give serious consideration to doing the translation of \r\n -> \n not just on reading the initial text but in all mutations of the text. at the very least if we already set DefaultEditorKit.EndOfLineStringProperty we'd want to .. But would such mutations alone also trigger setting DefaultEditorKit.EndOfLineStringProperty ? ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From psadhukhan at openjdk.java.net Fri Apr 15 05:32:59 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 15 Apr 2022 05:32:59 GMT Subject: RFR: 8042380: Test javax/swing/JFileChooser/4524490/bug4524490.java fails with InvocationTargetException Message-ID: This test used to fail in nightly testing few years back and it seems it fails because we used to run in samevm mode at that time. Several iterations of this test pass in CI testing in all platforms (link in JBS) so removing from Problemlist. ------------- Commit messages: - 8042380: Test javax/swing/JFileChooser/4524490/bug4524490.java fails with InvocationTargetException Changes: https://git.openjdk.java.net/jdk/pull/8257/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8257&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8042380 Stats: 2 lines in 2 files changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8257.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8257/head:pull/8257 PR: https://git.openjdk.java.net/jdk/pull/8257 From serb at openjdk.java.net Fri Apr 15 06:06:42 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 15 Apr 2022 06:06:42 GMT Subject: RFR: 8042380: Test javax/swing/JFileChooser/4524490/bug4524490.java fails with InvocationTargetException In-Reply-To: References: Message-ID: On Fri, 15 Apr 2022 05:26:11 GMT, Prasanta Sadhukhan wrote: > This test used to fail in nightly testing few years back and it seems it fails because we used to run in samevm mode at that time. > Several iterations of this test pass in CI testing in all platforms (link in JBS) so removing from Problemlist. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8257 From serb at openjdk.java.net Fri Apr 15 06:08:40 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 15 Apr 2022 06:08:40 GMT Subject: RFR: 8284884: Replace polling with waiting in javax/swing/text/html/parser/Parser/8078268/bug8078268.java [v2] In-Reply-To: References: Message-ID: <2Dcis2vt-oSLgC3xHJ0XI0B1eCKo3e4Poq6W-U5k3nQ=.7567a100-de1c-40de-9d76-0e22977a7117@github.com> On Thu, 14 Apr 2022 20:36:19 GMT, Alexey Ivanov wrote: >> A quick fix for the `javax/swing/text/html/parser/Parser/8078268/bug8078268.java` which replaces `Thread.sleep` in a loop with `CountDownLatch.await`. >> >> The code is shorter and clearer. >> >> The test fails on the builds without the fix for [JDK-8078268](https://bugs.openjdk.java.net/browse/JDK-8078268). I ran it in the CI and it passes. > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > Simplify filename handling Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8252 From serb at openjdk.java.net Fri Apr 15 06:09:40 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 15 Apr 2022 06:09:40 GMT Subject: RFR: 8159599: [TEST_BUG] java/awt/Modal/ModalInternalFrameTest/ModalInternalFrameTest.java In-Reply-To: References: Message-ID: On Thu, 14 Apr 2022 14:22:18 GMT, Alexander Zvegintsev wrote: > The SimpleWindowActivationTest test does not fail even without modifications(multiple CI test runs are green). > So just remove it from ProblemList would be enough. > > However I did some clean up and added some delays for "extra safety". Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8244 From psadhukhan at openjdk.java.net Fri Apr 15 06:17:43 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 15 Apr 2022 06:17:43 GMT Subject: RFR: 8284884: Replace polling with waiting in javax/swing/text/html/parser/Parser/8078268/bug8078268.java [v2] In-Reply-To: References: Message-ID: On Thu, 14 Apr 2022 20:36:19 GMT, Alexey Ivanov wrote: >> A quick fix for the `javax/swing/text/html/parser/Parser/8078268/bug8078268.java` which replaces `Thread.sleep` in a loop with `CountDownLatch.await`. >> >> The code is shorter and clearer. >> >> The test fails on the builds without the fix for [JDK-8078268](https://bugs.openjdk.java.net/browse/JDK-8078268). I ran it in the CI and it passes. > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > Simplify filename handling Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8252 From psadhukhan at openjdk.java.net Fri Apr 15 08:35:43 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 15 Apr 2022 08:35:43 GMT Subject: Integrated: 8042380: Test javax/swing/JFileChooser/4524490/bug4524490.java fails with InvocationTargetException In-Reply-To: References: Message-ID: On Fri, 15 Apr 2022 05:26:11 GMT, Prasanta Sadhukhan wrote: > This test used to fail in nightly testing few years back and it seems it fails because we used to run in samevm mode at that time. > Several iterations of this test pass in CI testing in all platforms (link in JBS) so removing from Problemlist. This pull request has now been integrated. Changeset: 510003cf Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/510003cfe33c34e62735c9fd49178d86b69b89ed Stats: 2 lines in 2 files changed: 0 ins; 1 del; 1 mod 8042380: Test javax/swing/JFileChooser/4524490/bug4524490.java fails with InvocationTargetException Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8257 From psadhukhan at openjdk.java.net Fri Apr 15 10:06:21 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 15 Apr 2022 10:06:21 GMT Subject: RFR: 8266246: Swing test PressedIconTest.java sometimes fails on macOS 11 ARM Message-ID: javax/swing/JButton/8151303/PressedIconTest.java was failing few times in macos M1 system owing t color profile issue. java.lang.RuntimeException: Colors are different! at PressedIconTest.main(PressedIconTest.java:88) Test is now passing in all mac M1 systems in CI (link in jBS) so can be removed from problemlist. ------------- Commit messages: - 8266246: Swing test PressedIconTest.java sometimes fails on macOS 11 ARM Changes: https://git.openjdk.java.net/jdk/pull/8261/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8261&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8266246 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8261.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8261/head:pull/8261 PR: https://git.openjdk.java.net/jdk/pull/8261 From duke at openjdk.java.net Fri Apr 15 13:47:40 2022 From: duke at openjdk.java.net (ExE Boss) Date: Fri, 15 Apr 2022 13:47:40 GMT Subject: RFR: 8280035: Use Class.isInstance instead of Class.isAssignableFrom where applicable In-Reply-To: References: Message-ID: On Mon, 21 Feb 2022 12:16:53 GMT, Andrey Turbanov wrote: >> I've stared at the javadoc for Class.isAssignableFrom and Class.isInstance and if a non-null instance is used to get a non-null class they are PROBABLY the same but it is far from clear. The implementations of both are at least native and may be instrinsicified. The doc for Class.isAssignableFrom cites JLS 5.1.4 which in what I found is about primitives so I suspect it is woefully out of date >> https://docs.oracle.com/javase/specs/jls/se17/html/jls-5.html#jls-5.1.4 >> >> What client tests have you run that touch the code you are changing ? >> >> In short I see insufficient value in the changes here and would prefer you drop the client part so I don't have to worry about it. > >>In short I see insufficient value in the changes here and would prefer you drop the client part so I don't have to worry about it. > > I think, usage of `isInstance` is much clear for most java developers. Everyone knows about java _instanceof_ operator. And `isInstance` method javadoc is very straight forward: `This method is the dynamic equivalent of the Java language instanceof operator.` > > Method `isAssignableFrom` is opposite: it brings unnecessary complexity in the code. And it's easy to confuse orders of parameters. Even JBS confirms that: > 1. [Wrong isAssignableFrom test when adding Principal to Subject ](https://bugs.openjdk.java.net/browse/JDK-8034820) > 2. [isAssignableFrom checks in KeyFactorySpi.engineGetKeySpec appear to be backwards](https://bugs.openjdk.java.net/browse/JDK-8254717) > 3. [isAssignableFrom checks in AlgorithmParametersSpi.engineGetParameterSpec appear to be backwards](https://bugs.openjdk.java.net/browse/JDK-8279800) > > So, it gives all 3 points to prefer isInstance method: it's shorter, it's clearer for most java developers, it's faster. > @turbanoff > > Method `isAssignableFrom` is opposite: it brings unnecessary complexity in the code. And it's easy to confuse orders of parameters. Even JBS confirms that: > > Maybe we should add `Class::isSubclassOf(Class that)` that performs `that.isAssignableFrom(this)`: I?have?opened [JI?9073064](https://bugs.openjdk.java.net/browse/JI-9073064 "[JI?9073064] Add?the?method `Class::isSublassOf(Class)` to?`java.lang.Class` that?does the?inverse of?`Class::isAssignableFrom`") for?this. ------------- PR: https://git.openjdk.java.net/jdk/pull/7061 From aivanov at openjdk.java.net Fri Apr 15 13:57:44 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 15 Apr 2022 13:57:44 GMT Subject: Integrated: 8284884: Replace polling with waiting in javax/swing/text/html/parser/Parser/8078268/bug8078268.java In-Reply-To: References: Message-ID: <8SkRENPAWCfWSWhE7PVDdnAzvJIJ8ew67U40yF8W0ws=.08d3d037-65a8-424d-b9e9-93c2af9b1d4f@github.com> On Thu, 14 Apr 2022 20:25:56 GMT, Alexey Ivanov wrote: > A quick fix for the `javax/swing/text/html/parser/Parser/8078268/bug8078268.java` which replaces `Thread.sleep` in a loop with `CountDownLatch.await`. > > The code is shorter and clearer. > > The test fails on the builds without the fix for [JDK-8078268](https://bugs.openjdk.java.net/browse/JDK-8078268). I ran it in the CI and it passes. This pull request has now been integrated. Changeset: 53580b33 Author: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/53580b336ac83addfaf20763e37781cebec7c531 Stats: 27 lines in 1 file changed: 10 ins; 8 del; 9 mod 8284884: Replace polling with waiting in javax/swing/text/html/parser/Parser/8078268/bug8078268.java Reviewed-by: serb, psadhukhan ------------- PR: https://git.openjdk.java.net/jdk/pull/8252 From aivanov at openjdk.java.net Fri Apr 15 14:35:56 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 15 Apr 2022 14:35:56 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v5] In-Reply-To: References: Message-ID: On Fri, 15 Apr 2022 01:18:58 GMT, Phil Race wrote: > but what happens if a user pastes > a few lines of text from windows Notepad - and it contains \r\n ? This is handled: The text is converted by `PasteAction` somehow, the model contains only `\n` as the result. If it weren't handled, there would be bug reports about this. `JTextField` filters out all line breaks on clipboard, they're replaced with spaces on paste. ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From aivanov at openjdk.java.net Fri Apr 15 16:39:44 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Fri, 15 Apr 2022 16:39:44 GMT Subject: RFR: 8159599: [TEST_BUG] java/awt/Modal/ModalInternalFrameTest/ModalInternalFrameTest.java In-Reply-To: References: Message-ID: On Thu, 14 Apr 2022 14:22:18 GMT, Alexander Zvegintsev wrote: > The SimpleWindowActivationTest test does not fail even without modifications(multiple CI test runs are green). > So just remove it from ProblemList would be enough. > > However I did some clean up and added some delays for "extra safety". Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8244 From prr at openjdk.java.net Fri Apr 15 16:40:41 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 15 Apr 2022 16:40:41 GMT Subject: RFR: 8180276: JTextPane getText return extra when mixed with methods of Document [v5] In-Reply-To: References: Message-ID: <5MgfAceJbrEAjFsR_th5s_QvstoCkqaoEdr4pOMVYAI=.c485b5cd-7ebc-4e11-8223-c5b0eb2be42a@github.com> On Fri, 8 Apr 2022 12:17:37 GMT, Tejesh R wrote: >> getText function returned extra endOfLine when appended. The reason was in `EditorEditorKit` class, `write(Writer out, Document doc, int pos, int len)` method, where translation happens from buffer to Out(Writer Object) if endOfLine is other than '\n' ( which is '\r\n' in windows). In order to write each line till End of line, the string till '\n' is written including '\r' and again endOfLine is written which results in extra Carriage Return. To solve this issue, a Condition is added which checks if previous character to '\n' is '\r', if true then whole string except Carriage Return ('\r') is written, else whole string till before '\n' is written. > > Tejesh R has updated the pull request incrementally with one additional commit since the last revision: > > Updated based on Review Comments Well then, let's close this out as not an issue and use the new JBS issue you created to update the docs. ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From achung at openjdk.java.net Fri Apr 15 18:01:11 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Fri, 15 Apr 2022 18:01:11 GMT Subject: RFR: 8198622: java/awt/Focus/TypeAhead/TestFocusFreeze.java fails on mac Message-ID: <8guUkZCRSqeoI9P6-bxBTJjWgQuw_nQbLcfuUeUv3MA=.0fffd884-dff4-4bdc-a522-be7cf921a72c@github.com> test passes, so removing from problem list ------------- Commit messages: - remove test from ProblemList Changes: https://git.openjdk.java.net/jdk/pull/8254/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8254&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8198622 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8254.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8254/head:pull/8254 PR: https://git.openjdk.java.net/jdk/pull/8254 From prr at openjdk.java.net Fri Apr 15 18:07:43 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 15 Apr 2022 18:07:43 GMT Subject: Integrated: 8283704: Add sealed modifier to java.awt.MultipleGradientPaint In-Reply-To: References: Message-ID: On Fri, 1 Apr 2022 19:18:39 GMT, Phil Race wrote: > Along the same lines as other recent additions of the sealed modifier but this one is quite simple. > Only MultiGradientPaint is touched. The two extant sub-classes it permits are already final > > CSR for review : https://bugs.openjdk.java.net/browse/JDK-8284188 > > jtreg and JCK API tests pass This pull request has now been integrated. Changeset: 9f97f5de Author: Phil Race URL: https://git.openjdk.java.net/jdk/commit/9f97f5de684588be6caf0f0ababe5fe773b13d77 Stats: 3 lines in 1 file changed: 2 ins; 0 del; 1 mod 8283704: Add sealed modifier to java.awt.MultipleGradientPaint Reviewed-by: darcy, serb, aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/8079 From prr at openjdk.java.net Fri Apr 15 18:20:38 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 15 Apr 2022 18:20:38 GMT Subject: RFR: 8266246: Swing test PressedIconTest.java sometimes fails on macOS 11 ARM In-Reply-To: References: Message-ID: On Fri, 15 Apr 2022 09:57:53 GMT, Prasanta Sadhukhan wrote: > javax/swing/JButton/8151303/PressedIconTest.java was failing few times in macos M1 system owing t color profile issue. > > java.lang.RuntimeException: Colors are different! > at PressedIconTest.main(PressedIconTest.java:88) > > > Test is now passing in all mac M1 systems in CI (link in jBS) so can be removed from problemlist. Are you sure that was the issue ? I submitted this as an intermittent issue about a year ago and I'm sure that the color profile wasn't being toggled on every run. I think you'd have to run the test 100 times so be reasonably sure. ------------- PR: https://git.openjdk.java.net/jdk/pull/8261 From prr at openjdk.java.net Fri Apr 15 18:26:40 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 15 Apr 2022 18:26:40 GMT Subject: RFR: 8198622: java/awt/Focus/TypeAhead/TestFocusFreeze.java fails on mac In-Reply-To: <8guUkZCRSqeoI9P6-bxBTJjWgQuw_nQbLcfuUeUv3MA=.0fffd884-dff4-4bdc-a522-be7cf921a72c@github.com> References: <8guUkZCRSqeoI9P6-bxBTJjWgQuw_nQbLcfuUeUv3MA=.0fffd884-dff4-4bdc-a522-be7cf921a72c@github.com> Message-ID: On Thu, 14 Apr 2022 21:12:07 GMT, Alisen Chung wrote: > test passes, so removing from problem list Hmm .. so no idea why it passes now ? 4 years since this bug was filed but the info then was minimal. Can you see if it reproduces with JDK 11 ? If "it fails", then try later JDKs one by one until you find what fixed it. ------------- PR: https://git.openjdk.java.net/jdk/pull/8254 From prr at openjdk.java.net Fri Apr 15 18:30:40 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 15 Apr 2022 18:30:40 GMT Subject: RFR: 8284699: Include all image types to the J2DBench.ColorConvertOpTests In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 21:06:08 GMT, Sergey Bylokhov wrote: > The J2DBench.ColorConvertOp tests are used to track the performance of the littlecms library in the JDK. The new version of the littlecms will add support for the premultiplied alpha. But right now the J2DBench does not test the pre-alpha formats, so I have added all standard types we have. > > FYI: I have tested all combinations of these flags w/o issues. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8188 From prr at openjdk.java.net Fri Apr 15 18:46:40 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 15 Apr 2022 18:46:40 GMT Subject: RFR: 8284680: sun.font.FontConfigManager.getFontConfig() leaks charset In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 18:05:09 GMT, Zhengyu Gu wrote: > Please review this small patch that releases temporary charsets to avoid memory leak. > > Test: > > - [x] jdk_2d src/java.desktop/unix/native/common/awt/fontpath.c line 1112: > 1110: if (currentUnionSet != charset) { > 1111: (*FcCharSetDestroy)(currentUnionSet); > 1112: } Hmm. I worry that you may be replacing a leak with a crash. The original "charset" was returned from FcPatternGetCharSet() and I don't think it was a copy and will be freed when the pattern is destroyed. So that should not be freed here. ------------- PR: https://git.openjdk.java.net/jdk/pull/8187 From azvegint at openjdk.java.net Sat Apr 16 09:55:37 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Sat, 16 Apr 2022 09:55:37 GMT Subject: Integrated: 8159599: [TEST_BUG] java/awt/Modal/ModalInternalFrameTest/ModalInternalFrameTest.java In-Reply-To: References: Message-ID: On Thu, 14 Apr 2022 14:22:18 GMT, Alexander Zvegintsev wrote: > The SimpleWindowActivationTest test does not fail even without modifications(multiple CI test runs are green). > So just remove it from ProblemList would be enough. > > However I did some clean up and added some delays for "extra safety". This pull request has now been integrated. Changeset: f5beafa5 Author: Alexander Zvegintsev URL: https://git.openjdk.java.net/jdk/commit/f5beafa53f93a6ec03278dfd7063d7b3b0b9d241 Stats: 23 lines in 2 files changed: 13 ins; 3 del; 7 mod 8159599: [TEST_BUG] java/awt/Modal/ModalInternalFrameTest/ModalInternalFrameTest.java Reviewed-by: serb, aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/8244 From azvegint at openjdk.java.net Sat Apr 16 10:05:32 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Sat, 16 Apr 2022 10:05:32 GMT Subject: Integrated: 8144030: [macosx] test java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java fails (again) In-Reply-To: References: Message-ID: On Wed, 13 Apr 2022 21:28:35 GMT, Alexander Zvegintsev wrote: > This test has two undecorated frames: > > 1. background, 300x300 > 2. shaped foreground, 200x200 > > After displaying this frames it tries to check color outside of shape but within frame 2 bounds. > > Unfortunately, on Linux and macOS there is a shadow around the shaped frame: > ![image](https://user-images.githubusercontent.com/77687766/163270586-8dd97e93-582f-481f-999d-f08d4aaafba1.png) > (changed color to green to make it more noticeable). > > One way to fix the test would be to add tolerance to color check. > But with old check points blue color may vary in 222-255 range, which is a bit too much. > > Instead of this I made this shaped window the size of background window. > This allows us to move check points away from shape border and its shadow, but still be able to check whether shape is applied or not. > > Testing is green on all platforms. This pull request has now been integrated. Changeset: e5041ae3 Author: Alexander Zvegintsev URL: https://git.openjdk.java.net/jdk/commit/e5041ae3d45b43be10d5da747d773882ebf0482b Stats: 116 lines in 2 files changed: 44 ins; 28 del; 44 mod 8144030: [macosx] test java/awt/Frame/ShapeNotSetSometimes/ShapeNotSetSometimes.java fails (again) Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8233 From aivanov at openjdk.java.net Sat Apr 16 17:52:12 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Sat, 16 Apr 2022 17:52:12 GMT Subject: RFR: 8284189: Replace usages of 'a the' in java.desktop Message-ID: Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? I fixed a couple of other spelling mistakes. ------------- Commit messages: - 8284189: Miscellaneous spelling fixes - 8284189: Drop unneeded comma - 8284189: Replace usages of 'the a' etc in java.desktop - 8284189: Replace usages of 'the a' etc in java.desktop - 8284189: Replace usages of 'the the' in java.desktop - 8284189: Replace usages of 'the the' in java.desktop - 8284189: Replace usages of 'the the' in java.desktop - 8284189: Replace usages of 'an? an?' in java.desktop - 8284189: Replace usages of 'an? an?' in java.desktop - 8284189: Replace usages of 'an a' in java.desktop - ... and 2 more: https://git.openjdk.java.net/jdk/compare/e5041ae3...cc5b0b5b Changes: https://git.openjdk.java.net/jdk/pull/8274/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8274&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284189 Stats: 395 lines in 39 files changed: 196 ins; 48 del; 151 mod Patch: https://git.openjdk.java.net/jdk/pull/8274.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8274/head:pull/8274 PR: https://git.openjdk.java.net/jdk/pull/8274 From philip.race at oracle.com Sat Apr 16 22:06:40 2022 From: philip.race at oracle.com (Philip Race) Date: Sat, 16 Apr 2022 15:06:40 -0700 Subject: Client-Libs Wiki page on writing regression tests Message-ID: I have added a sub-page to the client-libs OpenJDK wiki on writing jtreg tests. https://wiki.openjdk.java.net/display/ClientLibs/Creating+Client+jtreg+tests A good part of it is about stable automated tests. I'm sure there are things I forgot to say. Please look at it and if there any specific suggestions for corrections or additional content please send them to me. Small and specific is better. Or even better remember ANY member of the client-lib group [1] can edit this themselves .. -phil. [1] https://openjdk.java.net/census#client-libs From prr at openjdk.java.net Sat Apr 16 22:54:40 2022 From: prr at openjdk.java.net (Phil Race) Date: Sat, 16 Apr 2022 22:54:40 GMT Subject: RFR: 8284898 : Enhance PassFailJFrame [v7] In-Reply-To: <3EmU2J5RtgVxJUd0q8x16cb0DI1nj6jPbaswnaiudMg=.509ddf8b-401b-450a-93a6-da64b94bfb2b@github.com> References: <3EmU2J5RtgVxJUd0q8x16cb0DI1nj6jPbaswnaiudMg=.509ddf8b-401b-450a-93a6-da64b94bfb2b@github.com> Message-ID: On Thu, 14 Apr 2022 23:45:28 GMT, lawrence.andrews wrote: >> Fixed the following issue. >> 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" >> 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. >> So added Pass and Fail button to mark the test result. >> 3) Added timeout if in case user does not interact with the test UI. >> >> @shurymury >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Update PrintGlyphVectorTest.java test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 311: > 309: /** > 310: * Forcibly pass the test. > 311: */ you mean fail. ------------- PR: https://git.openjdk.java.net/jdk/pull/8004 From duke at openjdk.java.net Sat Apr 16 23:02:13 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Sat, 16 Apr 2022 23:02:13 GMT Subject: RFR: 8284898 : Enhance PassFailJFrame [v8] In-Reply-To: References: Message-ID: > Fixed the following issue. > 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" > 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. > So added Pass and Fail button to mark the test result. > 3) Added timeout if in case user does not interact with the test UI. > > @shurymury > @aivanov-jdk lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Update PassFailJFrame.java ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8004/files - new: https://git.openjdk.java.net/jdk/pull/8004/files/e891ed17..0d971ba3 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=07 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=06-07 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8004.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8004/head:pull/8004 PR: https://git.openjdk.java.net/jdk/pull/8004 From prr at openjdk.java.net Sat Apr 16 23:02:15 2022 From: prr at openjdk.java.net (Phil Race) Date: Sat, 16 Apr 2022 23:02:15 GMT Subject: RFR: 8284898 : Enhance PassFailJFrame [v7] In-Reply-To: <3EmU2J5RtgVxJUd0q8x16cb0DI1nj6jPbaswnaiudMg=.509ddf8b-401b-450a-93a6-da64b94bfb2b@github.com> References: <3EmU2J5RtgVxJUd0q8x16cb0DI1nj6jPbaswnaiudMg=.509ddf8b-401b-450a-93a6-da64b94bfb2b@github.com> Message-ID: On Thu, 14 Apr 2022 23:45:28 GMT, lawrence.andrews wrote: >> Fixed the following issue. >> 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" >> 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. >> So added Pass and Fail button to mark the test result. >> 3) Added timeout if in case user does not interact with the test UI. >> >> @shurymury >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Update PrintGlyphVectorTest.java Approving since I think the minor things I pointed out aren't problems for the test test/jdk/java/awt/print/PrinterJob/PrintGlyphVectorTest.java line 131: > 129: PrinterJob pj = PrinterJob.getPrinterJob(); > 130: if (pj == null || pj.getPrintService() == null) { > 131: System.out.println("Printer not configured or available." I realise the test was already doing the pj == null check but per. the spec, this shouldn't happen https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/print/PrinterJob.html#getPrinterJob() ------------- Marked as reviewed by prr (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8004 From duke at openjdk.java.net Sat Apr 16 23:02:16 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Sat, 16 Apr 2022 23:02:16 GMT Subject: RFR: 8284898 : Enhance PassFailJFrame [v7] In-Reply-To: References: <3EmU2J5RtgVxJUd0q8x16cb0DI1nj6jPbaswnaiudMg=.509ddf8b-401b-450a-93a6-da64b94bfb2b@github.com> Message-ID: <69jbypffQDINWAazLh8r4Vtushcwi14v7uJk0eygeqg=.b3ccbbbb-288e-4087-a906-6b9b2df3ea62@github.com> On Sat, 16 Apr 2022 22:51:43 GMT, Phil Race wrote: >> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: >> >> Update PrintGlyphVectorTest.java > > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 311: > >> 309: /** >> 310: * Forcibly pass the test. >> 311: */ > > you mean fail. Yes, I was meant to fail. Let me correct it. Thanks! for catching. I had fixed this but mostly forget to commit. ------------- PR: https://git.openjdk.java.net/jdk/pull/8004 From aivanov at openjdk.java.net Sun Apr 17 22:09:42 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Sun, 17 Apr 2022 22:09:42 GMT Subject: RFR: 8284898 : Enhance PassFailJFrame [v8] In-Reply-To: References: Message-ID: On Sat, 16 Apr 2022 23:02:13 GMT, lawrence.andrews wrote: >> Fixed the following issue. >> 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" >> 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. >> So added Pass and Fail button to mark the test result. >> 3) Added timeout if in case user does not interact with the test UI. >> >> @shurymury >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Update PassFailJFrame.java Changes requested by aivanov (Reviewer). test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 54: > 52: private static final int COLUMNS = 40; > 53: private static final long TEST_TIMEOUT = 5; > 54: private static final String TITLE = "Test Instruction Frame"; Please put the constants above the latch and separate them with a blank line. I'd put the constants in the order of parameters: title, timeout, rows, columns. test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 89: > 87: * > 88: * @param title title of the Frame. > 89: * @param instructions instruction for the tester on how to test and what _the instructions_ for the tester? test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 104: > 102: InvocationTargetException { > 103: if (isEventDispatchThread()) { > 104: createUI(title, instructions, testTimeOutInMinutes, rows, columns); Does it make sense to use shorter version like `testTimeout` or `timeout` instead of longer `testTimeoutInMinutes`? test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 193: > 191: * @throws InterruptedException exception thrown when thread is > 192: * interrupted > 193: * @throws InvocationTargetException exception thrown while creating UI _?Exception exception_ doesn't look good. In the rendered javadoc it reads like: throws `InterruptedException` ... (followed by text). The text usually starts with the word *if* followed by the condition when the exception is thrown. The first item was documented in a usual way. The second one should look something like: _if an exception is thrown while disposing of frames on EDT._ test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 313: > 311: */ > 312: public static void forceFail() { > 313: latch.countDown(); You must set `failed` to `true`. ------------- PR: https://git.openjdk.java.net/jdk/pull/8004 From aivanov at openjdk.java.net Sun Apr 17 22:09:43 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Sun, 17 Apr 2022 22:09:43 GMT Subject: RFR: 8284898 : Enhance PassFailJFrame [v7] In-Reply-To: References: <3EmU2J5RtgVxJUd0q8x16cb0DI1nj6jPbaswnaiudMg=.509ddf8b-401b-450a-93a6-da64b94bfb2b@github.com> Message-ID: <_Az-bEhHlGsNoccQhAlllq0OxNBZR9D4LLV4sDDipGU=.ba603986-b8f8-45da-82f6-99b3838fa8ef@github.com> On Sat, 16 Apr 2022 22:54:43 GMT, Phil Race wrote: >> lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: >> >> Update PrintGlyphVectorTest.java > > test/jdk/java/awt/print/PrinterJob/PrintGlyphVectorTest.java line 131: > >> 129: PrinterJob pj = PrinterJob.getPrinterJob(); >> 130: if (pj == null || pj.getPrintService() == null) { >> 131: System.out.println("Printer not configured or available." > > I realise the test was already doing the pj == null check but per. the spec, this shouldn't happen > https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/print/PrinterJob.html#getPrinterJob() Right, and IDE generates a warning: _`pj == null` is always false_. I suggest removing this condition and thus resolving the warning. ------------- PR: https://git.openjdk.java.net/jdk/pull/8004 From aivanov at openjdk.java.net Sun Apr 17 22:09:43 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Sun, 17 Apr 2022 22:09:43 GMT Subject: RFR: 8284898 : Enhance PassFailJFrame [v7] In-Reply-To: <_Az-bEhHlGsNoccQhAlllq0OxNBZR9D4LLV4sDDipGU=.ba603986-b8f8-45da-82f6-99b3838fa8ef@github.com> References: <3EmU2J5RtgVxJUd0q8x16cb0DI1nj6jPbaswnaiudMg=.509ddf8b-401b-450a-93a6-da64b94bfb2b@github.com> <_Az-bEhHlGsNoccQhAlllq0OxNBZR9D4LLV4sDDipGU=.ba603986-b8f8-45da-82f6-99b3838fa8ef@github.com> Message-ID: On Sun, 17 Apr 2022 22:01:38 GMT, Alexey Ivanov wrote: >> test/jdk/java/awt/print/PrinterJob/PrintGlyphVectorTest.java line 131: >> >>> 129: PrinterJob pj = PrinterJob.getPrinterJob(); >>> 130: if (pj == null || pj.getPrintService() == null) { >>> 131: System.out.println("Printer not configured or available." >> >> I realise the test was already doing the pj == null check but per. the spec, this shouldn't happen >> https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/java/awt/print/PrinterJob.html#getPrinterJob() > > Right, and IDE generates a warning: _`pj == null` is always false_. I suggest removing this condition and thus resolving the warning. Just a bit of optimisation: you can postpone creating the test frame. The frame is not needed if the test passes because there's no print service. ------------- PR: https://git.openjdk.java.net/jdk/pull/8004 From aivanov at openjdk.java.net Sun Apr 17 22:13:46 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Sun, 17 Apr 2022 22:13:46 GMT Subject: RFR: 8284898 : Enhance PassFailJFrame [v8] In-Reply-To: References: Message-ID: On Sat, 16 Apr 2022 23:02:13 GMT, lawrence.andrews wrote: >> Fixed the following issue. >> 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" >> 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. >> So added Pass and Fail button to mark the test result. >> 3) Added timeout if in case user does not interact with the test UI. >> >> @shurymury >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Update PassFailJFrame.java I think the main issue fixed should remain: _8283803: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test_ as it was originally. The one that's main now: _8284898: Enhance PassFailJFrame_ should really be secondary. ------------- PR: https://git.openjdk.java.net/jdk/pull/8004 From aivanov at openjdk.java.net Sun Apr 17 22:27:33 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Sun, 17 Apr 2022 22:27:33 GMT Subject: RFR: 8284898 : Enhance PassFailJFrame [v8] In-Reply-To: References: Message-ID: On Sat, 16 Apr 2022 23:02:13 GMT, lawrence.andrews wrote: >> Fixed the following issue. >> 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" >> 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. >> So added Pass and Fail button to mark the test result. >> 3) Added timeout if in case user does not interact with the test UI. >> >> @shurymury >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Update PassFailJFrame.java Both modified files contain a couple of unused imports. ------------- PR: https://git.openjdk.java.net/jdk/pull/8004 From serb at openjdk.java.net Mon Apr 18 03:38:39 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 18 Apr 2022 03:38:39 GMT Subject: Integrated: 8284699: Include all image types to the J2DBench.ColorConvertOpTests In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 21:06:08 GMT, Sergey Bylokhov wrote: > The J2DBench.ColorConvertOp tests are used to track the performance of the littlecms library in the JDK. The new version of the littlecms will add support for the premultiplied alpha. But right now the J2DBench does not test the pre-alpha formats, so I have added all standard types we have. > > FYI: I have tested all combinations of these flags w/o issues. This pull request has now been integrated. Changeset: 21ea740e Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/21ea740e1da48054ee46efda493d0812a35d786e Stats: 15 lines in 1 file changed: 11 ins; 1 del; 3 mod 8284699: Include all image types to the J2DBench.ColorConvertOpTests Reviewed-by: prr ------------- PR: https://git.openjdk.java.net/jdk/pull/8188 From psadhukhan at openjdk.java.net Mon Apr 18 04:16:36 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 18 Apr 2022 04:16:36 GMT Subject: RFR: 8266246: Swing test PressedIconTest.java sometimes fails on macOS 11 ARM In-Reply-To: References: Message-ID: On Fri, 15 Apr 2022 09:57:53 GMT, Prasanta Sadhukhan wrote: > javax/swing/JButton/8151303/PressedIconTest.java was failing few times in macos M1 system owing t color profile issue. > > java.lang.RuntimeException: Colors are different! > at PressedIconTest.main(PressedIconTest.java:88) > > > Test is now passing in all mac M1 systems in CI (link in jBS) so can be removed from problemlist. I have run the test 100 times and all are green. Test job link in JBS. ------------- PR: https://git.openjdk.java.net/jdk/pull/8261 From psadhukhan at openjdk.java.net Mon Apr 18 04:17:39 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 18 Apr 2022 04:17:39 GMT Subject: RFR: 7132796: [macosx] closed/javax/swing/JComboBox/4517214/bug4517214.java fails on MacOS In-Reply-To: References: Message-ID: On Thu, 14 Apr 2022 06:50:10 GMT, Prasanta Sadhukhan wrote: > JDK-4517214 was fixed for Metal L&F where JComboBox having TitledBorder used to have double height compared to normal JComboBox. > The issue is still observed for macos for Aqua L&F where still double height is seen. > Fix is to prevent adding border insets height to combobox size as was done for [MetalComboxUI.getMinimumSize[](url)](https://github.com/openjdk/jdk/blame/master/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalComboBoxUI.java#L384) > The closed test is automated and moved to open. CI testing on all platform is ok. Any more comments on this @mrserb ? ------------- PR: https://git.openjdk.java.net/jdk/pull/8237 From jdv at openjdk.java.net Mon Apr 18 05:17:34 2022 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 18 Apr 2022 05:17:34 GMT Subject: RFR: 8284189: Replace usages of 'a the' in java.desktop In-Reply-To: References: Message-ID: On Sat, 16 Apr 2022 17:45:16 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? > > I fixed a couple of other spelling mistakes. src/java.desktop/share/classes/java/awt/Graphics.java line 29: > 27: import java.io.*; > 28: import java.lang.*; > 29: import java.util.*; Are these unused imports? ------------- PR: https://git.openjdk.java.net/jdk/pull/8274 From jdv at openjdk.java.net Mon Apr 18 05:23:39 2022 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 18 Apr 2022 05:23:39 GMT Subject: RFR: 8284189: Replace usages of 'a the' in java.desktop In-Reply-To: References: Message-ID: On Sat, 16 Apr 2022 17:45:16 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? > > I fixed a couple of other spelling mistakes. This PR has a lot of other changes than just correcting spelling mistakes and a/an combinations. ------------- PR: https://git.openjdk.java.net/jdk/pull/8274 From duke at openjdk.java.net Mon Apr 18 05:24:43 2022 From: duke at openjdk.java.net (Tejesh R) Date: Mon, 18 Apr 2022 05:24:43 GMT Subject: Withdrawn: 8180276: JTextPane getText return extra when mixed with methods of Document In-Reply-To: References: Message-ID: On Wed, 6 Apr 2022 10:02:10 GMT, Tejesh R wrote: > getText function returned extra endOfLine when appended. The reason was in `EditorEditorKit` class, `write(Writer out, Document doc, int pos, int len)` method, where translation happens from buffer to Out(Writer Object) if endOfLine is other than '\n' ( which is '\r\n' in windows). In order to write each line till End of line, the string till '\n' is written including '\r' and again endOfLine is written which results in extra Carriage Return. To solve this issue, a Condition is added which checks if previous character to '\n' is '\r', if true then whole string except Carriage Return ('\r') is written, else whole string till before '\n' is written. This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/8122 From psadhukhan at openjdk.java.net Mon Apr 18 07:19:02 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 18 Apr 2022 07:19:02 GMT Subject: RFR: 8208565: [TEST_BUG] javax\swing\PopupFactory\6276087\NonOpaquePopupMenuTest.java throws NPE Message-ID: Test was failing in the past owing to NPE while accessing JMenu probably owing to fact the test did not wait for UI to be visible before starting the test, so added a delay after the frame is made visible. Also, added disposal of frame. Also, it seems JDK-8213535 fix might be having a positive impact on this test. Several iterations of this test in all platforms have passed (link in JBS). ------------- Commit messages: - 8208565: [TEST_BUG] javax\swing\PopupFactory\6276087\NonOpaquePopupMenuTest.java throws NPE - 8208565: [TEST_BUG] javax\swing\PopupFactory\6276087\NonOpaquePopupMenuTest.java throws NPE Changes: https://git.openjdk.java.net/jdk/pull/8282/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8282&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8208565 Stats: 84 lines in 2 files changed: 27 ins; 30 del; 27 mod Patch: https://git.openjdk.java.net/jdk/pull/8282.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8282/head:pull/8282 PR: https://git.openjdk.java.net/jdk/pull/8282 From jdv at openjdk.java.net Mon Apr 18 08:27:35 2022 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 18 Apr 2022 08:27:35 GMT Subject: RFR: 8266246: Swing test PressedIconTest.java sometimes fails on macOS 11 ARM In-Reply-To: References: Message-ID: On Mon, 18 Apr 2022 04:12:56 GMT, Prasanta Sadhukhan wrote: >> javax/swing/JButton/8151303/PressedIconTest.java was failing few times in macos M1 system owing t color profile issue. >> >> java.lang.RuntimeException: Colors are different! >> at PressedIconTest.main(PressedIconTest.java:88) >> >> >> Test is now passing in all mac M1 systems in CI (link in jBS) so can be removed from problemlist. > > I have run the test 100 times and all are green. Test job link in JBS. @prsadhuk Is latest CI test ran without JTREG_RETRY_COUNT? In intermittent cases it is better to run CI tests without retries. ------------- PR: https://git.openjdk.java.net/jdk/pull/8261 From psadhukhan at openjdk.java.net Mon Apr 18 09:52:40 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 18 Apr 2022 09:52:40 GMT Subject: RFR: 8266246: Swing test PressedIconTest.java sometimes fails on macOS 11 ARM In-Reply-To: References: Message-ID: On Fri, 15 Apr 2022 09:57:53 GMT, Prasanta Sadhukhan wrote: > javax/swing/JButton/8151303/PressedIconTest.java was failing few times in macos M1 system owing t color profile issue. > > java.lang.RuntimeException: Colors are different! > at PressedIconTest.main(PressedIconTest.java:88) > > > Test is now passing in all mac M1 systems in CI (link in jBS) so can be removed from problemlist. Yes, same test with 100 iterations passes without JTREG_RETRY_COUNT too.. ------------- PR: https://git.openjdk.java.net/jdk/pull/8261 From dbatrak at openjdk.java.net Mon Apr 18 10:00:39 2022 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Mon, 18 Apr 2022 10:00:39 GMT Subject: RFR: 8185261: Font fallback sometimes doesn't work in Swing text components [v2] In-Reply-To: <4SfhJKrUWWmdo2ZioTjqiU5b3a4cZBwWhMX89auZBRg=.5bf8b903-dbb2-4e7c-adaf-59c5e8212e72@github.com> References: <5qQoyooaZzlKSp4iMudwLZ16MotrGrPB7GhQ3aAVYjo=.8e97ba6f-4aab-40d7-944f-4f68dc2b7b1c@github.com> <4SfhJKrUWWmdo2ZioTjqiU5b3a4cZBwWhMX89auZBRg=.5bf8b903-dbb2-4e7c-adaf-59c5e8212e72@github.com> Message-ID: On Tue, 1 Feb 2022 21:40:53 GMT, Dmitry Batrak wrote: >> The proposed fix makes fonts with and without fallback components distinguishable (in terms of `equals` method), so that >> font metrics cache (and other similar code) can handle them separately. This is achieved by adding a new boolean field >> to `Font` class, specifically denoting fonts with fallback components. The latter ones don't need to pretend to be >> 'created' fonts anymore, to preserve their `Font2D` handle. >> It's not possible to use the existing `createdFont` field in `equals` implementation, as JCK requires a 'real' created >> font (the one obtained using `Font.createFont` method) to be equal to the same font after serialization and >> deserialization. > > Dmitry Batrak has updated the pull request incrementally with one additional commit since the last revision: > > remove 'headful' requirement from test case Still waiting for a response. If you're not comfortable with changing `Font.equals` behaviour, let's introduce some other public method, which can be used to distinguish fonts with and without fallback components. I believe, it should be in public API, as the issue isn't just about JEditorPane (etc) implementation. Even though it's not a documented feature, client code can easily construct a font with fallback components using existing public API - one should just use `new javax.swing.text.StyleContext().getFont(family, style, size)` instead of `new java.awt.Font(family, style, size)`. ------------- PR: https://git.openjdk.java.net/jdk/pull/7313 From aghaisas at openjdk.java.net Mon Apr 18 11:39:40 2022 From: aghaisas at openjdk.java.net (Ajit Ghaisas) Date: Mon, 18 Apr 2022 11:39:40 GMT Subject: RFR: 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill [v2] In-Reply-To: References: Message-ID: On Tue, 12 Apr 2022 04:15:56 GMT, Ajit Ghaisas wrote: >> Alexey Ushakov has updated the pull request incrementally with one additional commit since the last revision: >> >> 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill >> >> Extracted try/catch logic of SurfaceData cast to particular SurfaceData subclass into convenience method SurfaceData.convertTo(). Applied the method to XRTextRenderer.drawGlyphList() and XRMaskFill.MaskFill(). Refactored try/catch blocks handling similar cases. > > I am on vacation this week. I will review this PR on priority next week. > Looks fine, I suggest checking the fix via mach5. @aghaisas please take a look. The fix looks good. Also, the mach5 run is green with this change. @avu, is it possible to add an automated test? ------------- PR: https://git.openjdk.java.net/jdk/pull/8015 From jdv at openjdk.java.net Mon Apr 18 12:23:37 2022 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 18 Apr 2022 12:23:37 GMT Subject: RFR: 8266246: Swing test PressedIconTest.java sometimes fails on macOS 11 ARM In-Reply-To: References: Message-ID: <53azHsYF4UO7upBdRFxUDKdWpojLZ29722A9TNE9MR4=.eb7f98c9-a861-4fc6-a547-863123637aa3@github.com> On Fri, 15 Apr 2022 09:57:53 GMT, Prasanta Sadhukhan wrote: > javax/swing/JButton/8151303/PressedIconTest.java was failing few times in macos M1 system owing t color profile issue. > > java.lang.RuntimeException: Colors are different! > at PressedIconTest.main(PressedIconTest.java:88) > > > Test is now passing in all mac M1 systems in CI (link in jBS) so can be removed from problemlist. Marked as reviewed by jdv (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8261 From jdv at openjdk.java.net Mon Apr 18 12:45:33 2022 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 18 Apr 2022 12:45:33 GMT Subject: RFR: 8198622: java/awt/Focus/TypeAhead/TestFocusFreeze.java fails on mac In-Reply-To: <8guUkZCRSqeoI9P6-bxBTJjWgQuw_nQbLcfuUeUv3MA=.0fffd884-dff4-4bdc-a522-be7cf921a72c@github.com> References: <8guUkZCRSqeoI9P6-bxBTJjWgQuw_nQbLcfuUeUv3MA=.0fffd884-dff4-4bdc-a522-be7cf921a72c@github.com> Message-ID: On Thu, 14 Apr 2022 21:12:07 GMT, Alisen Chung wrote: > test passes, so removing from problem list We should add https://bugs.openjdk.java.net/browse/JDK-6447537 also in the PR and decouple test/java/awt/KeyboardFocusmanager/TypeAhead/EnqueueWithDialogTest failure into new bug. https://bugs.openjdk.java.net/browse/JDK-8198622 captures failure only specific to macOS. https://bugs.openjdk.java.net/browse/JDK-6447537 captures history of why this test started failing in Windows & Linux which might give idea about how it is not failing now. Also its better to run the test multiple times since we are de-problem listing on all platforms. ------------- PR: https://git.openjdk.java.net/jdk/pull/8254 From aivanov at openjdk.java.net Mon Apr 18 12:59:43 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 18 Apr 2022 12:59:43 GMT Subject: RFR: 8284189: Replace usages of 'a the' in java.desktop In-Reply-To: References: Message-ID: On Mon, 18 Apr 2022 05:14:27 GMT, Jayathirth D V wrote: >> Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? >> >> I fixed a couple of other spelling mistakes. >> >> I also expanded wildcard imports. > > src/java.desktop/share/classes/java/awt/Graphics.java line 29: > >> 27: import java.io.*; >> 28: import java.lang.*; >> 29: import java.util.*; > > Are these unused imports? Yes, they're unused. The class has a list of abstract methods. The build is successful. ------------- PR: https://git.openjdk.java.net/jdk/pull/8274 From aivanov at openjdk.java.net Mon Apr 18 13:07:40 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 18 Apr 2022 13:07:40 GMT Subject: RFR: 8284189: Replace usages of 'a the' in java.desktop In-Reply-To: References: Message-ID: On Mon, 18 Apr 2022 05:20:11 GMT, Jayathirth D V wrote: > This PR has a lot of other changes than just correcting spelling mistakes and a/an combinations. Expanding wildcard imports is not _a lot of other changes_. The build is successful, expanding imports doesn't hinder reviewing other changes. However, I should've mentioned this in the PR description. Now I've updated it. ------------- PR: https://git.openjdk.java.net/jdk/pull/8274 From jdv at openjdk.java.net Mon Apr 18 13:20:42 2022 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 18 Apr 2022 13:20:42 GMT Subject: RFR: 7132796: [macosx] closed/javax/swing/JComboBox/4517214/bug4517214.java fails on MacOS In-Reply-To: References: Message-ID: On Mon, 18 Apr 2022 04:14:29 GMT, Prasanta Sadhukhan wrote: >> JDK-4517214 was fixed for Metal L&F where JComboBox having TitledBorder used to have double height compared to normal JComboBox. >> The issue is still observed for macos for Aqua L&F where still double height is seen. >> Fix is to prevent adding border insets height to combobox size as was done for [MetalComboxUI.getMinimumSize[](url)](https://github.com/openjdk/jdk/blame/master/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalComboBoxUI.java#L384) >> The closed test is automated and moved to open. CI testing on all platform is ok. > > Any more comments on this @mrserb ? @prsadhuk I am not seeing an internal PR to remove this test case from closed repo. I thought we usually raise closed PR first about movement and then open PR. Have things changed recently. Also having "closed" in open PR title is confusing. ------------- PR: https://git.openjdk.java.net/jdk/pull/8237 From psadhukhan at openjdk.java.net Mon Apr 18 13:24:41 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 18 Apr 2022 13:24:41 GMT Subject: RFR: 7132796: [macosx] closed/javax/swing/JComboBox/4517214/bug4517214.java fails on MacOS In-Reply-To: References: Message-ID: On Thu, 14 Apr 2022 06:50:10 GMT, Prasanta Sadhukhan wrote: > JDK-4517214 was fixed for Metal L&F where JComboBox having TitledBorder used to have double height compared to normal JComboBox. > The issue is still observed for macos for Aqua L&F where still double height is seen. > Fix is to prevent adding border insets height to combobox size as was done for [MetalComboxUI.getMinimumSize[](url)](https://github.com/openjdk/jdk/blame/master/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalComboBoxUI.java#L384) > The closed test is automated and moved to open. CI testing on all platform is ok. The above holds true for test fix in closed. Since this is a product fix w.r.t closed test and NOT a test fix, I have raised an open PR first. If and when this goes through, closed PR will be raised to remove the test and also from problemlist. ------------- PR: https://git.openjdk.java.net/jdk/pull/8237 From jdv at openjdk.java.net Mon Apr 18 13:28:41 2022 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 18 Apr 2022 13:28:41 GMT Subject: RFR: 8284189: Replace usages of 'a the' in java.desktop In-Reply-To: References: Message-ID: On Sat, 16 Apr 2022 17:45:16 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? > > I fixed a couple of other spelling mistakes. > > I also expanded wildcard imports. test/jdk/javax/accessibility/manual/ComboBoxDemo.html line 63: > 61: > 62:
    > 63:
  1. Verify that space and down arrow bring up the drop-down list.
    Is this HTML refactoring needed as part of this PR? ------------- PR: https://git.openjdk.java.net/jdk/pull/8274 From jdv at openjdk.java.net Mon Apr 18 13:32:39 2022 From: jdv at openjdk.java.net (Jayathirth D V) Date: Mon, 18 Apr 2022 13:32:39 GMT Subject: RFR: 8284189: Replace usages of 'a the' in java.desktop In-Reply-To: References: Message-ID: On Mon, 18 Apr 2022 13:04:17 GMT, Alexey Ivanov wrote: > > This PR has a lot of other changes than just correcting spelling mistakes and a/an combinations. > > Expanding wildcard imports is not _a lot of other changes_. The build is successful, expanding imports doesn't hinder reviewing other changes. > > However, I should've mentioned this in the PR description. Now I've updated it. >From reviewer's perspective, when i read description of PR mentioning only documentation changes and then go ahead and see code updates it raises doubts. Thanks for updating the description. ------------- PR: https://git.openjdk.java.net/jdk/pull/8274 From aivanov at openjdk.java.net Mon Apr 18 14:58:37 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 18 Apr 2022 14:58:37 GMT Subject: RFR: 8284189: Replace usages of 'a the' in java.desktop In-Reply-To: References: Message-ID: On Mon, 18 Apr 2022 13:24:55 GMT, Jayathirth D V wrote: >> Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? >> >> I fixed a couple of other spelling mistakes. >> >> I also expanded wildcard imports. > > test/jdk/javax/accessibility/manual/ComboBoxDemo.html line 63: > >> 61: >> 62:
      >> 63:
    1. Verify that space and down arrow bring up the drop-down list.
      > > Is this HTML refactoring needed as part of this PR? The `` element is placed after `
    2. ` and before the next `
    3. `. In HTML `
        ` doesn't allow anything but `
      1. ` elements. I placed the image to where it was supposed to be. I decided it was easier and more efficient to fix it as part of this change rather than submit a new bug and create a new pull request afterwards. ------------- PR: https://git.openjdk.java.net/jdk/pull/8274 From aivanov at openjdk.java.net Mon Apr 18 15:13:34 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 18 Apr 2022 15:13:34 GMT Subject: RFR: 8284189: Replace usages of 'a the' in java.desktop [v2] In-Reply-To: References: Message-ID: > Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? > > I fixed a couple of other spelling mistakes. > > I also expanded wildcard imports. Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: 8284189: Revert additional changes for ComboBoxDemo.html ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8274/files - new: https://git.openjdk.java.net/jdk/pull/8274/files/cc5b0b5b..73733262 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8274&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8274&range=00-01 Stats: 9 lines in 1 file changed: 2 ins; 0 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/8274.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8274/head:pull/8274 PR: https://git.openjdk.java.net/jdk/pull/8274 From aivanov at openjdk.java.net Mon Apr 18 15:13:35 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 18 Apr 2022 15:13:35 GMT Subject: RFR: 8284189: Replace usages of 'a the' in java.desktop [v2] In-Reply-To: References: Message-ID: On Mon, 18 Apr 2022 14:55:04 GMT, Alexey Ivanov wrote: >> test/jdk/javax/accessibility/manual/ComboBoxDemo.html line 63: >> >>> 61: >>> 62:
          >>> 63:
        1. Verify that space and down arrow bring up the drop-down list.
          >> >> Is this HTML refactoring needed as part of this PR? > > The `` element is placed after `
        2. ` and before the next `
        3. `. In HTML `
            ` doesn't allow anything but `
          1. ` elements. I placed the image to where it was supposed to be. > > I decided it was easier and more efficient to fix it as part of this change rather than submit a new bug and create a new pull request afterwards. In fact, you're right: I looked at the other HTML files near this one, and some of them also contain similar markup errors. It'll be wiser to address them separately. I submitted [JDK-8284958](https://bugs.openjdk.java.net/browse/JDK-8284958) and reverted all changes to `ComboBoxDemo.html` but ?a the? to ?the?. ------------- PR: https://git.openjdk.java.net/jdk/pull/8274 From aivanov at openjdk.java.net Mon Apr 18 15:25:38 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 18 Apr 2022 15:25:38 GMT Subject: RFR: 8284189: Replace usages of 'a the' in java.desktop [v2] In-Reply-To: References: Message-ID: <7MlgwBFMiNPAIN1oNq7x8yVUQUpixnqIwZUlxmNCB_Q=.89f528ed-ea2d-4b74-892c-4a5f7ee7f880@github.com> On Mon, 18 Apr 2022 15:13:34 GMT, Alexey Ivanov wrote: >> Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? >> >> I fixed a couple of other spelling mistakes. >> >> I also expanded wildcard imports. > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > 8284189: Revert additional changes for ComboBoxDemo.html test/jdk/javax/accessibility/manual/ComboBoxDemo.html line 75: > 73: > 74: > 75: The file contained trailing white-space at the last line, it is removed by the IDE. ------------- PR: https://git.openjdk.java.net/jdk/pull/8274 From prr at openjdk.java.net Mon Apr 18 16:34:36 2022 From: prr at openjdk.java.net (Phil Race) Date: Mon, 18 Apr 2022 16:34:36 GMT Subject: RFR: 8284189: Replace usages of 'a the' in java.desktop [v2] In-Reply-To: References: Message-ID: On Mon, 18 Apr 2022 15:13:34 GMT, Alexey Ivanov wrote: >> Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? >> >> I fixed a couple of other spelling mistakes. >> >> I also expanded wildcard imports. > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > 8284189: Revert additional changes for ComboBoxDemo.html looks fine. Note that even though API javadoc is touched all these typos fall well below the threshold for a CSR, even the correction from java.awt.font.LineBreakMeasureer to java.awt.font.LineBreakMeasurer ------------- Marked as reviewed by prr (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8274 From zgu at openjdk.java.net Mon Apr 18 19:20:33 2022 From: zgu at openjdk.java.net (Zhengyu Gu) Date: Mon, 18 Apr 2022 19:20:33 GMT Subject: RFR: 8284680: sun.font.FontConfigManager.getFontConfig() leaks charset In-Reply-To: References: Message-ID: On Fri, 15 Apr 2022 18:43:27 GMT, Phil Race wrote: >> Please review this small patch that releases temporary charsets to avoid memory leak. >> >> Test: >> >> - [x] jdk_2d > > src/java.desktop/unix/native/common/awt/fontpath.c line 1112: > >> 1110: if (currentUnionSet != charset) { >> 1111: (*FcCharSetDestroy)(currentUnionSet); >> 1112: } > > Hmm. I worry that you may be replacing a leak with a crash. > The original "charset" was returned from FcPatternGetCharSet() and I don't think it was a copy and will be freed when the pattern is destroyed. > So that should not be freed here. Right, that is why I have `if (currentUnionSet != charset)` check to prevent from freeing original `charset`. ------------- PR: https://git.openjdk.java.net/jdk/pull/8187 From jdv at openjdk.java.net Tue Apr 19 03:49:26 2022 From: jdv at openjdk.java.net (Jayathirth D V) Date: Tue, 19 Apr 2022 03:49:26 GMT Subject: RFR: 8284189: Replace usages of 'a the' in java.desktop [v2] In-Reply-To: References: Message-ID: <2j7rvlzl2if6TGFXVj3yUOoe7exG_GMZW9VcTQuneaI=.1cfacf6d-f6b0-42e9-b9e1-ac3eadc7de52@github.com> On Mon, 18 Apr 2022 15:13:34 GMT, Alexey Ivanov wrote: >> Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? >> >> I fixed a couple of other spelling mistakes. >> >> I also expanded wildcard imports. > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > 8284189: Revert additional changes for ComboBoxDemo.html Marked as reviewed by jdv (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8274 From mvs at openjdk.java.net Tue Apr 19 05:49:27 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Tue, 19 Apr 2022 05:49:27 GMT Subject: RFR: 8283624: Create an automated regression test for RFE-4390885 [v2] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 07:14:28 GMT, Manukumar V S wrote: >> Write a regression test for [JDK-4390885](https://bugs.openjdk.java.net/browse/JDK-4390885) Enhancement Request. >> >> Issue: >> Please add the ability to set the location of a JFileChooser. This might be a >> bug, but JFileChooser.setLocation() has no effect when >> JFileChooser.showXXXXDialog() is called. This is becoming very important as the >> popularity of multiple monitors is increasing. These dialogs show up on the >> wrong monitor which is really annoying. Also due to bug #4189244 I am unable to >> avoid painting problems by positioning the dialog away from the menu item that >> initiated it. >> >> Fix: >> Now it's possible to set the location of Dialog in JFileChooser. >> >> Testing: >> 1. Tested in Mach5 10 times per platform(macos,linux,windows) and got all Pass. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Review comment fixed: Removed unwanted directory @aivanov-jdk Can you review this. ------------- PR: https://git.openjdk.java.net/jdk/pull/7996 From mvs at openjdk.java.net Tue Apr 19 05:54:29 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Tue, 19 Apr 2022 05:54:29 GMT Subject: Integrated: 8284521: Write an automated regression test for RFE 4371575 In-Reply-To: References: Message-ID: <9F6dNPvpB0tq6We1Ydr4TWoGwI545Kh9GIuXjJC2em4=.8e4687f3-c871-492b-a255-4de8b2c4fe49@github.com> On Thu, 7 Apr 2022 11:08:38 GMT, Manukumar V S wrote: > Write an automated regression test for [JDK-4371575](https://bugs.openjdk.java.net/browse/JDK-4371575) > > Issue: > As part of the Merlin focus project, JComponent.setRequestFocusEnabled was > deprecated and its implementation was changed to map exactly to the new > method Component.setFocusable. Scott believes that the old behavior may be > preferable. He would like to be able to specify that a Component is focusable, > and should receive focus during keyboard traversal, but that it should not > automatically take focus when the user clicks on it with the mouse. > > We are concerned that the accessibility team would be against this behavior, > and this also seems like more of a PLAF issue. Nevertheless, we should look > into it before beta ships. > > Fix: > After some discussion we decided that the best balance of the old and new would be to make this an advisory property. This property will not be synonymous with focusable. Instead our mouse listeners will check this property before requesting focus. This provides as closely as possible the old behavior, while allowing people to use the new focusable property if they don't want a component focusable at all. > > Testing: > Tested in mach5, 10 times with all the 3 available platform like macosx, windows and linux and got all Pass. This pull request has now been integrated. Changeset: 447c2d13 Author: Manukumar V S Committer: Abdul Kolarkunnu URL: https://git.openjdk.java.net/jdk/commit/447c2d13d055fbe640ec4714a961543a03a4f2ad Stats: 138 lines in 1 file changed: 138 ins; 0 del; 0 mod 8284521: Write an automated regression test for RFE 4371575 Reviewed-by: prr, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8143 From psadhukhan at openjdk.java.net Tue Apr 19 07:03:28 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 19 Apr 2022 07:03:28 GMT Subject: Integrated: 8266246: Swing test PressedIconTest.java sometimes fails on macOS 11 ARM In-Reply-To: References: Message-ID: On Fri, 15 Apr 2022 09:57:53 GMT, Prasanta Sadhukhan wrote: > javax/swing/JButton/8151303/PressedIconTest.java was failing few times in macos M1 system owing t color profile issue. > > java.lang.RuntimeException: Colors are different! > at PressedIconTest.main(PressedIconTest.java:88) > > > Test is now passing in all mac M1 systems in CI (link in jBS) so can be removed from problemlist. This pull request has now been integrated. Changeset: c5e9719c Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/c5e9719c40ed4d83b3978f45bacbf8e066cae02d Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod 8266246: Swing test PressedIconTest.java sometimes fails on macOS 11 ARM Reviewed-by: jdv ------------- PR: https://git.openjdk.java.net/jdk/pull/8261 From dmarkov at openjdk.java.net Tue Apr 19 07:18:26 2022 From: dmarkov at openjdk.java.net (Dmitry Markov) Date: Tue, 19 Apr 2022 07:18:26 GMT Subject: RFR: 8284189: Replace usages of 'a the' in java.desktop [v2] In-Reply-To: References: Message-ID: On Mon, 18 Apr 2022 15:13:34 GMT, Alexey Ivanov wrote: >> Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? >> >> I fixed a couple of other spelling mistakes. >> >> I also expanded wildcard imports. > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > 8284189: Revert additional changes for ComboBoxDemo.html Marked as reviewed by dmarkov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8274 From psadhukhan at openjdk.java.net Tue Apr 19 09:17:45 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 19 Apr 2022 09:17:45 GMT Subject: RFR: 8284993: Replace System.exit call in swing tests with RuntimeException Message-ID: Few swing tests call System.exit() which might stop the test harness from executing further tests if any of the test fail. We should replace with RuntimeException. ------------- Commit messages: - 8284993: Replace System.exit call in swing tests with RuntimeException - 8284993: Replace System.exit call in swing tests with RuntimeException Changes: https://git.openjdk.java.net/jdk/pull/8293/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8293&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284993 Stats: 6 lines in 6 files changed: 0 ins; 0 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/8293.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8293/head:pull/8293 PR: https://git.openjdk.java.net/jdk/pull/8293 From azvegint at openjdk.java.net Tue Apr 19 11:54:45 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Tue, 19 Apr 2022 11:54:45 GMT Subject: RFR: 8023814: Test java/awt/im/memoryleak/InputContextMemoryLeakTest.java fails Message-ID: Removing the test from problem list, since I am unable to reproduce the issue even with old Ubuntu distros with jdk8. Bug filed against Solaris initially, but I did not test on it, since it is no longer supported. Multiple mach5 testing is green. `dispose` added for convenience if test is executed without jtreg. ------------- Commit messages: - initial Changes: https://git.openjdk.java.net/jdk/pull/8295/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8295&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8023814 Stats: 9 lines in 2 files changed: 5 ins; 2 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8295.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8295/head:pull/8295 PR: https://git.openjdk.java.net/jdk/pull/8295 From psadhukhan at openjdk.java.net Tue Apr 19 13:01:49 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 19 Apr 2022 13:01:49 GMT Subject: RFR: 8042381: Test javax/swing/JRootPane/4670486/bug4670486.java fails with Action has not been received Message-ID: This test was failing long time back probably due to samevm mode execution but not failing in recent run. Reduce sutodelay time consistent with other test, move frame to center and added wait time after frame is made visible. Several iterations of the test passed in all platforms (link in JBS) ------------- Commit messages: - Merge branch 'master' into JDK-8042381 - 8042381: Test javax/swing/JRootPane/4670486/bug4670486.java fails with Action has not been received Changes: https://git.openjdk.java.net/jdk/pull/8296/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8296&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8042381 Stats: 4 lines in 2 files changed: 2 ins; 1 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8296.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8296/head:pull/8296 PR: https://git.openjdk.java.net/jdk/pull/8296 From duke at openjdk.java.net Tue Apr 19 17:03:16 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Tue, 19 Apr 2022 17:03:16 GMT Subject: RFR: 8283803: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test [v9] In-Reply-To: References: Message-ID: > Fixed the following issue. > 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" > 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. > So added Pass and Fail button to mark the test result. > 3) Added timeout if in case user does not interact with the test UI. > > @shurymury > @aivanov-jdk lawrence.andrews has updated the pull request incrementally with two additional commits since the last revision: - Merge branch 'JDK-8283803' of https://github.com/lawrence-andrew/jdk into JDK-8283803 - Removed checking pj for null ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8004/files - new: https://git.openjdk.java.net/jdk/pull/8004/files/0d971ba3..12e418b7 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=08 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=07-08 Stats: 44 lines in 2 files changed: 14 ins; 9 del; 21 mod Patch: https://git.openjdk.java.net/jdk/pull/8004.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8004/head:pull/8004 PR: https://git.openjdk.java.net/jdk/pull/8004 From azvegint at openjdk.java.net Tue Apr 19 18:25:35 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Tue, 19 Apr 2022 18:25:35 GMT Subject: RFR: 8042381: Test javax/swing/JRootPane/4670486/bug4670486.java fails with Action has not been received In-Reply-To: References: Message-ID: On Tue, 19 Apr 2022 12:53:35 GMT, Prasanta Sadhukhan wrote: > This test was failing long time back probably due to samevm mode execution but not failing in recent run. > Reduce sutodelay time consistent with other test, move frame to center and added wait time after frame is made visible. > > Several iterations of the test passed in all platforms (link in JBS) Marked as reviewed by azvegint (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8296 From azvegint at openjdk.java.net Tue Apr 19 18:53:23 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Tue, 19 Apr 2022 18:53:23 GMT Subject: RFR: 8284993: Replace System.exit call in swing tests with RuntimeException In-Reply-To: References: Message-ID: On Tue, 19 Apr 2022 09:10:30 GMT, Prasanta Sadhukhan wrote: > Few swing tests call System.exit() which might stop the test harness from executing further tests if any of the test fail. We should replace with RuntimeException. test/jdk/javax/swing/JComboBox/8019180/Test8019180.java line 66: > 64: } > 65: SwingUtilities.getWindowAncestor(this.test).dispose(); > 66: LATCH.countDown(); Looks like that before the fix all tests had graceful shutdown in standalone mode. Now there are hanging open windows when they fails. e.g. those two lines could be wrapped in `finally` block for graceful test finish. ------------- PR: https://git.openjdk.java.net/jdk/pull/8293 From aivanov at openjdk.java.net Tue Apr 19 18:56:41 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 19 Apr 2022 18:56:41 GMT Subject: RFR: 8283803: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test [v9] In-Reply-To: References: Message-ID: On Tue, 19 Apr 2022 17:03:16 GMT, lawrence.andrews wrote: >> Fixed the following issue. >> 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" >> 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. >> So added Pass and Fail button to mark the test result. >> 3) Added timeout if in case user does not interact with the test UI. >> >> @shurymury >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with two additional commits since the last revision: > > - Merge branch 'JDK-8283803' of https://github.com/lawrence-andrew/jdk into JDK-8283803 > - Removed checking pj for null Marked as reviewed by aivanov (Reviewer). test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 123: > 121: instructionsText.setLineWrap(true); > 122: > 123: long tTimeout = TimeUnit.MINUTES.toMillis(testTimeOut); Here you could probably reused `testTimeout`: testTimeOut = TimeUnit.MINUTES.toMillis(testTimeOut); test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 197: > 195: * interrupted > 196: * @throws InvocationTargetException if an exception is thrown while > 197: * disposing frames on EDT Suggestion: * disposing of frames on EDT ?Dispose? requires the preposition. ------------- PR: https://git.openjdk.java.net/jdk/pull/8004 From aivanov at openjdk.java.net Tue Apr 19 19:27:28 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 19 Apr 2022 19:27:28 GMT Subject: RFR: 8283803: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test [v9] In-Reply-To: References: Message-ID: On Tue, 19 Apr 2022 17:03:16 GMT, lawrence.andrews wrote: >> Fixed the following issue. >> 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" >> 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. >> So added Pass and Fail button to mark the test result. >> 3) Added timeout if in case user does not interact with the test UI. >> >> @shurymury >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with two additional commits since the last revision: > > - Merge branch 'JDK-8283803' of https://github.com/lawrence-andrew/jdk into JDK-8283803 > - Removed checking pj for null You probably need to use `/issue remove 8283803` to remove duplicate entry from the commit message. ------------- PR: https://git.openjdk.java.net/jdk/pull/8004 From duke at openjdk.java.net Tue Apr 19 19:48:28 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Tue, 19 Apr 2022 19:48:28 GMT Subject: RFR: 8283803: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test [v9] In-Reply-To: References: Message-ID: <99eMf_7TmyG1Mg2ED2hpYs6AvOzAzOivZJM4FcUFw_c=.f82a847d-e60f-42b3-a19f-f279db580770@github.com> On Tue, 19 Apr 2022 18:47:22 GMT, Alexey Ivanov wrote: >> lawrence.andrews has updated the pull request incrementally with two additional commits since the last revision: >> >> - Merge branch 'JDK-8283803' of https://github.com/lawrence-andrew/jdk into JDK-8283803 >> - Removed checking pj for null > > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 123: > >> 121: instructionsText.setLineWrap(true); >> 122: >> 123: long tTimeout = TimeUnit.MINUTES.toMillis(testTimeOut); > > Here you could probably reused `testTimeout`: > > testTimeOut = TimeUnit.MINUTES.toMillis(testTimeOut); testTimeOut is used with in lambda hence it should be final. So I just created a new variable. ------------- PR: https://git.openjdk.java.net/jdk/pull/8004 From azvegint at openjdk.java.net Tue Apr 19 20:11:09 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Tue, 19 Apr 2022 20:11:09 GMT Subject: RFR: 8129827: [TEST_BUG] Test java/awt/Robot/RobotWheelTest/RobotWheelTest.java fails Message-ID: Test was written based on assumption that we will receive only one `mouseWheelMoved` event after `robot.mouseWheel(20)` call, but we can receive 20 intstead. So the test is modified to accumulate wheel rotation values before checking. Testing is green on all platforms. ------------- Commit messages: - initial Changes: https://git.openjdk.java.net/jdk/pull/8305/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8305&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8129827 Stats: 43 lines in 2 files changed: 32 ins; 6 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/8305.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8305/head:pull/8305 PR: https://git.openjdk.java.net/jdk/pull/8305 From aivanov at openjdk.java.net Tue Apr 19 20:28:25 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 19 Apr 2022 20:28:25 GMT Subject: RFR: 8283803: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test [v9] In-Reply-To: <99eMf_7TmyG1Mg2ED2hpYs6AvOzAzOivZJM4FcUFw_c=.f82a847d-e60f-42b3-a19f-f279db580770@github.com> References: <99eMf_7TmyG1Mg2ED2hpYs6AvOzAzOivZJM4FcUFw_c=.f82a847d-e60f-42b3-a19f-f279db580770@github.com> Message-ID: On Tue, 19 Apr 2022 19:45:20 GMT, lawrence.andrews wrote: >> test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 123: >> >>> 121: instructionsText.setLineWrap(true); >>> 122: >>> 123: long tTimeout = TimeUnit.MINUTES.toMillis(testTimeOut); >> >> Here you could probably reused `testTimeout`: >> >> testTimeOut = TimeUnit.MINUTES.toMillis(testTimeOut); > > testTimeOut is used with in lambda hence it should be final. So I just created a new variable. I see. Yes, lambdas and anonymous classes require final or effectively final variables. ------------- PR: https://git.openjdk.java.net/jdk/pull/8004 From duke at openjdk.java.net Tue Apr 19 20:33:15 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Tue, 19 Apr 2022 20:33:15 GMT Subject: RFR: 8283803: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test [v10] In-Reply-To: References: Message-ID: > Fixed the following issue. > 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" > 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. > So added Pass and Fail button to mark the test result. > 3) Added timeout if in case user does not interact with the test UI. > > @shurymury > @aivanov-jdk lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Update PassFailJFrame.java ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8004/files - new: https://git.openjdk.java.net/jdk/pull/8004/files/12e418b7..c5551243 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=09 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=08-09 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8004.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8004/head:pull/8004 PR: https://git.openjdk.java.net/jdk/pull/8004 From duke at openjdk.java.net Tue Apr 19 21:10:59 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Tue, 19 Apr 2022 21:10:59 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane Message-ID: The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. The following approaches were evaluated before considering it as not a test issue - - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. - Removing existing constraints on text and icon is incompatible for Aqua LAF. - Since the above two approaches are incompatible with Aqua, a third approach was considered - explicitly stating in test that text may not fit in the tab and this is not a test bug. ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) ------------- Commit messages: - expanded imports - JTabbedPane test case changes Changes: https://git.openjdk.java.net/jdk/pull/8307/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8307&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8251177 Stats: 13 lines in 2 files changed: 8 ins; 1 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/8307.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8307/head:pull/8307 PR: https://git.openjdk.java.net/jdk/pull/8307 From duke at openjdk.java.net Tue Apr 19 21:11:12 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Tue, 19 Apr 2022 21:11:12 GMT Subject: RFR: 8283803: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test [v11] In-Reply-To: References: Message-ID: > Fixed the following issue. > 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" > 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. > So added Pass and Fail button to mark the test result. > 3) Added timeout if in case user does not interact with the test UI. > > @shurymury > @aivanov-jdk lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Update PassFailJFrame.java ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8004/files - new: https://git.openjdk.java.net/jdk/pull/8004/files/c5551243..796e3933 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=10 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8004&range=09-10 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8004.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8004/head:pull/8004 PR: https://git.openjdk.java.net/jdk/pull/8004 From aivanov at openjdk.java.net Tue Apr 19 21:11:13 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 19 Apr 2022 21:11:13 GMT Subject: RFR: 8283803: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test [v11] In-Reply-To: References: Message-ID: <4esCyMsk5lbr7LZoZuOO9Uw_1-S0e9VAmLAw5VIm_Mk=.75abaf8b-435d-4c5c-830a-2be075d32ae5@github.com> On Tue, 19 Apr 2022 21:08:10 GMT, lawrence.andrews wrote: >> Fixed the following issue. >> 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" >> 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. >> So added Pass and Fail button to mark the test result. >> 3) Added timeout if in case user does not interact with the test UI. >> >> @shurymury >> @aivanov-jdk > > lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: > > Update PassFailJFrame.java Marked as reviewed by aivanov (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8004 From duke at openjdk.java.net Tue Apr 19 21:11:13 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Tue, 19 Apr 2022 21:11:13 GMT Subject: Integrated: 8283803: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test In-Reply-To: References: Message-ID: On Mon, 28 Mar 2022 20:23:20 GMT, lawrence.andrews wrote: > Fixed the following issue. > 1) Removed yes/no since test was failing due to "Parser error due to yesno in @run main/manual=yesno" > 2) After removing yes/no test run( just shows the UI and gets dispose immediately). User cannot interact with the test UI and mark the test pass or failed. > So added Pass and Fail button to mark the test result. > 3) Added timeout if in case user does not interact with the test UI. > > @shurymury > @aivanov-jdk This pull request has now been integrated. Changeset: ed23033d Author: lawrence.andrews <87324768+lawrence-andrew at users.noreply.github.com> Committer: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/ed23033dc6b3d4833ce2c8d07f273747ab8ae406 Stats: 206 lines in 2 files changed: 110 ins; 48 del; 48 mod 8283803: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintGlyphVectorTest.java and fix test 8284898: Enhance PassFailJFrame Reviewed-by: prr, aivanov ------------- PR: https://git.openjdk.java.net/jdk/pull/8004 From kizune at openjdk.java.net Tue Apr 19 21:22:28 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Tue, 19 Apr 2022 21:22:28 GMT Subject: RFR: 8042381: Test javax/swing/JRootPane/4670486/bug4670486.java fails with Action has not been received In-Reply-To: References: Message-ID: On Tue, 19 Apr 2022 12:53:35 GMT, Prasanta Sadhukhan wrote: > This test was failing long time back probably due to samevm mode execution but not failing in recent run. > Reduce sutodelay time consistent with other test, move frame to center and added wait time after frame is made visible. > > Several iterations of the test passed in all platforms (link in JBS) Marked as reviewed by kizune (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8296 From kizune at openjdk.java.net Wed Apr 20 05:01:08 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Wed, 20 Apr 2022 05:01:08 GMT Subject: RFR: 8266247: Swing test bug7154030.java sometimes fails on macOS 11 ARM Message-ID: <6NjM3IIB8sz7952nBBPoh6GX3z7Oj_wrAGmi9id71ws=.d997e533-28de-4e07-980b-0e5e7fbc7990@github.com> Change background and foreground colors to white and black to avoid color shift problems. ------------- Commit messages: - 8266247: Swing test bug7154030.java sometimes fails on macOS 11 ARM Changes: https://git.openjdk.java.net/jdk/pull/8313/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8313&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8266247 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8313.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8313/head:pull/8313 PR: https://git.openjdk.java.net/jdk/pull/8313 From kizune at openjdk.java.net Wed Apr 20 05:18:01 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Wed, 20 Apr 2022 05:18:01 GMT Subject: RFR: 6829250: Reg test: java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java fails in Windows Message-ID: Only check that insets of the fully expanded undecorated window is not bigger than device insets. They can be smaller, it is a normal situation. ------------- Commit messages: - 6829250: Reg test: java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java fails in Windows Changes: https://git.openjdk.java.net/jdk/pull/8314/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8314&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-6829250 Stats: 10 lines in 2 files changed: 6 ins; 2 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8314.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8314/head:pull/8314 PR: https://git.openjdk.java.net/jdk/pull/8314 From mvs at openjdk.java.net Wed Apr 20 07:14:33 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Wed, 20 Apr 2022 07:14:33 GMT Subject: RFR: 8283624: Create an automated regression test for RFE-4390885 [v3] In-Reply-To: References: Message-ID: > Write a regression test for [JDK-4390885](https://bugs.openjdk.java.net/browse/JDK-4390885) Enhancement Request. > > Issue: > Please add the ability to set the location of a JFileChooser. This might be a > bug, but JFileChooser.setLocation() has no effect when > JFileChooser.showXXXXDialog() is called. This is becoming very important as the > popularity of multiple monitors is increasing. These dialogs show up on the > wrong monitor which is really annoying. Also due to bug #4189244 I am unable to > avoid painting problems by positioning the dialog away from the menu item that > initiated it. > > Fix: > Now it's possible to set the location of Dialog in JFileChooser. > > Testing: > 1. Tested in Mach5 10 times per platform(macos,linux,windows) and got all Pass. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Removed some duplicate code ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7996/files - new: https://git.openjdk.java.net/jdk/pull/7996/files/76337e2f..22e4eebc Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7996&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7996&range=01-02 Stats: 3 lines in 1 file changed: 0 ins; 3 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7996.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7996/head:pull/7996 PR: https://git.openjdk.java.net/jdk/pull/7996 From psadhukhan at openjdk.java.net Wed Apr 20 08:13:26 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 20 Apr 2022 08:13:26 GMT Subject: RFR: 8266247: Swing test bug7154030.java sometimes fails on macOS 11 ARM In-Reply-To: <6NjM3IIB8sz7952nBBPoh6GX3z7Oj_wrAGmi9id71ws=.d997e533-28de-4e07-980b-0e5e7fbc7990@github.com> References: <6NjM3IIB8sz7952nBBPoh6GX3z7Oj_wrAGmi9id71ws=.d997e533-28de-4e07-980b-0e5e7fbc7990@github.com> Message-ID: On Wed, 20 Apr 2022 04:52:08 GMT, Alexander Zuev wrote: > Change background and foreground colors to white and black to avoid color shift problems. looks ok.. I hope this is tested against all CI platforms not only in mac M1.. ------------- Marked as reviewed by psadhukhan (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8313 From psadhukhan at openjdk.java.net Wed Apr 20 08:40:25 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 20 Apr 2022 08:40:25 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane In-Reply-To: References: Message-ID: On Tue, 19 Apr 2022 21:03:13 GMT, Harshitha Onkar wrote: > The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. > > The following approaches were evaluated before considering it as not a test issue - > > - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. > > - Removing existing constraints on text and icon is incompatible for Aqua LAF. > > Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list > > ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) test/jdk/javax/swing/JTabbedPane/4209065/bug4209065.java line 59: > 57: + "fit the tab."; > 58: tp.addTab("
            big
            ", > 59: new JLabel(text)); If you are saying text may not fit the tab, then I guess no need to change font size from +3 to +2, leave it as it is.. ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From psadhukhan at openjdk.java.net Wed Apr 20 09:07:26 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 20 Apr 2022 09:07:26 GMT Subject: Integrated: 8042381: Test javax/swing/JRootPane/4670486/bug4670486.java fails with Action has not been received In-Reply-To: References: Message-ID: <1kaBA2yVL3Xz-66gEM80ssoer1_8QggVyZK4-TrntIg=.4d491bb0-eadc-4e7c-a287-f3f4e2ef1403@github.com> On Tue, 19 Apr 2022 12:53:35 GMT, Prasanta Sadhukhan wrote: > This test was failing long time back probably due to samevm mode execution but not failing in recent run. > Reduce sutodelay time consistent with other test, move frame to center and added wait time after frame is made visible. > > Several iterations of the test passed in all platforms (link in JBS) This pull request has now been integrated. Changeset: 1b716210 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/1b71621008a62a4f806e2e97579fb8716be290a5 Stats: 4 lines in 2 files changed: 2 ins; 1 del; 1 mod 8042381: Test javax/swing/JRootPane/4670486/bug4670486.java fails with Action has not been received Reviewed-by: azvegint, kizune ------------- PR: https://git.openjdk.java.net/jdk/pull/8296 From psadhukhan at openjdk.java.net Wed Apr 20 09:23:15 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 20 Apr 2022 09:23:15 GMT Subject: RFR: 8284993: Replace System.exit call in swing tests with RuntimeException [v2] In-Reply-To: References: Message-ID: > Few swing tests call System.exit() which might stop the test harness from executing further tests if any of the test fail. We should replace with RuntimeException. Prasanta Sadhukhan has updated the pull request incrementally with two additional commits since the last revision: - test fix - test fix ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8293/files - new: https://git.openjdk.java.net/jdk/pull/8293/files/f00eaac8..6b4f510a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8293&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8293&range=00-01 Stats: 15 lines in 1 file changed: 10 ins; 1 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/8293.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8293/head:pull/8293 PR: https://git.openjdk.java.net/jdk/pull/8293 From psadhukhan at openjdk.java.net Wed Apr 20 09:23:15 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 20 Apr 2022 09:23:15 GMT Subject: RFR: 8284993: Replace System.exit call in swing tests with RuntimeException [v2] In-Reply-To: References: Message-ID: On Tue, 19 Apr 2022 18:32:39 GMT, Alexander Zvegintsev wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with two additional commits since the last revision: >> >> - test fix >> - test fix > > test/jdk/javax/swing/JComboBox/8019180/Test8019180.java line 66: > >> 64: } >> 65: SwingUtilities.getWindowAncestor(this.test).dispose(); >> 66: LATCH.countDown(); > > Looks like that before the fix all tests had graceful shutdown in standalone mode. > > Now there are hanging open windows when they fails. > e.g. those two lines could be wrapped in `finally` block for graceful test finish. I am not able to reproduce this observation. Anyway, I have added dispose in finally block ------------- PR: https://git.openjdk.java.net/jdk/pull/8293 From psadhukhan at openjdk.java.net Wed Apr 20 09:32:42 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 20 Apr 2022 09:32:42 GMT Subject: RFR: 8023814: Test java/awt/im/memoryleak/InputContextMemoryLeakTest.java fails In-Reply-To: References: Message-ID: On Tue, 19 Apr 2022 11:48:10 GMT, Alexander Zvegintsev wrote: > Removing the test from problem list, since I am unable to reproduce the issue even with old Ubuntu distros with jdk8. > Bug filed against Solaris initially, but I did not test on it, since it is no longer supported. > > Multiple mach5 testing is green. > > `dispose` added for convenience if test is executed without jtreg. Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8295 From azvegint at openjdk.java.net Wed Apr 20 10:07:28 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Wed, 20 Apr 2022 10:07:28 GMT Subject: RFR: 8284993: Replace System.exit call in swing tests with RuntimeException [v2] In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 09:17:31 GMT, Prasanta Sadhukhan wrote: >> test/jdk/javax/swing/JComboBox/8019180/Test8019180.java line 66: >> >>> 64: } >>> 65: SwingUtilities.getWindowAncestor(this.test).dispose(); >>> 66: LATCH.countDown(); >> >> Looks like that before the fix all tests had graceful shutdown in standalone mode. >> >> Now there are hanging open windows when they fails. >> e.g. those two lines could be wrapped in `finally` block for graceful test finish. > > I am not able to reproduce this observation. Anyway, I have added dispose in finally block It is because the test is not failing right now, you can change `>` to `<` in `if (0 > this.test.getSelectedIndex()) {` to fail the test. It will still hang after latest modifications when launched with `java Test8019180.java` because of `LATCH` is still awaiting for its `countdown` (which is not called after throwing an exception). It is not an issue if you run it with jtreg. ------------- PR: https://git.openjdk.java.net/jdk/pull/8293 From psadhukhan at openjdk.java.net Wed Apr 20 10:46:01 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 20 Apr 2022 10:46:01 GMT Subject: RFR: 8284993: Replace System.exit call in swing tests with RuntimeException [v3] In-Reply-To: References: Message-ID: > Few swing tests call System.exit() which might stop the test harness from executing further tests if any of the test fail. We should replace with RuntimeException. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Test fix ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8293/files - new: https://git.openjdk.java.net/jdk/pull/8293/files/6b4f510a..2c8508a6 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8293&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8293&range=01-02 Stats: 18 lines in 1 file changed: 3 ins; 0 del; 15 mod Patch: https://git.openjdk.java.net/jdk/pull/8293.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8293/head:pull/8293 PR: https://git.openjdk.java.net/jdk/pull/8293 From psadhukhan at openjdk.java.net Wed Apr 20 10:46:02 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 20 Apr 2022 10:46:02 GMT Subject: RFR: 8284993: Replace System.exit call in swing tests with RuntimeException [v3] In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 10:03:10 GMT, Alexander Zvegintsev wrote: >> I am not able to reproduce this observation. Anyway, I have added dispose in finally block > > It is because the test is not failing right now, you can change `>` to `<` in `if (0 > this.test.getSelectedIndex()) {` to fail the test. > > It will still hang after latest modifications when launched with `java Test8019180.java` because of `LATCH` is still awaiting for its `countdown` (which is not called after throwing an exception). > > It is not an issue if you run it with jtreg. ok modified test. ------------- PR: https://git.openjdk.java.net/jdk/pull/8293 From azvegint at openjdk.java.net Wed Apr 20 11:25:21 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Wed, 20 Apr 2022 11:25:21 GMT Subject: RFR: 8284993: Replace System.exit call in swing tests with RuntimeException [v3] In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 10:46:01 GMT, Prasanta Sadhukhan wrote: >> Few swing tests call System.exit() which might stop the test harness from executing further tests if any of the test fail. We should replace with RuntimeException. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Test fix Marked as reviewed by azvegint (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8293 From mvs at openjdk.java.net Wed Apr 20 13:11:12 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Wed, 20 Apr 2022 13:11:12 GMT Subject: RFR: 8274597: Some of the dnd tests time out and fail intermittently Message-ID: These dnd tests fails with a time out intermittently in some machines(mostly Windows 11) which creates frequent noise in CI. 1. java/awt/dnd/AcceptDropMultipleTimes/AcceptDropMultipleTimes.java 2. java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java 3. java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java Issue : These tests are using the Util.drag() method and there was no robot.delay() added between different mouse actions in this method. This could potentially make tests using this method unstable. Fix: Adding a small auto delay of 100ms to fix this. Testing: 1. All the three tests are run 15 times per platform. 2. All the tests in java/awt/dnd package run 5 times per platform 3. All the three tests are run 5 times specifically on Windows 11 platform. ------------- Commit messages: - 8274597: Some of the dnd tests time out and fail intermittently Changes: https://git.openjdk.java.net/jdk/pull/8316/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8316&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8274597 Stats: 9 lines in 1 file changed: 8 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8316.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8316/head:pull/8316 PR: https://git.openjdk.java.net/jdk/pull/8316 From mvs at openjdk.java.net Wed Apr 20 13:28:17 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Wed, 20 Apr 2022 13:28:17 GMT Subject: RFR: 8274597: Some of the dnd tests time out and fail intermittently [v2] In-Reply-To: References: Message-ID: <-M3RkI7ibFy3E3pyMdIyr-7-WWbZQXFo_4no53mvgDY=.761ad3d4-ff6c-4453-a328-173492e14616@github.com> > These dnd tests fails with a time out intermittently in some machines(mostly Windows 11) which creates frequent noise in CI. > 1. java/awt/dnd/AcceptDropMultipleTimes/AcceptDropMultipleTimes.java > 2. java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java > 3. java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java > > Issue : > These tests are using the Util.drag() method and there was no robot.delay() added between different mouse actions in this method. This could potentially make tests using this method unstable. > > Fix: > Adding a small auto delay of 100ms to fix this. > > Testing: > 1. All the three tests are run 15 times per platform. > 2. All the tests in java/awt/dnd package run 5 times per platform > 3. All the three tests are run 5 times specifically on Windows 11 platform. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Added blank line at end of file ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8316/files - new: https://git.openjdk.java.net/jdk/pull/8316/files/1a1657a0..f008f89a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8316&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8316&range=00-01 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8316.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8316/head:pull/8316 PR: https://git.openjdk.java.net/jdk/pull/8316 From zgu at openjdk.java.net Wed Apr 20 13:56:14 2022 From: zgu at openjdk.java.net (Zhengyu Gu) Date: Wed, 20 Apr 2022 13:56:14 GMT Subject: RFR: 8284956: Potential leak awtImageData/color_data when initializes X11GraphicsEnvironment Message-ID: <3POzEJ3BfvLSZncFAN7pluxsSz9_UB_wyeCMV53X-CQ=.e24bef4e-3638-4338-bd3e-3d341e21428a@github.com> During initializing native data of `X11GraphicsEnvironment`, a single `AwtGraphicsConfigData` is used/reused, not only failed cases, but also succeeded cases. So `AwtGraphicsConfigData` internal states need to be cleanup properly to avoid memory leaks. Test: - [x] jdk_awt ------------- Commit messages: - Merge branch 'master' into JDK-8284956-memleak_awtImageData_awt_allocate_colors - cleanup - v1 - v0 Changes: https://git.openjdk.java.net/jdk/pull/8317/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8317&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284956 Stats: 36 lines in 1 file changed: 25 ins; 4 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/8317.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8317/head:pull/8317 PR: https://git.openjdk.java.net/jdk/pull/8317 From kevinw at openjdk.java.net Wed Apr 20 14:04:32 2022 From: kevinw at openjdk.java.net (Kevin Walls) Date: Wed, 20 Apr 2022 14:04:32 GMT Subject: RFR: 8284853: Fix various 'expected' typo [v2] In-Reply-To: References: <32dmK9fPqvYhxpZmTgVYMYCfJNLZ3bI8ROg9UqUIRHc=.25e61d1a-6f26-4ea4-b5d3-3c6a80ce08dd@github.com> Message-ID: On Thu, 14 Apr 2022 18:04:16 GMT, Andrey Turbanov wrote: > I found [yet another typo](https://github.com/kelthuzadx/jdk/commit/acb9e15bc0bf5395d1c0875f36992f692734f948) ... I didn't think "JVMInvokeMethodSlack" was a typo. I think it's the idea of "slack space" meaning leftover space. We require a certain amount of this space. We need some slack on the stack, in order to invoke. ------------- PR: https://git.openjdk.java.net/jdk/pull/8231 From duke at openjdk.java.net Wed Apr 20 16:03:49 2022 From: duke at openjdk.java.net (XenoAmess) Date: Wed, 20 Apr 2022 16:03:49 GMT Subject: RFR: 8285149: Using HashMap.newHashMap to replace new HashMap(int) Message-ID: These are the changes that too many to be reviewed in 8186958, thus split some of them out. ------------- Commit messages: - 9073085: ues HashMap.newHashMap to replace new HashMap(int) Changes: https://git.openjdk.java.net/jdk/pull/8301/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8301&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285149 Stats: 36 lines in 20 files changed: 0 ins; 0 del; 36 mod Patch: https://git.openjdk.java.net/jdk/pull/8301.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8301/head:pull/8301 PR: https://git.openjdk.java.net/jdk/pull/8301 From avu at openjdk.java.net Wed Apr 20 16:04:28 2022 From: avu at openjdk.java.net (Alexey Ushakov) Date: Wed, 20 Apr 2022 16:04:28 GMT Subject: RFR: 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill [v2] In-Reply-To: References: Message-ID: On Mon, 18 Apr 2022 11:36:33 GMT, Ajit Ghaisas wrote: >> I am on vacation this week. I will review this PR on priority next week. > >> Looks fine, I suggest checking the fix via mach5. @aghaisas please take a look. > > The fix looks good. Also, the mach5 run is green with this change. > @avu, is it possible to add an automated test? @aghaisas actually we have one test/jdk/sun/java2d/ClassCastExceptionForInvalidSurface.java ------------- PR: https://git.openjdk.java.net/jdk/pull/8015 From psadhukhan at openjdk.java.net Wed Apr 20 16:05:28 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 20 Apr 2022 16:05:28 GMT Subject: RFR: 8208565: [TEST_BUG] javax\swing\PopupFactory\6276087\NonOpaquePopupMenuTest.java throws NPE In-Reply-To: References: Message-ID: On Mon, 18 Apr 2022 07:11:45 GMT, Prasanta Sadhukhan wrote: > Test was failing in the past owing to NPE while accessing JMenu probably owing to fact the test did not wait for UI to be visible before starting the test, so added a delay after the frame is made visible. Also, added disposal of frame. > Also, it seems JDK-8213535 fix might be having a positive impact on this test. > > Several iterations of this test in all platforms have passed (link in JBS). Any reviewers for this test fix? ------------- PR: https://git.openjdk.java.net/jdk/pull/8282 From avu at openjdk.java.net Wed Apr 20 16:14:12 2022 From: avu at openjdk.java.net (Alexey Ushakov) Date: Wed, 20 Apr 2022 16:14:12 GMT Subject: RFR: 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill [v3] In-Reply-To: References: Message-ID: > Throwing InvalidPipeException for incompatible surfaces Alexey Ushakov has updated the pull request incrementally with two additional commits since the last revision: - 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill Copyright correction - 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill Updated regression test with bugID ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8015/files - new: https://git.openjdk.java.net/jdk/pull/8015/files/d9a132ef..390cd480 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8015&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8015&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8015.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8015/head:pull/8015 PR: https://git.openjdk.java.net/jdk/pull/8015 From duke at openjdk.java.net Wed Apr 20 16:24:06 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Wed, 20 Apr 2022 16:24:06 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v2] In-Reply-To: References: Message-ID: > The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. > > The following approaches were evaluated before considering it as not a test issue - > > - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. > > - Removing existing constraints on text and icon is incompatible for Aqua LAF. > > Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list > > ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: changed font-size to 3 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8307/files - new: https://git.openjdk.java.net/jdk/pull/8307/files/aca2d2e6..951c0725 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8307&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8307&range=00-01 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8307.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8307/head:pull/8307 PR: https://git.openjdk.java.net/jdk/pull/8307 From duke at openjdk.java.net Wed Apr 20 16:24:07 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Wed, 20 Apr 2022 16:24:07 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v2] In-Reply-To: References: Message-ID: <1snXeQsA-i3WSAYcqvmqqWAIJ-ns0bMONSJGgSv_TMs=.049a06f2-c717-45e7-ad88-6af4c3fc1941@github.com> On Wed, 20 Apr 2022 08:36:37 GMT, Prasanta Sadhukhan wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> changed font-size to 3 > > test/jdk/javax/swing/JTabbedPane/4209065/bug4209065.java line 59: > >> 57: + "fit the tab."; >> 58: tp.addTab("
            big
            ", >> 59: new JLabel(text)); > > If you are saying text may not fit the tab, then I guess no need to change font size from +3 to +2, leave it as it is.. @prsadhuk Font-size of +2 is where it starts to get clipped but as you suggested we can change it back to +3 because of the included note. Updated the test case. ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From duke at openjdk.java.net Wed Apr 20 16:27:36 2022 From: duke at openjdk.java.net (liach) Date: Wed, 20 Apr 2022 16:27:36 GMT Subject: RFR: 8285149: Using HashMap.newHashMap to replace new HashMap(int) In-Reply-To: References: Message-ID: On Tue, 19 Apr 2022 17:44:10 GMT, XenoAmess wrote: > These are the changes that too many to be reviewed in 8186958, thus split some of them out. Would you consider replacing usages of `new HashMap<>(size, 1)`, such as in `AnnotationInvocationHandler`, as well? Such maps have a smaller table and are more likely to have collisions than `HashMap.newHashMap(size)`. ------------- PR: https://git.openjdk.java.net/jdk/pull/8301 From psadhukhan at openjdk.java.net Wed Apr 20 16:41:25 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 20 Apr 2022 16:41:25 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v2] In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 16:24:06 GMT, Harshitha Onkar wrote: >> The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. >> >> The following approaches were evaluated before considering it as not a test issue - >> >> - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. >> >> - Removing existing constraints on text and icon is incompatible for Aqua LAF. >> >> Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list >> >> ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > changed font-size to 3 looks ok. You should consider removing "The tab title may * not always fit within the tab." from the summary as it should be what the test is supposed to test. Intricate details are already put in the instructions. Also @author tab should be removed. ------------- Marked as reviewed by psadhukhan (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8307 From kizune at openjdk.java.net Wed Apr 20 16:51:35 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Wed, 20 Apr 2022 16:51:35 GMT Subject: Integrated: 8266247: Swing test bug7154030.java sometimes fails on macOS 11 ARM In-Reply-To: <6NjM3IIB8sz7952nBBPoh6GX3z7Oj_wrAGmi9id71ws=.d997e533-28de-4e07-980b-0e5e7fbc7990@github.com> References: <6NjM3IIB8sz7952nBBPoh6GX3z7Oj_wrAGmi9id71ws=.d997e533-28de-4e07-980b-0e5e7fbc7990@github.com> Message-ID: On Wed, 20 Apr 2022 04:52:08 GMT, Alexander Zuev wrote: > Change background and foreground colors to white and black to avoid color shift problems. This pull request has now been integrated. Changeset: 018017a9 Author: Alexander Zuev URL: https://git.openjdk.java.net/jdk/commit/018017a9175cbfe02e9db0db402ca2aa689ac587 Stats: 2 lines in 1 file changed: 2 ins; 0 del; 0 mod 8266247: Swing test bug7154030.java sometimes fails on macOS 11 ARM Reviewed-by: psadhukhan ------------- PR: https://git.openjdk.java.net/jdk/pull/8313 From duke at openjdk.java.net Wed Apr 20 16:53:33 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Wed, 20 Apr 2022 16:53:33 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v3] In-Reply-To: References: Message-ID: <05K-K4EXhEOwcpYe3s-nyiNSQnmIzS_m1fj_tYiRYLw=.f4f04a43-a55a-4835-b0d8-a13e36a2241f@github.com> > The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. > > The following approaches were evaluated before considering it as not a test issue - > > - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. > > - Removing existing constraints on text and icon is incompatible for Aqua LAF. > > Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list > > ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: test summary updated ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8307/files - new: https://git.openjdk.java.net/jdk/pull/8307/files/951c0725..521d2790 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8307&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8307&range=01-02 Stats: 3 lines in 1 file changed: 0 ins; 2 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8307.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8307/head:pull/8307 PR: https://git.openjdk.java.net/jdk/pull/8307 From duke at openjdk.java.net Wed Apr 20 16:53:35 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Wed, 20 Apr 2022 16:53:35 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v2] In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 16:38:21 GMT, Prasanta Sadhukhan wrote: > looks ok. You should consider removing "The tab title may > > * not always fit within the tab." from the summary as it should be what the test is supposed to test. Intricate details are already put in the instructions. > Also @author tab should be removed. Updated test summary as suggested ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From kizune at openjdk.java.net Wed Apr 20 17:10:50 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Wed, 20 Apr 2022 17:10:50 GMT Subject: RFR: 8273506: java Robot API did the 'm' keypress and caused /awt/event/KeyEvent/KeyCharTest/KeyCharTest.html is timing out on macOS 12 Message-ID: Clear the kCGEventFlagMaskSecondaryFn flag if it is set before posting keyboard events to the system queue. ------------- Commit messages: - 8273506: java Robot API did the 'm' keypress and caused /awt/event/KeyEvent/KeyCharTest/KeyCharTest.html is timing out on macOS 12 Changes: https://git.openjdk.java.net/jdk/pull/8320/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8320&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273506 Stats: 5 lines in 1 file changed: 5 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8320.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8320/head:pull/8320 PR: https://git.openjdk.java.net/jdk/pull/8320 From achung at openjdk.java.net Wed Apr 20 17:41:26 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Wed, 20 Apr 2022 17:41:26 GMT Subject: RFR: 8198622: java/awt/Focus/TypeAhead/TestFocusFreeze.java fails on mac In-Reply-To: <8guUkZCRSqeoI9P6-bxBTJjWgQuw_nQbLcfuUeUv3MA=.0fffd884-dff4-4bdc-a522-be7cf921a72c@github.com> References: <8guUkZCRSqeoI9P6-bxBTJjWgQuw_nQbLcfuUeUv3MA=.0fffd884-dff4-4bdc-a522-be7cf921a72c@github.com> Message-ID: On Thu, 14 Apr 2022 21:12:07 GMT, Alisen Chung wrote: > test passes, so removing from problem list The test passes in jdk8 through jdk11 on macos. ------------- PR: https://git.openjdk.java.net/jdk/pull/8254 From dbatrak at openjdk.java.net Wed Apr 20 17:48:28 2022 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Wed, 20 Apr 2022 17:48:28 GMT Subject: RFR: 8273506: java Robot API did the 'm' keypress and caused /awt/event/KeyEvent/KeyCharTest/KeyCharTest.html is timing out on macOS 12 In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 17:04:09 GMT, Alexander Zuev wrote: > Clear the kCGEventFlagMaskSecondaryFn flag if it is set before posting keyboard events to the system queue. Just a note - with the proposed fix, some generated events will be different from those generated by a real keyboard - namely events for arrow keys and F1-F12 keys, as those have 'inherent' Fn modifier set, regardless of whether Fn key was pressed during event generation. This won't be observable from Java applications, as Java APIs don't expose Fn modifier in `KeyEvent`-s, but can theoretically make some difference when interacting with other apps (I don't know about any problematic cases currently though). If this can be considered a problem, it's possible to improve the fix by not clearing Fn flag for key events 'inherently' having that Fn modifier. Simple approach might just hard-code them, and a more robust one (but a bit more complicated as well) can determine the set of affected keycodes on Robot startup, by examining flags set by `CGEventCreateKeyboardEvent` in a 'clear' event source state. ------------- PR: https://git.openjdk.java.net/jdk/pull/8320 From achung at openjdk.java.net Wed Apr 20 17:57:33 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Wed, 20 Apr 2022 17:57:33 GMT Subject: RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v9] In-Reply-To: References: Message-ID: > Changed the drawing area to be increased by 0.5 on the left side to prevent clipping Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: forgot to change starting x value of bottom line ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7449/files - new: https://git.openjdk.java.net/jdk/pull/7449/files/5d4854df..4dc1287e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7449&range=08 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7449&range=07-08 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/7449.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7449/head:pull/7449 PR: https://git.openjdk.java.net/jdk/pull/7449 From achung at openjdk.java.net Wed Apr 20 17:57:35 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Wed, 20 Apr 2022 17:57:35 GMT Subject: RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v8] In-Reply-To: References: Message-ID: On Thu, 7 Apr 2022 20:24:29 GMT, Alisen Chung wrote: >> Changed the drawing area to be increased by 0.5 on the left side to prevent clipping > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > fixed 1.25 scaling overdraw, fixed calcs for right and bottom side borders Made a small change with the bottom line to match the left line of the border ------------- PR: https://git.openjdk.java.net/jdk/pull/7449 From achung at openjdk.java.net Wed Apr 20 18:05:04 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Wed, 20 Apr 2022 18:05:04 GMT Subject: RFR: 8198622: java/awt/Focus/TypeAhead/TestFocusFreeze.java fails on mac [v2] In-Reply-To: <8guUkZCRSqeoI9P6-bxBTJjWgQuw_nQbLcfuUeUv3MA=.0fffd884-dff4-4bdc-a522-be7cf921a72c@github.com> References: <8guUkZCRSqeoI9P6-bxBTJjWgQuw_nQbLcfuUeUv3MA=.0fffd884-dff4-4bdc-a522-be7cf921a72c@github.com> Message-ID: > test passes, so removing from problem list Alisen Chung has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: - Merge master - remove test from ProblemList ------------- Changes: https://git.openjdk.java.net/jdk/pull/8254/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8254&range=01 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8254.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8254/head:pull/8254 PR: https://git.openjdk.java.net/jdk/pull/8254 From achung at openjdk.java.net Wed Apr 20 18:05:05 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Wed, 20 Apr 2022 18:05:05 GMT Subject: RFR: 8198622: java/awt/Focus/TypeAhead/TestFocusFreeze.java fails on mac In-Reply-To: <8guUkZCRSqeoI9P6-bxBTJjWgQuw_nQbLcfuUeUv3MA=.0fffd884-dff4-4bdc-a522-be7cf921a72c@github.com> References: <8guUkZCRSqeoI9P6-bxBTJjWgQuw_nQbLcfuUeUv3MA=.0fffd884-dff4-4bdc-a522-be7cf921a72c@github.com> Message-ID: On Thu, 14 Apr 2022 21:12:07 GMT, Alisen Chung wrote: > test passes, so removing from problem list Heres the decoupled bug: https://bugs.openjdk.java.net/browse/JDK-8285278 ------------- PR: https://git.openjdk.java.net/jdk/pull/8254 From kizune at openjdk.java.net Wed Apr 20 18:20:25 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Wed, 20 Apr 2022 18:20:25 GMT Subject: RFR: 8273506: java Robot API did the 'm' keypress and caused /awt/event/KeyEvent/KeyCharTest/KeyCharTest.html is timing out on macOS 12 In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 17:45:04 GMT, Dmitry Batrak wrote: > Just a note - with the proposed fix, some generated events will be different from those generated by a real keyboard - namely events for arrow keys and F1-F12 keys As far as i can tell they are not different, the Quartz layer adds these flags back for the composite keys so functionally there is no difference even when we interact with the external applications. The problem was that Quartz code does not clear them when events are processed and that is what caused the issue on AWT Robot side of things. ------------- PR: https://git.openjdk.java.net/jdk/pull/8320 From duke at openjdk.java.net Wed Apr 20 18:32:22 2022 From: duke at openjdk.java.net (XenoAmess) Date: Wed, 20 Apr 2022 18:32:22 GMT Subject: RFR: 8285149: Using HashMap.newHashMap to replace new HashMap(int) [v2] In-Reply-To: References: Message-ID: > These are the changes that too many to be reviewed in 8186958, thus split some of them out. XenoAmess has updated the pull request incrementally with two additional commits since the last revision: - add more replaces - add more replaces ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8301/files - new: https://git.openjdk.java.net/jdk/pull/8301/files/2ac4d7bc..28afb90b Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8301&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8301&range=00-01 Stats: 109 lines in 64 files changed: 0 ins; 10 del; 99 mod Patch: https://git.openjdk.java.net/jdk/pull/8301.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8301/head:pull/8301 PR: https://git.openjdk.java.net/jdk/pull/8301 From duke at openjdk.java.net Wed Apr 20 19:24:25 2022 From: duke at openjdk.java.net (XenoAmess) Date: Wed, 20 Apr 2022 19:24:25 GMT Subject: RFR: 8285149: Using HashMap.newHashMap to replace new HashMap(int) [v3] In-Reply-To: References: Message-ID: > These are the changes that too many to be reviewed in 8186958, thus split some of them out. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: add more replaces ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8301/files - new: https://git.openjdk.java.net/jdk/pull/8301/files/28afb90b..4f2d4838 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8301&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8301&range=01-02 Stats: 3 lines in 2 files changed: 0 ins; 0 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/8301.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8301/head:pull/8301 PR: https://git.openjdk.java.net/jdk/pull/8301 From prr at openjdk.java.net Wed Apr 20 19:34:27 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 20 Apr 2022 19:34:27 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v3] In-Reply-To: <05K-K4EXhEOwcpYe3s-nyiNSQnmIzS_m1fj_tYiRYLw=.f4f04a43-a55a-4835-b0d8-a13e36a2241f@github.com> References: <05K-K4EXhEOwcpYe3s-nyiNSQnmIzS_m1fj_tYiRYLw=.f4f04a43-a55a-4835-b0d8-a13e36a2241f@github.com> Message-ID: On Wed, 20 Apr 2022 16:53:33 GMT, Harshitha Onkar wrote: >> The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. >> >> The following approaches were evaluated before considering it as not a test issue - >> >> - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. >> >> - Removing existing constraints on text and icon is incompatible for Aqua LAF. >> >> Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list >> >> ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > test summary updated test/jdk/javax/swing/JTabbedPane/4209065/bug4209065.java line 55: > 53: + "
            the descriptions, press PASS
            " > 54: + "
            NOTE: the text (tab title) may not always " > 55: + "fit the tab."; How about NOTE: where a large font is used, the text may be larger than the tab height but this is OK and not a failure. ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From prr at openjdk.java.net Wed Apr 20 19:38:25 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 20 Apr 2022 19:38:25 GMT Subject: RFR: 8284993: Replace System.exit call in swing tests with RuntimeException [v3] In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 10:46:01 GMT, Prasanta Sadhukhan wrote: >> Few swing tests call System.exit() which might stop the test harness from executing further tests if any of the test fail. We should replace with RuntimeException. > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Test fix test/jdk/javax/swing/JComboBox/8019180/Test8019180.java line 74: > 72: if (0 > this.test.getSelectedIndex()) { > 73: System.err.println("ERROR: no selection"); > 74: throw new RuntimeException("Combobox not selected"); So this is relying on jtreg to catch exceptions not handled by a thread ? Wouldn't it be better to flag the failure and have it thrown by the main thread ? BTW since all the client tests are run in othervm mode, System.exit() isn't a real problem but it is still fine to fix this. ------------- PR: https://git.openjdk.java.net/jdk/pull/8293 From duke at openjdk.java.net Wed Apr 20 20:07:26 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Wed, 20 Apr 2022 20:07:26 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v3] In-Reply-To: References: <05K-K4EXhEOwcpYe3s-nyiNSQnmIzS_m1fj_tYiRYLw=.f4f04a43-a55a-4835-b0d8-a13e36a2241f@github.com> Message-ID: On Wed, 20 Apr 2022 19:30:49 GMT, Phil Race wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> test summary updated > > test/jdk/javax/swing/JTabbedPane/4209065/bug4209065.java line 55: > >> 53: + "
            the descriptions, press PASS
            " >> 54: + "
            NOTE: the text (tab title) may not always " >> 55: + "fit the tab."; > > How about > NOTE: where a large font is used, the text may be larger than the tab height but this is OK and not a failure. @prrace Sounds more clear. I'm currently working on changing the test case to use PassFailFrame as well and will include this change along with the other changes. ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From duke at openjdk.java.net Wed Apr 20 21:25:26 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Wed, 20 Apr 2022 21:25:26 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v4] In-Reply-To: References: Message-ID: > The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. > > The following approaches were evaluated before considering it as not a test issue - > > - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. > > - Removing existing constraints on text and icon is incompatible for Aqua LAF. > > Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list > > ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) Harshitha Onkar 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 five additional commits since the last revision: - merging master - test summary updated - changed font-size to 3 - expanded imports - JTabbedPane test case changes ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8307/files - new: https://git.openjdk.java.net/jdk/pull/8307/files/521d2790..b1491b12 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8307&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8307&range=02-03 Stats: 9803 lines in 339 files changed: 6702 ins; 1723 del; 1378 mod Patch: https://git.openjdk.java.net/jdk/pull/8307.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8307/head:pull/8307 PR: https://git.openjdk.java.net/jdk/pull/8307 From prr at openjdk.java.net Wed Apr 20 23:20:01 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 20 Apr 2022 23:20:01 GMT Subject: RFR: 8285094: Test java/awt/Frame/InvisibleOwner/InvisibleOwner.java failing on Linux Message-ID: As discussed in https://bugs.openjdk.java.net/browse/JDK-8285094 it seems that the test java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java destabilises the Xserver. This causes java/awt/Frame/InvisibleOwner/InvisibleOwner.java to fail and even before that other tests which do pass are not visibly behaving as expected. I didn't find any Xserver logs of "bad stuff" happening so it just seems like the Xserver was having trouble keeping up and JDK was behaving correctly as it could despite the Xserver sending lots of requests to repaint. Just the "sleep" at the end of GetGraphicsStressTest.java seems to be enough but I'd already reworked InvisibleOwner.java and I'd like to think it is a bit better than before. ------------- Commit messages: - 8285094 - 8285094 Changes: https://git.openjdk.java.net/jdk/pull/8312/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8312&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285094 Stats: 138 lines in 2 files changed: 74 ins; 9 del; 55 mod Patch: https://git.openjdk.java.net/jdk/pull/8312.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8312/head:pull/8312 PR: https://git.openjdk.java.net/jdk/pull/8312 From duke at openjdk.java.net Wed Apr 20 23:38:32 2022 From: duke at openjdk.java.net (lukeu) Date: Wed, 20 Apr 2022 23:38:32 GMT Subject: RFR: 8279614: The left line of the TitledBorder is not painted on 150 scale factor [v8] In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 17:53:24 GMT, Alisen Chung wrote: > Made a small change with the bottom line to match the left line of the border Great, that looks like it'll fix it so I won't test again, I'll defer to the others now for the code review. (I'd be happy to chip in there too, but I'm not sure if "random guy on github" is qualified/authorized to?) ------------- PR: https://git.openjdk.java.net/jdk/pull/7449 From duke at openjdk.java.net Wed Apr 20 23:55:05 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Wed, 20 Apr 2022 23:55:05 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v5] In-Reply-To: References: Message-ID: > The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. > > The following approaches were evaluated before considering it as not a test issue - > > - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. > > - Removing existing constraints on text and icon is incompatible for Aqua LAF. > > Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list > > ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: changed test case to use PassFailJFrame instead of Applet ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8307/files - new: https://git.openjdk.java.net/jdk/pull/8307/files/b1491b12..2fd26ad6 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8307&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8307&range=03-04 Stats: 103 lines in 2 files changed: 38 ins; 51 del; 14 mod Patch: https://git.openjdk.java.net/jdk/pull/8307.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8307/head:pull/8307 PR: https://git.openjdk.java.net/jdk/pull/8307 From duke at openjdk.java.net Wed Apr 20 23:55:08 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Wed, 20 Apr 2022 23:55:08 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v4] In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 21:25:26 GMT, Harshitha Onkar wrote: >> The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. >> >> The following approaches were evaluated before considering it as not a test issue - >> >> - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. >> >> - Removing existing constraints on text and icon is incompatible for Aqua LAF. >> >> Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list >> >> ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) > > Harshitha Onkar 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 five additional commits since the last revision: > > - merging master > - test summary updated > - changed font-size to 3 > - expanded imports > - JTabbedPane test case changes Updated the test case to use `PassFailJFrame` instead of `Applet` and deleted bug4209065.html file used previously by Applet for this test case. ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From psadhukhan at openjdk.java.net Thu Apr 21 04:18:20 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 21 Apr 2022 04:18:20 GMT Subject: RFR: 8284993: Replace System.exit call in swing tests with RuntimeException [v4] In-Reply-To: References: Message-ID: > Few swing tests call System.exit() which might stop the test harness from executing further tests if any of the test fail. We should replace with RuntimeException. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: throw exception in main ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8293/files - new: https://git.openjdk.java.net/jdk/pull/8293/files/2c8508a6..7d49634d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8293&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8293&range=02-03 Stats: 23 lines in 1 file changed: 5 ins; 3 del; 15 mod Patch: https://git.openjdk.java.net/jdk/pull/8293.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8293/head:pull/8293 PR: https://git.openjdk.java.net/jdk/pull/8293 From psadhukhan at openjdk.java.net Thu Apr 21 04:33:24 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 21 Apr 2022 04:33:24 GMT Subject: RFR: 8284993: Replace System.exit call in swing tests with RuntimeException [v3] In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 19:35:24 GMT, Phil Race wrote: >> Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: >> >> Test fix > > test/jdk/javax/swing/JComboBox/8019180/Test8019180.java line 74: > >> 72: if (0 > this.test.getSelectedIndex()) { >> 73: System.err.println("ERROR: no selection"); >> 74: throw new RuntimeException("Combobox not selected"); > > So this is relying on jtreg to catch exceptions not handled by a thread ? > Wouldn't it be better to flag the failure and have it thrown by the main thread ? > > BTW since all the client tests are run in othervm mode, System.exit() isn't a real problem but it is still fine to fix this. modified to throw exception in main ------------- PR: https://git.openjdk.java.net/jdk/pull/8293 From duke at openjdk.java.net Thu Apr 21 07:00:11 2022 From: duke at openjdk.java.net (Maxim Kartashev) Date: Thu, 21 Apr 2022 07:00:11 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v5] In-Reply-To: <6dun2ppw1GHei7MlyCfLlnQ27NsNRSZ5F3Y1kSWrA7E=.08fadf9c-73f4-499e-8b45-f5e3c147bd91@github.com> References: <6dun2ppw1GHei7MlyCfLlnQ27NsNRSZ5F3Y1kSWrA7E=.08fadf9c-73f4-499e-8b45-f5e3c147bd91@github.com> Message-ID: On Fri, 8 Apr 2022 16:20:10 GMT, Phil Race wrote: >> Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision: >> >> Restored the original code in X11GraphicsDevice.java that got auto-formatted > > src/java.desktop/unix/classes/sun/awt/X11/XCanvasPeer.java line 90: > >> 88: getScreenDevices()[screenNum]. >> 89: getDefaultConfiguration(); >> 90: } > > why did you get rid of the just in case ? > Actually why is this method being modified at all ? > I mean besides adding locking .. @prrace polite ping ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From azvegint at openjdk.java.net Thu Apr 21 08:07:52 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Thu, 21 Apr 2022 08:07:52 GMT Subject: RFR: 8225777: java/awt/Mixing/MixingOnDialog.java fails on Ubuntu Message-ID: The test was failing due to it tried to place windows too close to left top corner, so they got shifted from the dock and top panel on Gnome. Shifting all test windows fixes the issue. Testing is green on all platforms. ------------- Commit messages: - initial Changes: https://git.openjdk.java.net/jdk/pull/8326/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8326&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8225777 Stats: 15 lines in 2 files changed: 5 ins; 1 del; 9 mod Patch: https://git.openjdk.java.net/jdk/pull/8326.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8326/head:pull/8326 PR: https://git.openjdk.java.net/jdk/pull/8326 From ihse at openjdk.java.net Thu Apr 21 08:44:15 2022 From: ihse at openjdk.java.net (Magnus Ihse Bursie) Date: Thu, 21 Apr 2022 08:44:15 GMT Subject: RFR: 8285306: Fix typos in java.desktop Message-ID: <5gAPAoRiIJr6BEko1UEaMd3QeUte-snqvfc9eNU2Jgk=.a6d39dcd-0d89-4444-a890-a6c53f41245b@github.com> I ran `codespell` on the `src/java.desktop` directory, and accepted those changes where it indeed discovered real typos. I ignored typos in public methods and variables. Maybe they can be fixed later on without much fanfare, if they are in internal classes. Typos in exposed APIs are likely here to stay. I will update copyright years using a script before pushing (otherwise like every second change would be a copyright update, making reviewing much harder). The long term goal here is to make tooling support for running `codespell`. The trouble with automating this is of course all false positives. But before even trying to solve that issue, all true positives must be fixed. Hence this PR. ------------- Commit messages: - Pass #2 - Pass #1 Changes: https://git.openjdk.java.net/jdk/pull/8328/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8328&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285306 Stats: 1015 lines in 493 files changed: 0 ins; 0 del; 1015 mod Patch: https://git.openjdk.java.net/jdk/pull/8328.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8328/head:pull/8328 PR: https://git.openjdk.java.net/jdk/pull/8328 From psadhukhan at openjdk.java.net Thu Apr 21 08:48:27 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 21 Apr 2022 08:48:27 GMT Subject: RFR: 8285094: Test java/awt/Frame/InvisibleOwner/InvisibleOwner.java failing on Linux In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 04:13:09 GMT, Phil Race wrote: > As discussed in https://bugs.openjdk.java.net/browse/JDK-8285094 it seems that the test > java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java destabilises the Xserver. > This causes java/awt/Frame/InvisibleOwner/InvisibleOwner.java to fail and even before that > other tests which do pass are not visibly behaving as expected. > > I didn't find any Xserver logs of "bad stuff" happening so it just seems like the Xserver was > having trouble keeping up and JDK was behaving correctly as it could despite the Xserver sending > lots of requests to repaint. > > Just the "sleep" at the end of GetGraphicsStressTest.java seems to be enough but I'd already > reworked InvisibleOwner.java and I'd like to think it is a bit better than before. Maybe a Thread.sleep(1000) is also needed after frame.setVisible(true); and also frame.dispose() as test() is called 4 times so we will give time to setup test after frame is visible and frame is disposed at test completion. ------------- PR: https://git.openjdk.java.net/jdk/pull/8312 From aghaisas at openjdk.java.net Thu Apr 21 09:53:28 2022 From: aghaisas at openjdk.java.net (Ajit Ghaisas) Date: Thu, 21 Apr 2022 09:53:28 GMT Subject: RFR: 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill [v3] In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 16:14:12 GMT, Alexey Ushakov wrote: >> Throwing InvalidPipeException for incompatible surfaces > > Alexey Ushakov has updated the pull request incrementally with two additional commits since the last revision: > > - 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill > > Copyright correction > - 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill > > Updated regression test with bugID Marked as reviewed by aghaisas (Committer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8015 From avu at openjdk.java.net Thu Apr 21 10:00:27 2022 From: avu at openjdk.java.net (Alexey Ushakov) Date: Thu, 21 Apr 2022 10:00:27 GMT Subject: Integrated: 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill In-Reply-To: References: Message-ID: On Tue, 29 Mar 2022 10:44:51 GMT, Alexey Ushakov wrote: > Throwing InvalidPipeException for incompatible surfaces This pull request has now been integrated. Changeset: 90983431 Author: Alexey Ushakov URL: https://git.openjdk.java.net/jdk/commit/90983431c5493ea32a983bfe948ec8b32a9a28af Stats: 129 lines in 12 files changed: 19 ins; 67 del; 43 mod 8283794: CCE in XRTextRenderer.drawGlyphList and XRMaskFill.MaskFill Reviewed-by: serb, aghaisas ------------- PR: https://git.openjdk.java.net/jdk/pull/8015 From psadhukhan at openjdk.java.net Thu Apr 21 10:18:30 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 21 Apr 2022 10:18:30 GMT Subject: Withdrawn: 8284646: Some swing test fail in macos12-aarch64 host In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 08:38:43 GMT, Prasanta Sadhukhan wrote: > Few tests are seen to be failing in macos12 M1 system due to slight difference in color as mentioned in [JDK-8277816](https://bugs.openjdk.java.net/browse/JDK-8277816) > > It seems the color difference was around 6-7 for swing tests, so these tests are extracted out in this issue and fixed by adding tolerance. > I could not find, in M1 osx12.3 SystemPreferences, any way to set Color Profile to sRGB IEC61966-2.1 Profile so it seems osx12.x M1 use default setting. > > Several runs in CI system in all platforms including 12.x M1 pass with this change (test job link in JBS) This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.java.net/jdk/pull/8176 From psadhukhan at openjdk.java.net Thu Apr 21 10:19:26 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 21 Apr 2022 10:19:26 GMT Subject: Integrated: 8277816: Client tests fail on macos-Aarch64 host In-Reply-To: References: Message-ID: <9Hgo3ybRynwB19Hrv8Kfh3IwWA4XO265nYoZ8m2adcU=.81e88e02-7691-4707-8de4-be1e7c17ed6e@github.com> On Wed, 13 Apr 2022 07:40:50 GMT, Prasanta Sadhukhan wrote: > This tests was failing on macos12 M1 systems due to wrong color profile configurations set in CI systems. > If correct sRGB IEC61966-2.1 is set, then these test passed. Test job link in JBS.. > > So, removing from Problem list.. This pull request has now been integrated. Changeset: 994a439e Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/994a439e09c48100fc56b4eeccd85da1d1d2b4c3 Stats: 8 lines in 1 file changed: 0 ins; 8 del; 0 mod 8277816: Client tests fail on macos-Aarch64 host Reviewed-by: serb, azvegint ------------- PR: https://git.openjdk.java.net/jdk/pull/8216 From jpai at openjdk.java.net Thu Apr 21 10:44:04 2022 From: jpai at openjdk.java.net (Jaikiran Pai) Date: Thu, 21 Apr 2022 10:44:04 GMT Subject: Integrated: 8285361: ClassCastExceptionForInvalidSurface.java has an incorrect copyright header Message-ID: Can I please get a review for this trivial fix to the copyright header? ------------- Commit messages: - fix copyright header Changes: https://git.openjdk.java.net/jdk/pull/8331/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8331&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285361 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8331.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8331/head:pull/8331 PR: https://git.openjdk.java.net/jdk/pull/8331 From dholmes at openjdk.java.net Thu Apr 21 10:44:04 2022 From: dholmes at openjdk.java.net (David Holmes) Date: Thu, 21 Apr 2022 10:44:04 GMT Subject: Integrated: 8285361: ClassCastExceptionForInvalidSurface.java has an incorrect copyright header In-Reply-To: References: Message-ID: <3ExofbybIF7AKsJLur7V6cJOFEubG-8teJCHzjwq5tI=.c7c9a7ae-e17c-4ef5-959d-c6158e8ce928@github.com> On Thu, 21 Apr 2022 10:34:42 GMT, Jaikiran Pai wrote: > Can I please get a review for this trivial fix to the copyright header? Thanks for fixing. ------------- Marked as reviewed by dholmes (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8331 From jpai at openjdk.java.net Thu Apr 21 10:44:04 2022 From: jpai at openjdk.java.net (Jaikiran Pai) Date: Thu, 21 Apr 2022 10:44:04 GMT Subject: Integrated: 8285361: ClassCastExceptionForInvalidSurface.java has an incorrect copyright header In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 10:34:42 GMT, Jaikiran Pai wrote: > Can I please get a review for this trivial fix to the copyright header? Thank you David for the quick review. (Given the trivial nature of this fix and the fact that tier1 testing failed without this change, going ahead with the integration without waiting for additional reviews) ------------- PR: https://git.openjdk.java.net/jdk/pull/8331 From jpai at openjdk.java.net Thu Apr 21 10:44:04 2022 From: jpai at openjdk.java.net (Jaikiran Pai) Date: Thu, 21 Apr 2022 10:44:04 GMT Subject: Integrated: 8285361: ClassCastExceptionForInvalidSurface.java has an incorrect copyright header In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 10:34:42 GMT, Jaikiran Pai wrote: > Can I please get a review for this trivial fix to the copyright header? This pull request has now been integrated. Changeset: 9a905ccc Author: Jaikiran Pai URL: https://git.openjdk.java.net/jdk/commit/9a905ccc5e6411c3b68277b58e7c40b405e33afc Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod 8285361: ClassCastExceptionForInvalidSurface.java has an incorrect copyright header Reviewed-by: dholmes ------------- PR: https://git.openjdk.java.net/jdk/pull/8331 From smandalika at openjdk.java.net Thu Apr 21 10:58:06 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Thu, 21 Apr 2022 10:58:06 GMT Subject: RFR: 8285305: Create an automated test for JDK-4495286 Message-ID: Create an automated test for [JDK-4495286](https://bugs.openjdk.java.net/browse/JDK-4495286) AccessibleJTable.setAccessibleSelction should select rows/cols when cell selection. When cell selection is not enabled, there is no way, using accessibility, to select rows or columns. It seems logical that selecting a cell using accessibility should have the same effect as clicking on a cell with the mouse. That is, if row or column selection is enabled, then selecting a cell should instead cause the row or column to be selected. The proposed test verifies that the above behavior is fixed. This review is for migrating tests from a closed test suite to open. Testing: The test ran successfully on Mach5 with multiple runs (40) on windows-x64, linux-x64 and macos-x64. ------------- Commit messages: - 8285305: Create an automated test for JDK-4495286 Changes: https://git.openjdk.java.net/jdk/pull/8333/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8333&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285305 Stats: 174 lines in 1 file changed: 174 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8333.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8333/head:pull/8333 PR: https://git.openjdk.java.net/jdk/pull/8333 From dbatrak at openjdk.java.net Thu Apr 21 11:27:29 2022 From: dbatrak at openjdk.java.net (Dmitry Batrak) Date: Thu, 21 Apr 2022 11:27:29 GMT Subject: RFR: 8273506: java Robot API did the 'm' keypress and caused /awt/event/KeyEvent/KeyCharTest/KeyCharTest.html is timing out on macOS 12 In-Reply-To: References: Message-ID: <-INTLEgzMkhahnEFU5otsJpsxIX-4ZLtWWNo18-O9vI=.b23dc777-0774-4578-8105-e9496fca3b37@github.com> On Wed, 20 Apr 2022 17:04:09 GMT, Alexander Zuev wrote: > Clear the kCGEventFlagMaskSecondaryFn flag if it is set before posting keyboard events to the system queue. I assumed that whatever keys we set on an event being posted using `CGEventPost`, are delivered unchanged to the 'receiving' applications. But I did a test, and that doesn't seem to be the case. You're right, Quartz (or some other subsystem) does set those flags before delivering the events. Sorry for the noise. Interestingly, extending the fix to NumPad flag (that 'sticks' in the global state similarly) doesn't work in the same way - the flag isn't being added automatically for arrow keys' KeyUp event by Quartz, but that's out of scope. ------------- PR: https://git.openjdk.java.net/jdk/pull/8320 From azvegint at openjdk.java.net Thu Apr 21 13:08:28 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Thu, 21 Apr 2022 13:08:28 GMT Subject: Integrated: 8023814: Test java/awt/im/memoryleak/InputContextMemoryLeakTest.java fails In-Reply-To: References: Message-ID: <3wIRV8luNUdvlze89MOJq19pumBvwGwoqprSsbosH4g=.b4d28fc9-43ce-4271-b17d-c7141aefaa31@github.com> On Tue, 19 Apr 2022 11:48:10 GMT, Alexander Zvegintsev wrote: > Removing the test from problem list, since I am unable to reproduce the issue even with old Ubuntu distros with jdk8. > Bug filed against Solaris initially, but I did not test on it, since it is no longer supported. > > Multiple mach5 testing is green. > > `dispose` added for convenience if test is executed without jtreg. This pull request has now been integrated. Changeset: 42baaa3b Author: Alexander Zvegintsev URL: https://git.openjdk.java.net/jdk/commit/42baaa3bb8f240c04e85598d971597ae87c355b6 Stats: 9 lines in 2 files changed: 5 ins; 2 del; 2 mod 8023814: Test java/awt/im/memoryleak/InputContextMemoryLeakTest.java fails Reviewed-by: psadhukhan ------------- PR: https://git.openjdk.java.net/jdk/pull/8295 From azvegint at openjdk.java.net Thu Apr 21 13:31:00 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Thu, 21 Apr 2022 13:31:00 GMT Subject: RFR: 8129778: Few awt test fail for Solaris 11 with RuntimeException Message-ID: Those tests were failing on Solaris, which is no longer supported. They pass as they are, but decreasing of delays reduce execution time significantly: e.g. proposed changes drops execution time from ~5min to ~2 min for MouseButtonsAndKeyMasksTest on my machine. Testing is green on all platforms. ------------- Commit messages: - initial Changes: https://git.openjdk.java.net/jdk/pull/8339/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8339&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8129778 Stats: 44 lines in 4 files changed: 22 ins; 6 del; 16 mod Patch: https://git.openjdk.java.net/jdk/pull/8339.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8339/head:pull/8339 PR: https://git.openjdk.java.net/jdk/pull/8339 From azvegint at openjdk.java.net Thu Apr 21 14:48:26 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Thu, 21 Apr 2022 14:48:26 GMT Subject: RFR: 8285094: Test java/awt/Frame/InvisibleOwner/InvisibleOwner.java failing on Linux In-Reply-To: References: Message-ID: <4cb8q0W_V5_LF_wk_MkwVBGTfN_LcwQ0VZKKDzhdr48=.ba51c584-0460-4392-afd2-519d625078bf@github.com> On Wed, 20 Apr 2022 04:13:09 GMT, Phil Race wrote: > As discussed in https://bugs.openjdk.java.net/browse/JDK-8285094 it seems that the test > java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java destabilises the Xserver. > This causes java/awt/Frame/InvisibleOwner/InvisibleOwner.java to fail and even before that > other tests which do pass are not visibly behaving as expected. > > I didn't find any Xserver logs of "bad stuff" happening so it just seems like the Xserver was > having trouble keeping up and JDK was behaving correctly as it could despite the Xserver sending > lots of requests to repaint. > > Just the "sleep" at the end of GetGraphicsStressTest.java seems to be enough but I'd already > reworked InvisibleOwner.java and I'd like to think it is a bit better than before. test/jdk/java/awt/Frame/InvisibleOwner/InvisibleOwner.java line 35: > 33: import java.awt.EventQueue; > 34: import java.awt.Frame; > 35: import java.awt.Graphics; Unused import test/jdk/java/awt/Frame/InvisibleOwner/InvisibleOwner.java line 135: > 133: ownedWindowBounds.y + ownedWindowBounds.height / 2); > 134: robot.mousePress(InputEvent.BUTTON1_MASK); > 135: robot.mouseRelease(InputEvent.BUTTON1_MASK); Nit: Shouldn't we use BUTTON1_DOWN_MASK instead of deprecated BUTTON1_MASK? ------------- PR: https://git.openjdk.java.net/jdk/pull/8312 From prr at openjdk.java.net Thu Apr 21 15:23:31 2022 From: prr at openjdk.java.net (Phil Race) Date: Thu, 21 Apr 2022 15:23:31 GMT Subject: RFR: 8285094: Test java/awt/Frame/InvisibleOwner/InvisibleOwner.java failing on Linux [v2] In-Reply-To: References: Message-ID: <1FY4ypDIGUN3Hkz3R8hN6zyJonmrErTzUlU50bijZtw=.7ea435d2-6268-4454-9c58-e98fca7c8c20@github.com> > As discussed in https://bugs.openjdk.java.net/browse/JDK-8285094 it seems that the test > java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java destabilises the Xserver. > This causes java/awt/Frame/InvisibleOwner/InvisibleOwner.java to fail and even before that > other tests which do pass are not visibly behaving as expected. > > I didn't find any Xserver logs of "bad stuff" happening so it just seems like the Xserver was > having trouble keeping up and JDK was behaving correctly as it could despite the Xserver sending > lots of requests to repaint. > > Just the "sleep" at the end of GetGraphicsStressTest.java seems to be enough but I'd already > reworked InvisibleOwner.java and I'd like to think it is a bit better than before. Phil Race has updated the pull request incrementally with one additional commit since the last revision: 8285094 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8312/files - new: https://git.openjdk.java.net/jdk/pull/8312/files/d6ab588b..160b4eae Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8312&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8312&range=00-01 Stats: 3 lines in 1 file changed: 0 ins; 1 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8312.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8312/head:pull/8312 PR: https://git.openjdk.java.net/jdk/pull/8312 From prr at openjdk.java.net Thu Apr 21 15:26:24 2022 From: prr at openjdk.java.net (Phil Race) Date: Thu, 21 Apr 2022 15:26:24 GMT Subject: RFR: 8285094: Test java/awt/Frame/InvisibleOwner/InvisibleOwner.java failing on Linux [v2] In-Reply-To: References: Message-ID: <7Zl6pvBm-f2AI6Zce-Krcqspb-eC5myP-DBCQAIYiHI=.0542f161-427c-43db-badf-817d56e94922@github.com> On Thu, 21 Apr 2022 08:45:14 GMT, Prasanta Sadhukhan wrote: > Maybe a Thread.sleep(1000) is also needed after frame.setVisible(true); and also frame.dispose() as test() is called 4 times so we will give time to setup test after frame is visible and frame is disposed at test completion. I did not find this to be necessary. As I wrote putting a sleep at the beginning of InvisibleOwner also cures this so I am sure it is just a matter of letting things settle down AFTER the test. ------------- PR: https://git.openjdk.java.net/jdk/pull/8312 From prr at openjdk.java.net Thu Apr 21 15:26:25 2022 From: prr at openjdk.java.net (Phil Race) Date: Thu, 21 Apr 2022 15:26:25 GMT Subject: RFR: 8285094: Test java/awt/Frame/InvisibleOwner/InvisibleOwner.java failing on Linux [v2] In-Reply-To: <4cb8q0W_V5_LF_wk_MkwVBGTfN_LcwQ0VZKKDzhdr48=.ba51c584-0460-4392-afd2-519d625078bf@github.com> References: <4cb8q0W_V5_LF_wk_MkwVBGTfN_LcwQ0VZKKDzhdr48=.ba51c584-0460-4392-afd2-519d625078bf@github.com> Message-ID: On Thu, 21 Apr 2022 14:42:03 GMT, Alexander Zvegintsev wrote: >> Phil Race has updated the pull request incrementally with one additional commit since the last revision: >> >> 8285094 > > test/jdk/java/awt/Frame/InvisibleOwner/InvisibleOwner.java line 135: > >> 133: ownedWindowBounds.y + ownedWindowBounds.height / 2); >> 134: robot.mousePress(InputEvent.BUTTON1_MASK); >> 135: robot.mouseRelease(InputEvent.BUTTON1_MASK); > > Nit: Shouldn't we use BUTTON1_DOWN_MASK instead of deprecated BUTTON1_MASK? That is how it was before but I fixed this. ------------- PR: https://git.openjdk.java.net/jdk/pull/8312 From duke at openjdk.java.net Thu Apr 21 15:31:25 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Thu, 21 Apr 2022 15:31:25 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v3] In-Reply-To: References: <05K-K4EXhEOwcpYe3s-nyiNSQnmIzS_m1fj_tYiRYLw=.f4f04a43-a55a-4835-b0d8-a13e36a2241f@github.com> Message-ID: <14AUPNhYs2AU7VnJU-0jZMxK2EjwJWIf2Bn5t3w9oJ0=.5b8bd7b2-2380-404f-bdaf-8585d9bdda1e@github.com> On Wed, 20 Apr 2022 19:30:49 GMT, Phil Race wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> test summary updated > > test/jdk/javax/swing/JTabbedPane/4209065/bug4209065.java line 55: > >> 53: + "
            the descriptions, press PASS
            " >> 54: + "
            NOTE: the text (tab title) may not always " >> 55: + "fit the tab."; > > How about > NOTE: where a large font is used, the text may be larger than the tab height but this is OK and not a failure. @prrace @prsadhuk This PR might require a re-review since the test case has new changes. ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From duke at openjdk.java.net Thu Apr 21 15:37:28 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Thu, 21 Apr 2022 15:37:28 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v8] In-Reply-To: References: <7ot0fBLQsvKiNsxLdrbnv4R_MNr6qdLN_GBwNPjU-rY=.dcad59a1-d0d6-42b9-bdf4-6290f31a88e0@github.com> Message-ID: On Mon, 11 Apr 2022 07:06:59 GMT, Prasanta Sadhukhan wrote: >> @prsadhuk Update PR with the recommended changes. The "controlAccentColor" changes works as expected in Mac 12.3 as well. >> One thing that I wanted to clarify with the fix is - the focus ring color ("Focus.ring") is used at two other places AquaButtonUI and AquaFocus (for focused icon). With the current fix I'm setting **KEYBOARD_FOCUS_COLOR** as below - >> >> image >> >> Before and After images of focused icon - >> >> **Before** >> >> image >> >> **After (focus around icon slightly darker - focus ring color obtained from controlAccentColor property)** >> >> image >> >> Please let me know in case I need to add a NEW color (as shown below) instead of reusing the KEYBOARD_FOCUS_COLOR if the color effects on focused icon/ button doesn't look correct. >> >> image > > It seems KEYBOARD_FOCUS_COLOR via `focusRingColor` is also used for menuSelectedBackgroundColor which is used for > > CheckBoxMenuItem.selectionBackground > ComboBox.selectionBackground > Menu.selectionBackground > MenuBar.selectionBackground > MenuItem.selectionBackground > "PopupMenu.selectionBackground", menuSelectedBackgroundColor, > RadioButtonMenuItem.selectionBackground > > which might also get affected if you use new property, so you need to test all those widgets if you intend to use reuse KEYBOARD_FOCUS_COLOR so I guess safe bet is to use new color as you mentioned to limit the change to highlight color. @prsadhuk With the new changes a public method is added to AquaImageFactory, does this require a CSR? ------------- PR: https://git.openjdk.java.net/jdk/pull/7768 From psadhukhan at openjdk.java.net Thu Apr 21 16:22:29 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 21 Apr 2022 16:22:29 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v5] In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 23:55:05 GMT, Harshitha Onkar wrote: >> The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. >> >> The following approaches were evaluated before considering it as not a test issue - >> >> - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. >> >> - Removing existing constraints on text and icon is incompatible for Aqua LAF. >> >> Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list >> >> ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > changed test case to use PassFailJFrame instead of Applet test/jdk/javax/swing/JTabbedPane/4209065/bug4209065.java line 51: > 49: tab height but this is OK and NOT a failure. > 50: """; > 51: looks ok in jtreg but standalone execution in my windows fails with this String initialization. Probably we can do normal string with "+" as continuation instead of """ literal javac bug4209065.java bug4209065.java:44: error: unclosed string literal private static final String text = """ ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From psadhukhan at openjdk.java.net Thu Apr 21 16:32:36 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 21 Apr 2022 16:32:36 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v8] In-Reply-To: References: <7ot0fBLQsvKiNsxLdrbnv4R_MNr6qdLN_GBwNPjU-rY=.dcad59a1-d0d6-42b9-bdf4-6290f31a88e0@github.com> Message-ID: On Thu, 21 Apr 2022 15:34:05 GMT, Harshitha Onkar wrote: >> It seems KEYBOARD_FOCUS_COLOR via `focusRingColor` is also used for menuSelectedBackgroundColor which is used for >> >> CheckBoxMenuItem.selectionBackground >> ComboBox.selectionBackground >> Menu.selectionBackground >> MenuBar.selectionBackground >> MenuItem.selectionBackground >> "PopupMenu.selectionBackground", menuSelectedBackgroundColor, >> RadioButtonMenuItem.selectionBackground >> >> which might also get affected if you use new property, so you need to test all those widgets if you intend to use reuse KEYBOARD_FOCUS_COLOR so I guess safe bet is to use new color as you mentioned to limit the change to highlight color. > > @prsadhuk With the new changes a public method is added to AquaImageFactory, does this require a CSR? If you are talking about getCellHighlightColorUIResource() then no. We don't have specs for this class. I have added similar getSelectedControlColorUIResource method for JDK-8251377 without CSR ------------- PR: https://git.openjdk.java.net/jdk/pull/7768 From duke at openjdk.java.net Thu Apr 21 16:33:30 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Thu, 21 Apr 2022 16:33:30 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v5] In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 16:18:46 GMT, Prasanta Sadhukhan wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> changed test case to use PassFailJFrame instead of Applet > > test/jdk/javax/swing/JTabbedPane/4209065/bug4209065.java line 51: > >> 49: tab height but this is OK and NOT a failure. >> 50: """; >> 51: > > looks ok in jtreg but standalone execution in my windows fails with this String initialization. Probably we can do normal string with "+" as continuation instead of """ literal > > > javac bug4209065.java > bug4209065.java:44: error: unclosed string literal > private static final String text = """ @prsadhuk Thanks for catching it. I'll make the required changes. ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From duke at openjdk.java.net Thu Apr 21 16:37:41 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Thu, 21 Apr 2022 16:37:41 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v8] In-Reply-To: References: <7ot0fBLQsvKiNsxLdrbnv4R_MNr6qdLN_GBwNPjU-rY=.dcad59a1-d0d6-42b9-bdf4-6290f31a88e0@github.com> Message-ID: On Thu, 21 Apr 2022 16:28:53 GMT, Prasanta Sadhukhan wrote: >> @prsadhuk With the new changes a public method is added to AquaImageFactory, does this require a CSR? > > If you are talking about getCellHighlightColorUIResource() then no. We don't have specs for this class. > I have added similar getSelectedControlColorUIResource method for JDK-8251377 without CSR @prsadhuk Thank you! Noted. Yes, it is the`getCellHighlightColorUIResource()` method. ------------- PR: https://git.openjdk.java.net/jdk/pull/7768 From prr at openjdk.java.net Thu Apr 21 17:25:07 2022 From: prr at openjdk.java.net (Phil Race) Date: Thu, 21 Apr 2022 17:25:07 GMT Subject: RFR: 8284965: closed test sun/java2d/OpenGL/XORPaint.java is unstable Message-ID: This fix moves a closed test to open but updated to be more comprehensive in testing multiple pipelines and with some stabilisation improvements. ------------- Commit messages: - 8284965 Changes: https://git.openjdk.java.net/jdk/pull/8345/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8345&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284965 Stats: 239 lines in 1 file changed: 239 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8345.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8345/head:pull/8345 PR: https://git.openjdk.java.net/jdk/pull/8345 From duke at openjdk.java.net Thu Apr 21 17:31:06 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Thu, 21 Apr 2022 17:31:06 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v6] In-Reply-To: References: Message-ID: > The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. > > The following approaches were evaluated before considering it as not a test issue - > > - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. > > - Removing existing constraints on text and icon is incompatible for Aqua LAF. > > Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list > > ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: removed triple quotes ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8307/files - new: https://git.openjdk.java.net/jdk/pull/8307/files/2fd26ad6..09109ab3 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8307&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8307&range=04-05 Stats: 7 lines in 1 file changed: 0 ins; 2 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/8307.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8307/head:pull/8307 PR: https://git.openjdk.java.net/jdk/pull/8307 From azvegint at openjdk.java.net Thu Apr 21 17:54:48 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Thu, 21 Apr 2022 17:54:48 GMT Subject: RFR: 8193543: Regression automated test '/open/test/jdk/java/awt/TrayIcon/SystemTrayInstance/SystemTrayInstanceTest.java' fails Message-ID: <6S1J2MYhxOU4Gt_H5xTetVR0pkrM7iIlLfkOf9mlo_g=.ccdbb91e-16b1-4982-85d8-27e6a2754939@github.com> Looks like this test was written based on assumption that SystemTray is supported on all platforms. However on Linux it may not be true. Availability of SystemTray is detected by getting owner of `_NET_SYSTEM_TRAY` selection: https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.desktop/unix/classes/sun/awt/X11/XSystemTrayPeer.java#L42 https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.desktop/unix/classes/sun/awt/X11/XSystemTrayPeer.java#L58-L59 As an example, SystemTray is not available on Wayland because of this. So I modified the test: - WIndows and macOS: expecting SystemTray. - Linux: check absence/presence of `UnsupportedOperationException` exception of `SystemTray.getSystemTray()` call based on `SystemTray.isSupported()` result. ------------- Commit messages: - initial Changes: https://git.openjdk.java.net/jdk/pull/8346/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8346&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8193543 Stats: 29 lines in 2 files changed: 14 ins; 2 del; 13 mod Patch: https://git.openjdk.java.net/jdk/pull/8346.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8346/head:pull/8346 PR: https://git.openjdk.java.net/jdk/pull/8346 From azvegint at openjdk.java.net Thu Apr 21 18:05:26 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Thu, 21 Apr 2022 18:05:26 GMT Subject: RFR: 8285094: Test java/awt/Frame/InvisibleOwner/InvisibleOwner.java failing on Linux [v2] In-Reply-To: References: <4cb8q0W_V5_LF_wk_MkwVBGTfN_LcwQ0VZKKDzhdr48=.ba51c584-0460-4392-afd2-519d625078bf@github.com> Message-ID: On Thu, 21 Apr 2022 15:23:31 GMT, Phil Race wrote: >> test/jdk/java/awt/Frame/InvisibleOwner/InvisibleOwner.java line 135: >> >>> 133: ownedWindowBounds.y + ownedWindowBounds.height / 2); >>> 134: robot.mousePress(InputEvent.BUTTON1_MASK); >>> 135: robot.mouseRelease(InputEvent.BUTTON1_MASK); >> >> Nit: Shouldn't we use BUTTON1_DOWN_MASK instead of deprecated BUTTON1_MASK? > > That is how it was before but I fixed this. Thought that we are cleaning up such deprecated things. There is another place with BUTTON1_MASK below though. ------------- PR: https://git.openjdk.java.net/jdk/pull/8312 From kizune at openjdk.java.net Thu Apr 21 18:50:16 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Thu, 21 Apr 2022 18:50:16 GMT Subject: RFR: 8273506: java Robot API did the 'm' keypress and caused /awt/event/KeyEvent/KeyCharTest/KeyCharTest.html is timing out on macOS 12 [v2] In-Reply-To: References: Message-ID: <33wbZN4ZDtQ564BCCatIOTX2sVRXi308jFUzKbKOaVE=.4ecfdde4-74ed-4319-bf86-492c3e47a32b@github.com> > Clear the kCGEventFlagMaskSecondaryFn flag if it is set before posting keyboard events to the system queue. Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: Adding test case. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8320/files - new: https://git.openjdk.java.net/jdk/pull/8320/files/94dd52e3..1be2fc50 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8320&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8320&range=00-01 Stats: 100 lines in 1 file changed: 100 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8320.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8320/head:pull/8320 PR: https://git.openjdk.java.net/jdk/pull/8320 From aivanov at openjdk.java.net Thu Apr 21 19:19:29 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 21 Apr 2022 19:19:29 GMT Subject: RFR: 8284189: Replace usages of 'a the' in java.desktop [v2] In-Reply-To: References: Message-ID: <4iPpfwXvVnyAqi9GYaEUQJA2MCRAhrB872z5X4hfhN4=.c625d459-56e8-485d-8dd3-3e0f9b0bbd81@github.com> On Mon, 18 Apr 2022 16:31:15 GMT, Phil Race wrote: > Note that even though API javadoc is touched all these typos fall well below the threshold for a CSR? That was my understanding. Thank you for confirming it. ------------- PR: https://git.openjdk.java.net/jdk/pull/8274 From aivanov at openjdk.java.net Thu Apr 21 19:19:30 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 21 Apr 2022 19:19:30 GMT Subject: Integrated: 8284189: Replace usages of 'a the' in java.desktop In-Reply-To: References: Message-ID: On Sat, 16 Apr 2022 17:45:16 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? > > I fixed a couple of other spelling mistakes. > > I also expanded wildcard imports. This pull request has now been integrated. Changeset: ec4fb47b Author: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/ec4fb47b90c9737dfdc285ebe98367a221c90c79 Stats: 387 lines in 39 files changed: 196 ins; 46 del; 145 mod 8284189: Replace usages of 'a the' in java.desktop Reviewed-by: jdv, prr, dmarkov ------------- PR: https://git.openjdk.java.net/jdk/pull/8274 From achung at openjdk.java.net Thu Apr 21 20:00:55 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Thu, 21 Apr 2022 20:00:55 GMT Subject: RFR: 7080150: [TEST_BUG][macosx] No mac os x EmbeddedFrame support in regression regtesthelpers Message-ID: added EmbeddedFrame support for macosx in regtesthelpers ------------- Commit messages: - Merge branch 'master' into 7080150 - removed from ProblemList.txt - added macos EmbeddedFrame support to AWT regtesthelpers Changes: https://git.openjdk.java.net/jdk/pull/8348/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8348&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-7080150 Stats: 7 lines in 2 files changed: 6 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8348.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8348/head:pull/8348 PR: https://git.openjdk.java.net/jdk/pull/8348 From achung at openjdk.java.net Thu Apr 21 20:07:17 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Thu, 21 Apr 2022 20:07:17 GMT Subject: RFR: 7080150: [TEST_BUG][macosx] No mac os x EmbeddedFrame support in regression regtesthelpers [v2] In-Reply-To: References: Message-ID: > added EmbeddedFrame support for macosx in regtesthelpers Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: - Merge branch '7080150' of github.com:alisenchung/jdk into 7080150 - fixed merge conflict ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8348/files - new: https://git.openjdk.java.net/jdk/pull/8348/files/9570e351..39f6490b Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8348&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8348&range=00-01 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8348.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8348/head:pull/8348 PR: https://git.openjdk.java.net/jdk/pull/8348 From tnakamura at openjdk.java.net Fri Apr 22 00:33:44 2022 From: tnakamura at openjdk.java.net (Toshio Nakamura) Date: Fri, 22 Apr 2022 00:33:44 GMT Subject: RFR: 8285308: Win: Japanese logical fonts are drawn with wrong size Message-ID: Japanese logical fonts are drawn with wrong size since Java 18. It's triggered by JEP 400, UTF-8 by Default. `sun.awt.FontConfiguration` (and `sun.awt.windows.WFontConfiguration`) seems to expect the native encoding instead of the default encoding. This patch changes to use native encoding. Tested: jdk_desktop on Windows, Linux, and macOS ------------- Commit messages: - 8285308: Win: Japanese logical fonts are drawn with wrong size Changes: https://git.openjdk.java.net/jdk/pull/8329/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8329&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285308 Stats: 5 lines in 1 file changed: 3 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8329.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8329/head:pull/8329 PR: https://git.openjdk.java.net/jdk/pull/8329 From prr at openjdk.java.net Fri Apr 22 03:27:25 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 22 Apr 2022 03:27:25 GMT Subject: RFR: 8285308: Win: Japanese logical fonts are drawn with wrong size In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 09:14:14 GMT, Toshio Nakamura wrote: > Japanese logical fonts are drawn with wrong size since Java 18. > It's triggered by JEP 400, UTF-8 by Default. `sun.awt.FontConfiguration` (and `sun.awt.windows.WFontConfiguration`) seems to expect the native encoding instead of the default encoding. This patch changes to use native encoding. > > Tested: jdk_desktop on Windows, Linux, and macOS Hmm. I am surprised that the glyphs are actually bigger. Did you come to understand the exact mechanism (steps) by which this triggers the wrong size ? Without that explanation it isn't apparent to me we've understood the problem even if this fixes it. And whilst you tested linux & mac it is a shared code change so it is another reason to understand .. And are you sure you can't write a test ? Even something that uses heuristics around the metrics ? ------------- PR: https://git.openjdk.java.net/jdk/pull/8329 From psadhukhan at openjdk.java.net Fri Apr 22 04:00:10 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 22 Apr 2022 04:00:10 GMT Subject: RFR: 8284993: Replace System.exit call in swing tests with RuntimeException [v5] In-Reply-To: References: Message-ID: > Few swing tests call System.exit() which might stop the test harness from executing further tests if any of the test fail. We should replace with RuntimeException. Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: whitespace fix ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8293/files - new: https://git.openjdk.java.net/jdk/pull/8293/files/7d49634d..95567d23 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8293&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8293&range=03-04 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8293.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8293/head:pull/8293 PR: https://git.openjdk.java.net/jdk/pull/8293 From psadhukhan at openjdk.java.net Fri Apr 22 05:10:16 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 22 Apr 2022 05:10:16 GMT Subject: RFR: 8129827: [TEST_BUG] Test java/awt/Robot/RobotWheelTest/RobotWheelTest.java fails In-Reply-To: References: Message-ID: On Tue, 19 Apr 2022 20:03:57 GMT, Alexander Zvegintsev wrote: > Test was written based on assumption that we will receive only one `mouseWheelMoved` event with `getWheelRotation() == 20` after `robot.mouseWheel(20)` call, but we can receive 20 events with `getWheelRotation == 1` instead. > > So the test is modified to accumulate wheel rotation values before checking. > > Testing is green on all platforms. test/jdk/java/awt/Robot/RobotWheelTest/RobotWheelTest.java line 47: > 45: > 46: private static AtomicInteger wheelRotation = new AtomicInteger(); > 47: private static int wheelSign = Platform.isOSX() ? -1 : 1; Is this the scroll rotation direction? If it is, then as you can see in JDK-8282716 review comments, this direction can be configured so we cannot rely on this it will always be -1 for macos... Maybe you can do the same as it is done there to check at runtime what is the scroll direction configured? ------------- PR: https://git.openjdk.java.net/jdk/pull/8305 From psadhukhan at openjdk.java.net Fri Apr 22 05:20:18 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 22 Apr 2022 05:20:18 GMT Subject: RFR: 8225777: java/awt/Mixing/MixingOnDialog.java fails on Ubuntu In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 07:58:39 GMT, Alexander Zvegintsev wrote: > The test was failing due to it tried to place windows too close to left top corner, so they got shifted from the dock and top panel on Gnome. > > Shifting all test windows fixes the issue. > > > Testing is green on all platforms. Is it possible to remove the obsolete "Standard Test Machinery Section" which we have removed from other tests? ------------- PR: https://git.openjdk.java.net/jdk/pull/8326 From kizune at openjdk.java.net Fri Apr 22 06:16:04 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Fri, 22 Apr 2022 06:16:04 GMT Subject: RFR: 8196367: java/awt/List/SingleModeDeselect/SingleModeDeselect.java times out Message-ID: Clean up imports; Close and dispose frame before exiting the test; ------------- Commit messages: - Remove test from the ProblemList - 8196367: java/awt/List/SingleModeDeselect/SingleModeDeselect.java times out Changes: https://git.openjdk.java.net/jdk/pull/8351/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8351&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8196367 Stats: 20 lines in 2 files changed: 9 ins; 4 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/8351.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8351/head:pull/8351 PR: https://git.openjdk.java.net/jdk/pull/8351 From smandalika at openjdk.java.net Fri Apr 22 06:37:08 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Fri, 22 Apr 2022 06:37:08 GMT Subject: RFR: 8285373: Create an automated test for JDK-4702233 Message-ID: Create an automated test for [JDK-4702233](https://bugs.openjdk.java.net/browse/JDK-4702233) Several new AccessibleRole and AccessibleRelation constants are needed in those classes in the java.accessibility package. These new contants codify additions made in the GNOME, Netscape, and UNO (StarOffice) accessibility APIs. StarOffice 6.1 and GNOME accessibility require new role, state and relation constants in the javax.accessibility package. The existing constants are inadequate for providing accessibility to StarOffice and GNOME applications as required by Section 508. Solution -------- Define new constants in the javax.accessibility package. AccessibleRelation AccessibleRoles AccessibleState AccessibleAction AccessibleContext The test validates the public fields of the above AccessibleConstants. This review is for migrating tests from a closed test suite to open. Testing: The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. ------------- Commit messages: - 8285373: Create an automated test for JDK-4702233 Changes: https://git.openjdk.java.net/jdk/pull/8342/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8342&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285373 Stats: 387 lines in 6 files changed: 387 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8342.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8342/head:pull/8342 PR: https://git.openjdk.java.net/jdk/pull/8342 From psadhukhan at openjdk.java.net Fri Apr 22 06:48:28 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 22 Apr 2022 06:48:28 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v5] In-Reply-To: References: Message-ID: <_UHIfMMCOOxGYhiLHw-J2ZBCz5trAaQLrYmtmkYgihw=.74272360-b9e8-4475-93b0-7291e6afbbd1@github.com> On Thu, 21 Apr 2022 16:30:20 GMT, Harshitha Onkar wrote: >> test/jdk/javax/swing/JTabbedPane/4209065/bug4209065.java line 51: >> >>> 49: tab height but this is OK and NOT a failure. >>> 50: """; >>> 51: >> >> looks ok in jtreg but standalone execution in my windows fails with this String initialization. Probably we can do normal string with "+" as continuation instead of """ literal >> >> >> javac bug4209065.java >> bug4209065.java:44: error: unclosed string literal >> private static final String text = """ > > @prsadhuk Thanks for catching it. I'll make the required changes. SInce you are hardcoding PassFailFrame column to 35, it seems some word break is not perfect in the above instructions. Probably, you can put \n break at appropriate positions in NOTE to show better. ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From psadhukhan at openjdk.java.net Fri Apr 22 06:51:29 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 22 Apr 2022 06:51:29 GMT Subject: Integrated: 8284993: Replace System.exit call in swing tests with RuntimeException In-Reply-To: References: Message-ID: On Tue, 19 Apr 2022 09:10:30 GMT, Prasanta Sadhukhan wrote: > Few swing tests call System.exit() which might stop the test harness from executing further tests if any of the test fail. We should replace with RuntimeException. This pull request has now been integrated. Changeset: 80219a48 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/80219a48c34719263cd41dacd02ba19dd39b1b27 Stats: 26 lines in 6 files changed: 15 ins; 1 del; 10 mod 8284993: Replace System.exit call in swing tests with RuntimeException Reviewed-by: azvegint ------------- PR: https://git.openjdk.java.net/jdk/pull/8293 From azvegint at openjdk.java.net Fri Apr 22 07:05:25 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Fri, 22 Apr 2022 07:05:25 GMT Subject: RFR: 8129827: [TEST_BUG] Test java/awt/Robot/RobotWheelTest/RobotWheelTest.java fails In-Reply-To: References: Message-ID: <6dD801a__gyug1ZTaC8ZRgUuO7cGQVDXovLAQ8GXDto=.4ad9f4bb-6c01-401b-9c19-79b5d7ae6259@github.com> On Fri, 22 Apr 2022 05:06:55 GMT, Prasanta Sadhukhan wrote: >> Test was written based on assumption that we will receive only one `mouseWheelMoved` event with `getWheelRotation() == 20` after `robot.mouseWheel(20)` call, but we can receive 20 events with `getWheelRotation == 1` instead. >> >> So the test is modified to accumulate wheel rotation values before checking. >> >> Testing is green on all platforms. > > test/jdk/java/awt/Robot/RobotWheelTest/RobotWheelTest.java line 47: > >> 45: >> 46: private static AtomicInteger wheelRotation = new AtomicInteger(); >> 47: private static int wheelSign = Platform.isOSX() ? -1 : 1; > > Is this the scroll rotation direction? > If it is, then as you can see in JDK-8282716 review comments, this direction can be configured so we cannot rely on this it will always be -1 for macos... > Maybe you can do the same as it is done there to check at runtime what is the scroll direction configured? It is the scroll rotation direction. Just checked, enabling/disabling `Scroll direction: Natural` for mouse or trackpad does not affect robot scrolling, so the test passes regardless of these settings. Besides that verification of `getWheelRotation()` method itself is significant part of the test, so I doubt we can use it to detect scroll direction. ------------- PR: https://git.openjdk.java.net/jdk/pull/8305 From psadhukhan at openjdk.java.net Fri Apr 22 07:21:24 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 22 Apr 2022 07:21:24 GMT Subject: RFR: 8129827: [TEST_BUG] Test java/awt/Robot/RobotWheelTest/RobotWheelTest.java fails In-Reply-To: References: Message-ID: <_V4KtYyaN2lYwxz004ECmodtkX6VLErXyxJIWmkGTSo=.6eef856a-c470-4133-85d0-df9190e7a567@github.com> On Tue, 19 Apr 2022 20:03:57 GMT, Alexander Zvegintsev wrote: > Test was written based on assumption that we will receive only one `mouseWheelMoved` event with `getWheelRotation() == 20` after `robot.mouseWheel(20)` call, but we can receive 20 events with `getWheelRotation == 1` instead. > > So the test is modified to accumulate wheel rotation values before checking. > > Testing is green on all platforms. Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8305 From psadhukhan at openjdk.java.net Fri Apr 22 07:21:25 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 22 Apr 2022 07:21:25 GMT Subject: RFR: 8129827: [TEST_BUG] Test java/awt/Robot/RobotWheelTest/RobotWheelTest.java fails In-Reply-To: <6dD801a__gyug1ZTaC8ZRgUuO7cGQVDXovLAQ8GXDto=.4ad9f4bb-6c01-401b-9c19-79b5d7ae6259@github.com> References: <6dD801a__gyug1ZTaC8ZRgUuO7cGQVDXovLAQ8GXDto=.4ad9f4bb-6c01-401b-9c19-79b5d7ae6259@github.com> Message-ID: On Fri, 22 Apr 2022 07:02:27 GMT, Alexander Zvegintsev wrote: >> test/jdk/java/awt/Robot/RobotWheelTest/RobotWheelTest.java line 47: >> >>> 45: >>> 46: private static AtomicInteger wheelRotation = new AtomicInteger(); >>> 47: private static int wheelSign = Platform.isOSX() ? -1 : 1; >> >> Is this the scroll rotation direction? >> If it is, then as you can see in JDK-8282716 review comments, this direction can be configured so we cannot rely on this it will always be -1 for macos... >> Maybe you can do the same as it is done there to check at runtime what is the scroll direction configured? > > It is the scroll rotation direction. > > Just checked, enabling/disabling `Scroll direction: Natural` for mouse or trackpad does not affect robot scrolling, so the test passes regardless of these settings. > > Besides that verification of `getWheelRotation()` method itself is significant part of the test, so I doubt we can use it to detect scroll direction. Ok. Thanks for the clarification. ------------- PR: https://git.openjdk.java.net/jdk/pull/8305 From serb at openjdk.java.net Fri Apr 22 07:36:43 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 22 Apr 2022 07:36:43 GMT Subject: RFR: 8264666: Change implementation of safeAdd/safeMult in the LCMSImageLayout class [v2] 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: > - The hand-crafted methods for addition and multiplication are replaced by the "Math" versions. > - Cleanup: the usage of do/while(false) is removed 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 six additional commits since the last revision: - Initial version 8264666 - Merge branch 'master' into LCMSImageLayout - Revert "safeXX -> xxExact" This reverts commit a1876fa596a6831f036c04f45fa89c2caba47087. - Revert "delete "do{...} while (false);"" This reverts commit a9e91601c355f96c82dd8b2b8564a3a3e7b96aef. - delete "do{...} while (false);" - safeXX -> xxExact ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/3333/files - new: https://git.openjdk.java.net/jdk/pull/3333/files/a9e91601..b183980c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=3333&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=3333&range=00-01 Stats: 2331707 lines in 19244 files changed: 1311618 ins; 893703 del; 126386 mod Patch: https://git.openjdk.java.net/jdk/pull/3333.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/3333/head:pull/3333 PR: https://git.openjdk.java.net/jdk/pull/3333 From azvegint at openjdk.java.net Fri Apr 22 07:37:09 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Fri, 22 Apr 2022 07:37:09 GMT Subject: RFR: 8225777: java/awt/Mixing/MixingOnDialog.java fails on Ubuntu [v2] In-Reply-To: References: Message-ID: > The test was failing due to it tried to place windows too close to left top corner, so they got shifted from the dock and top panel on Gnome. > > Shifting all test windows fixes the issue. > > > Testing is green on all platforms. Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: Standard Test Machinery removed ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8326/files - new: https://git.openjdk.java.net/jdk/pull/8326/files/75694893..cae948ae Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8326&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8326&range=00-01 Stats: 167 lines in 1 file changed: 7 ins; 148 del; 12 mod Patch: https://git.openjdk.java.net/jdk/pull/8326.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8326/head:pull/8326 PR: https://git.openjdk.java.net/jdk/pull/8326 From azvegint at openjdk.java.net Fri Apr 22 07:37:09 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Fri, 22 Apr 2022 07:37:09 GMT Subject: RFR: 8225777: java/awt/Mixing/MixingOnDialog.java fails on Ubuntu [v2] In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 05:17:25 GMT, Prasanta Sadhukhan wrote: > Is it possible to remove the obsolete "Standard Test Machinery Section" which we have removed from other tests? Sure, updated. ------------- PR: https://git.openjdk.java.net/jdk/pull/8326 From psadhukhan at openjdk.java.net Fri Apr 22 08:24:28 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 22 Apr 2022 08:24:28 GMT Subject: RFR: 8225777: java/awt/Mixing/MixingOnDialog.java fails on Ubuntu [v2] In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 07:37:09 GMT, Alexander Zvegintsev wrote: >> The test was failing due to it tried to place windows too close to left top corner, so they got shifted from the dock and top panel on Gnome. >> >> Shifting all test windows fixes the issue. >> >> >> Testing is green on all platforms. > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > Standard Test Machinery removed Seems like the test does not finish in standalone mode nor dispose its frame. ------------- PR: https://git.openjdk.java.net/jdk/pull/8326 From psadhukhan at openjdk.java.net Fri Apr 22 08:41:22 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 22 Apr 2022 08:41:22 GMT Subject: RFR: 7080150: [TEST_BUG][macosx] No mac os x EmbeddedFrame support in regression regtesthelpers [v2] In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 20:07:17 GMT, Alisen Chung wrote: >> added EmbeddedFrame support for macosx in regtesthelpers > > Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: > > - Merge branch '7080150' of github.com:alisenchung/jdk into 7080150 > - fixed merge conflict test/jdk/java/awt/regtesthelpers/UtilInternal.java line 81: > 79: Method get_target = window_peer_class.getMethod("getTarget", new Class[0]); > 80: System.out.println("get_target = " + get_target); > 81: return (Frame) get_target.invoke(frame_peer, new Object[0]); Shouldn't we invoke sun/lwawt/macosx/CEmbeddedFrame same as we do for windows/linux via WEmbeddedFrame and XEmbeddedFrame? ------------- PR: https://git.openjdk.java.net/jdk/pull/8348 From azvegint at openjdk.java.net Fri Apr 22 10:24:18 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Fri, 22 Apr 2022 10:24:18 GMT Subject: RFR: 8225777: java/awt/Mixing/MixingOnDialog.java fails on Ubuntu [v3] In-Reply-To: References: Message-ID: > The test was failing due to it tried to place windows too close to left top corner, so they got shifted from the dock and top panel on Gnome. > > Shifting all test windows fixes the issue. > > > Testing is green on all platforms. Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: dialog disposal ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8326/files - new: https://git.openjdk.java.net/jdk/pull/8326/files/cae948ae..a6f180aa Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8326&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8326&range=01-02 Stats: 4 lines in 1 file changed: 3 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8326.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8326/head:pull/8326 PR: https://git.openjdk.java.net/jdk/pull/8326 From azvegint at openjdk.java.net Fri Apr 22 10:24:18 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Fri, 22 Apr 2022 10:24:18 GMT Subject: RFR: 8225777: java/awt/Mixing/MixingOnDialog.java fails on Ubuntu [v2] In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 08:20:50 GMT, Prasanta Sadhukhan wrote: > Seems like the test does not finish in standalone mode nor dispose its frame. fixed ------------- PR: https://git.openjdk.java.net/jdk/pull/8326 From duke at openjdk.java.net Fri Apr 22 16:44:07 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Fri, 22 Apr 2022 16:44:07 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v7] In-Reply-To: References: Message-ID: > The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. > > The following approaches were evaluated before considering it as not a test issue - > > - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. > > - Removing existing constraints on text and icon is incompatible for Aqua LAF. > > Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list > > ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: formatted test instructions ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8307/files - new: https://git.openjdk.java.net/jdk/pull/8307/files/09109ab3..476d083b Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8307&range=06 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8307&range=05-06 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8307.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8307/head:pull/8307 PR: https://git.openjdk.java.net/jdk/pull/8307 From duke at openjdk.java.net Fri Apr 22 16:44:07 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Fri, 22 Apr 2022 16:44:07 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v5] In-Reply-To: <_UHIfMMCOOxGYhiLHw-J2ZBCz5trAaQLrYmtmkYgihw=.74272360-b9e8-4475-93b0-7291e6afbbd1@github.com> References: <_UHIfMMCOOxGYhiLHw-J2ZBCz5trAaQLrYmtmkYgihw=.74272360-b9e8-4475-93b0-7291e6afbbd1@github.com> Message-ID: On Fri, 22 Apr 2022 06:44:36 GMT, Prasanta Sadhukhan wrote: >> @prsadhuk Thanks for catching it. I'll make the required changes. > > SInce you are hardcoding PassFailFrame column to 35, it seems some word break is not perfect in the above instructions. > Probably, you can put \n break at appropriate positions in NOTE to show better. @prsadhuk Formatted test instructions as suggested. ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From serb at openjdk.java.net Fri Apr 22 16:59:26 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 22 Apr 2022 16:59:26 GMT Subject: RFR: 8284965: closed test sun/java2d/OpenGL/XORPaint.java is unstable In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 17:15:20 GMT, Phil Race wrote: > This fix moves a closed test to open but updated to be more comprehensive in testing multiple pipelines and with some stabilisation improvements. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8345 From serb at openjdk.java.net Fri Apr 22 17:00:36 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 22 Apr 2022 17:00:36 GMT Subject: RFR: 8129778: Few awt test fail for Solaris 11 with RuntimeException In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 13:24:15 GMT, Alexander Zvegintsev wrote: > Those tests were failing on Solaris, which is no longer supported. > > They pass as they are, but decreasing of delays reduce execution time significantly: > > e.g. proposed changes drops execution time from ~5min to ~2 min > for MouseButtonsAndKeyMasksTest on my machine. > > Testing is green on all platforms. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8339 From serb at openjdk.java.net Fri Apr 22 17:09:28 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 22 Apr 2022 17:09:28 GMT Subject: RFR: 8225777: java/awt/Mixing/MixingOnDialog.java fails on Ubuntu [v3] In-Reply-To: References: Message-ID: <4rS9YCoQeoS3MAPjKpGYKpaNN288a5ibi488pif5-f8=.faef92c1-8aa2-4fe8-b18d-f02fa2dca5d6@github.com> On Fri, 22 Apr 2022 10:24:18 GMT, Alexander Zvegintsev wrote: >> The test was failing due to it tried to place windows too close to left top corner, so they got shifted from the dock and top panel on Gnome. >> >> Shifting all test windows fixes the issue. >> >> >> Testing is green on all platforms. > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > dialog disposal test/jdk/java/awt/Mixing/MixingOnDialog.java line 87: > 85: // Move the mouse pointer to the position where both > 86: // buttons overlap > 87: Point heavyLoc = heavy.getLocationOnScreen(); "heavy" is assigned on a different thread, some synchronization could added. test/jdk/java/awt/Mixing/MixingOnDialog.java line 95: > 93: robot.waitForIdle(); > 94: > 95: SwingUtilities.invokeLater(() -> d.dispose()); invokeLater might not be executed before end of the test, it will be run after the main method ends. ------------- PR: https://git.openjdk.java.net/jdk/pull/8326 From psadhukhan at openjdk.java.net Fri Apr 22 17:16:24 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Fri, 22 Apr 2022 17:16:24 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v7] In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 16:44:07 GMT, Harshitha Onkar wrote: >> The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. >> >> The following approaches were evaluated before considering it as not a test issue - >> >> - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. >> >> - Removing existing constraints on text and icon is incompatible for Aqua LAF. >> >> Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list >> >> ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > formatted test instructions Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From prr at openjdk.java.net Fri Apr 22 17:41:24 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 22 Apr 2022 17:41:24 GMT Subject: RFR: 8129778: Few awt test fail for Solaris 11 with RuntimeException In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 13:24:15 GMT, Alexander Zvegintsev wrote: > Those tests were failing on Solaris, which is no longer supported. > > They pass as they are, but decreasing of delays reduce execution time significantly: > > e.g. proposed changes drops execution time from ~5min to ~2 min > for MouseButtonsAndKeyMasksTest on my machine. > > Testing is green on all platforms. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8339 From naoto at openjdk.java.net Fri Apr 22 17:49:27 2022 From: naoto at openjdk.java.net (Naoto Sato) Date: Fri, 22 Apr 2022 17:49:27 GMT Subject: RFR: 8285308: Win: Japanese logical fonts are drawn with wrong size In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 09:14:14 GMT, Toshio Nakamura wrote: > Japanese logical fonts are drawn with wrong size since Java 18. > It's triggered by JEP 400, UTF-8 by Default. `sun.awt.FontConfiguration` (and `sun.awt.windows.WFontConfiguration`) seems to expect the native encoding instead of the default encoding. This patch changes to use native encoding. > > Tested: jdk_desktop on Windows, Linux, and macOS With JEP 400, the default charset may differ from the platform encoding, which is the case like this on Windows (mac & Linux won't be affected as they already use UTF-8 natively) and the mitigation here looks fine to me. But the real issue here to me is why the font size gets bigger depending on the encoding (windows-31j vs. UTF-8)? ------------- PR: https://git.openjdk.java.net/jdk/pull/8329 From azvegint at openjdk.java.net Fri Apr 22 17:52:20 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Fri, 22 Apr 2022 17:52:20 GMT Subject: RFR: 8225777: java/awt/Mixing/MixingOnDialog.java fails on Ubuntu [v4] In-Reply-To: References: Message-ID: <_LqQzGG2KEEVS73LQzkX-DluseYWv4-sA2GVCt7CvBA=.4dc7be33-ea42-4333-8d24-ac37bc7b65d3@github.com> > The test was failing due to it tried to place windows too close to left top corner, so they got shifted from the dock and top panel on Gnome. > > Shifting all test windows fixes the issue. > > > Testing is green on all platforms. Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: review comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8326/files - new: https://git.openjdk.java.net/jdk/pull/8326/files/a6f180aa..7b5e49ea Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8326&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8326&range=02-03 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8326.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8326/head:pull/8326 PR: https://git.openjdk.java.net/jdk/pull/8326 From achung at openjdk.java.net Fri Apr 22 17:52:37 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Fri, 22 Apr 2022 17:52:37 GMT Subject: RFR: 7080150: [TEST_BUG][macosx] No mac os x EmbeddedFrame support in regression regtesthelpers [v2] In-Reply-To: References: Message-ID: <6ZgUTjzqY7BMiXBOVBgNe0eDs-cRoH6AaHf3xv_fV9Q=.c2db1051-7791-49db-9cfd-fd730aa67b90@github.com> On Fri, 22 Apr 2022 08:38:09 GMT, Prasanta Sadhukhan wrote: >> Alisen Chung has updated the pull request incrementally with two additional commits since the last revision: >> >> - Merge branch '7080150' of github.com:alisenchung/jdk into 7080150 >> - fixed merge conflict > > test/jdk/java/awt/regtesthelpers/UtilInternal.java line 81: > >> 79: Method get_target = window_peer_class.getMethod("getTarget", new Class[0]); >> 80: System.out.println("get_target = " + get_target); >> 81: return (Frame) get_target.invoke(frame_peer, new Object[0]); > > Shouldn't we invoke sun/lwawt/macosx/CEmbeddedFrame same as we do for windows/linux via WEmbeddedFrame and XEmbeddedFrame? CEmbeddedFrame doesn't have a way to pass in a handle like in WEmbeddedFrame and XEmbeddedFrame, so I can't pass in the peer's target. If I try to use CEmbeddedFrame the test window will pop up but the EmbeddedFrame won't show up and the test fails ------------- PR: https://git.openjdk.java.net/jdk/pull/8348 From achung at openjdk.java.net Fri Apr 22 18:07:28 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Fri, 22 Apr 2022 18:07:28 GMT Subject: RFR: 8284767: Create an automated test for JDK-4422535 In-Reply-To: References: Message-ID: On Wed, 13 Apr 2022 11:02:05 GMT, Srinivas Mandalika wrote: > Create an automated test for [JDK-4422535](https://bugs.openjdk.java.net/browse/JDK-4422535) > AccessibleValue implementation only accept Integers > The AccessibleValue implementations of the following components: > > java.awt.Scrollbar > javax.swing.AbstractButton > javax.swing.JInternalFrame > javax.swing.JSplitPane > javax.swing.JScrollBar > javax.swing.JProgressBar > javax.swing.JSlider > > require the argument to setCurrentAccessibleValue(Number) to be an Integer, else they completely ignore it - it returns a false indicating that the value has not been set by the return value, but they cannot know the reason for that). > > The test verifies that for each of the above components, the AccessibleValue is set when it is set to a Number (Float, Double, long etc) and not just for an Integer. > > his review is for migrating tests from a closed test suite to open. > > Testing: > The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. test/jdk/javax/accessibility/4422535/SetCurrentAccessibleValueTest.java line 93: > 91: } > 92: > 93: if (!jScrollBar.getAccessibleContext().getAccessibleValue() maybe you could write a loop to run each component? ------------- PR: https://git.openjdk.java.net/jdk/pull/8220 From prr at openjdk.java.net Fri Apr 22 18:18:27 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 22 Apr 2022 18:18:27 GMT Subject: RFR: 8225777: java/awt/Mixing/MixingOnDialog.java fails on Ubuntu [v4] In-Reply-To: <_LqQzGG2KEEVS73LQzkX-DluseYWv4-sA2GVCt7CvBA=.4dc7be33-ea42-4333-8d24-ac37bc7b65d3@github.com> References: <_LqQzGG2KEEVS73LQzkX-DluseYWv4-sA2GVCt7CvBA=.4dc7be33-ea42-4333-8d24-ac37bc7b65d3@github.com> Message-ID: On Fri, 22 Apr 2022 17:52:20 GMT, Alexander Zvegintsev wrote: >> The test was failing due to it tried to place windows too close to left top corner, so they got shifted from the dock and top panel on Gnome. >> >> Shifting all test windows fixes the issue. >> >> >> Testing is green on all platforms. > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > review comments Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8326 From duke at openjdk.java.net Fri Apr 22 18:18:36 2022 From: duke at openjdk.java.net (DamonGuy) Date: Fri, 22 Apr 2022 18:18:36 GMT Subject: RFR: 8196367: java/awt/List/SingleModeDeselect/SingleModeDeselect.java times out In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 22:03:17 GMT, Alexander Zuev wrote: > Clean up imports; > Close and dispose frame before exiting the test; test/jdk/java/awt/List/SingleModeDeselect/SingleModeDeselect.java line 66: > 64: throw new RuntimeException("Test failed: List.getSelectedIndex() returns "+list.getSelectedIndex()); > 65: } > 66: } finally { Can these try blocks be combined into one block? Also from my previous PR's, I believe it's standard to have spaces around the "+" before `list.getSelectedIndex()`. ------------- PR: https://git.openjdk.java.net/jdk/pull/8351 From achung at openjdk.java.net Fri Apr 22 19:48:46 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Fri, 22 Apr 2022 19:48:46 GMT Subject: RFR: JDK-8202790: DnD test DisposeFrameOnDragTest.java does not clean up Message-ID: Added a background to the test to prevent the file from dragging onto the desktop and creating an extra file. ------------- Commit messages: - added background to prevent file creation during drag and drop Changes: https://git.openjdk.java.net/jdk/pull/8370/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8370&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8202790 Stats: 8 lines in 2 files changed: 7 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8370.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8370/head:pull/8370 PR: https://git.openjdk.java.net/jdk/pull/8370 From duke at openjdk.java.net Fri Apr 22 20:13:00 2022 From: duke at openjdk.java.net (Dan Lutker) Date: Fri, 22 Apr 2022 20:13:00 GMT Subject: RFR: 7131823: Loading some animated GIFs fails with =?UTF-8?B?QXJyYXlJbmRleE91dE9mQm91bmRzReKApg==?= Message-ID: ?xception: Index 4096 out of bounds for length 4096 Adapted from https://github.com/openjdk/jfx/commit/7b7050c46299c0e6771ae02fbb5ceaf22104d3e4 # Testing done Build locally on linux and ran jdk_imageio tests. ------------- Commit messages: - 7131823: Loading some animated GIFs fails with ArrayIndexOutOfBoundsException: Index 4096 out of bounds for length 4096 Changes: https://git.openjdk.java.net/jdk/pull/8371/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8371&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-7131823 Stats: 173 lines in 2 files changed: 155 ins; 3 del; 15 mod Patch: https://git.openjdk.java.net/jdk/pull/8371.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8371/head:pull/8371 PR: https://git.openjdk.java.net/jdk/pull/8371 From achung at openjdk.java.net Fri Apr 22 20:45:43 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Fri, 22 Apr 2022 20:45:43 GMT Subject: RFR: 8198666: Many java/awt/Modal/OnTop/ test fails on mac Message-ID: Removed passing tests from problem list ------------- Commit messages: - removed other tests from problem list - removed tests from ProblemList Changes: https://git.openjdk.java.net/jdk/pull/8368/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8368&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8198666 Stats: 30 lines in 1 file changed: 0 ins; 30 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8368.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8368/head:pull/8368 PR: https://git.openjdk.java.net/jdk/pull/8368 From kizune at openjdk.java.net Fri Apr 22 21:05:26 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Fri, 22 Apr 2022 21:05:26 GMT Subject: RFR: 8198666: Many java/awt/Modal/OnTop/ test fails on mac In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 17:38:28 GMT, Alisen Chung wrote: > Removed passing tests from problem list Marked as reviewed by kizune (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8368 From kizune at openjdk.java.net Fri Apr 22 21:57:23 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Fri, 22 Apr 2022 21:57:23 GMT Subject: RFR: 8196367: java/awt/List/SingleModeDeselect/SingleModeDeselect.java times out [v2] In-Reply-To: References: Message-ID: > Clean up imports; > Close and dispose frame before exiting the test; Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: Use one tyr/catch instead of two Generic code cleanup ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8351/files - new: https://git.openjdk.java.net/jdk/pull/8351/files/7b86b9ba..fe4aee44 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8351&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8351&range=00-01 Stats: 14 lines in 1 file changed: 5 ins; 7 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8351.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8351/head:pull/8351 PR: https://git.openjdk.java.net/jdk/pull/8351 From serb at openjdk.java.net Fri Apr 22 22:00:24 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 22 Apr 2022 22:00:24 GMT Subject: RFR: 8198666: Many java/awt/Modal/OnTop/ test fails on mac In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 17:38:28 GMT, Alisen Chung wrote: > Removed passing tests from problem list When these tests were added to the problem list all of them fail at least once in a couple of iterations, see [JDK-8198693](https://bugs.openjdk.java.net/browse/JDK-8198693). Please make sure that they are stable enough via many iterations. ------------- PR: https://git.openjdk.java.net/jdk/pull/8368 From serb at openjdk.java.net Fri Apr 22 22:19:24 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 22 Apr 2022 22:19:24 GMT Subject: RFR: 7131823: Loading some animated GIFs fails with =?UTF-8?B?QXJyYXlJbmRleE91dE9mQm91bmRzReKApg==?= In-Reply-To: References: Message-ID: <2QLXKnvAiE6yowDnu5FlGiSrE4OliYWLiNGpRbEZTzc=.4dd85add-6fb3-4f8f-8224-914b75f3a7b0@github.com> On Fri, 22 Apr 2022 20:04:32 GMT, Dan Lutker wrote: > ?xception: Index 4096 out of bounds for length 4096 > > Adapted from https://github.com/openjdk/jfx/commit/7b7050c46299c0e6771ae02fbb5ceaf22104d3e4 > > # Testing done > Build locally on linux and ran jdk_imageio tests. The fix looks fine. But I think the JBS description of the bug has two issues, and this change fixes only the first. So it will be better to fix both if it is clear what is the problem. Or create a separate issue for the AIOB exception. ------------- PR: https://git.openjdk.java.net/jdk/pull/8371 From serb at openjdk.java.net Fri Apr 22 22:21:21 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 22 Apr 2022 22:21:21 GMT Subject: RFR: JDK-8202790: DnD test DisposeFrameOnDragTest.java does not clean up In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 19:41:44 GMT, Alisen Chung wrote: > Added a background to the test to prevent the file from dragging onto the desktop and creating an extra file. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8370 From prr at openjdk.java.net Fri Apr 22 22:24:23 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 22 Apr 2022 22:24:23 GMT Subject: RFR: 8198666: Many java/awt/Modal/OnTop/ test fails on mac In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 17:38:28 GMT, Alisen Chung wrote: > Removed passing tests from problem list Yeah, these modal tests were VERY unstable. I can't think of anything we fixed which would make them stable again, so we should repeat these tests maybe 100 times to make sure they pass before removing them. ------------- PR: https://git.openjdk.java.net/jdk/pull/8368 From serb at openjdk.java.net Fri Apr 22 22:24:24 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 22 Apr 2022 22:24:24 GMT Subject: RFR: 7132796: [macosx] closed/javax/swing/JComboBox/4517214/bug4517214.java fails on MacOS In-Reply-To: References: Message-ID: On Thu, 14 Apr 2022 06:50:10 GMT, Prasanta Sadhukhan wrote: > JDK-4517214 was fixed for Metal L&F where JComboBox having TitledBorder used to have double height compared to normal JComboBox. > The issue is still observed for macos for Aqua L&F where still double height is seen. > Fix is to prevent adding border insets height to combobox size as was done for [MetalComboxUI.getMinimumSize[](url)](https://github.com/openjdk/jdk/blame/master/src/java.desktop/share/classes/javax/swing/plaf/metal/MetalComboBoxUI.java#L384) > The closed test is automated and moved to open. CI testing on all platform is ok. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8237 From kizune at openjdk.java.net Fri Apr 22 22:27:26 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Fri, 22 Apr 2022 22:27:26 GMT Subject: RFR: 8196367: java/awt/List/SingleModeDeselect/SingleModeDeselect.java times out [v2] In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 17:54:49 GMT, DamonGuy wrote: >> Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: >> >> Use one tyr/catch instead of two >> Generic code cleanup > > test/jdk/java/awt/List/SingleModeDeselect/SingleModeDeselect.java line 66: > >> 64: throw new RuntimeException("Test failed: List.getSelectedIndex() returns "+list.getSelectedIndex()); >> 65: } >> 66: } finally { > > Can these try blocks be combined into one block? Also from my previous PR's, I believe it's standard to have spaces around the "+" before `list.getSelectedIndex()`. Yeah, it is part of the old code but since i'm moving these lines around i might as well fix that. ------------- PR: https://git.openjdk.java.net/jdk/pull/8351 From serb at openjdk.java.net Fri Apr 22 22:28:35 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 22 Apr 2022 22:28:35 GMT Subject: RFR: 8193543: Regression automated test '/open/test/jdk/java/awt/TrayIcon/SystemTrayInstance/SystemTrayInstanceTest.java' fails In-Reply-To: <6S1J2MYhxOU4Gt_H5xTetVR0pkrM7iIlLfkOf9mlo_g=.ccdbb91e-16b1-4982-85d8-27e6a2754939@github.com> References: <6S1J2MYhxOU4Gt_H5xTetVR0pkrM7iIlLfkOf9mlo_g=.ccdbb91e-16b1-4982-85d8-27e6a2754939@github.com> Message-ID: On Thu, 21 Apr 2022 17:47:12 GMT, Alexander Zvegintsev wrote: > Looks like this test was written based on assumption that SystemTray is supported on all platforms. > > However on Linux it may not be true. > > Availability of SystemTray is detected by getting owner of `_NET_SYSTEM_TRAY` selection: > > https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.desktop/unix/classes/sun/awt/X11/XSystemTrayPeer.java#L42 > > https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.desktop/unix/classes/sun/awt/X11/XSystemTrayPeer.java#L58-L59 > > > As an example, SystemTray is not available on Wayland because of this. > > > > So I modified the test: > > - WIndows and macOS: expecting available SystemTray. > - Linux: check absence/presence of `UnsupportedOperationException` exception of `SystemTray.getSystemTray()` call based on `SystemTray.isSupported()` result. > > Testing is green on all platforms. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8346 From serb at openjdk.java.net Fri Apr 22 22:33:26 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 22 Apr 2022 22:33:26 GMT Subject: RFR: 7080150: [TEST_BUG][macosx] No mac os x EmbeddedFrame support in regression regtesthelpers [v2] In-Reply-To: <6ZgUTjzqY7BMiXBOVBgNe0eDs-cRoH6AaHf3xv_fV9Q=.c2db1051-7791-49db-9cfd-fd730aa67b90@github.com> References: <6ZgUTjzqY7BMiXBOVBgNe0eDs-cRoH6AaHf3xv_fV9Q=.c2db1051-7791-49db-9cfd-fd730aa67b90@github.com> Message-ID: On Fri, 22 Apr 2022 17:49:26 GMT, Alisen Chung wrote: >> test/jdk/java/awt/regtesthelpers/UtilInternal.java line 81: >> >>> 79: Method get_target = window_peer_class.getMethod("getTarget", new Class[0]); >>> 80: System.out.println("get_target = " + get_target); >>> 81: return (Frame) get_target.invoke(frame_peer, new Object[0]); >> >> Shouldn't we invoke sun/lwawt/macosx/CEmbeddedFrame same as we do for windows/linux via WEmbeddedFrame and XEmbeddedFrame? > > CEmbeddedFrame doesn't have a way to pass in a handle like in WEmbeddedFrame and XEmbeddedFrame, so I can't pass in the peer's target. If I try to use CEmbeddedFrame the test window will pop up but the EmbeddedFrame won't show up and the test fails Are you sure that CEmbeddedFrame is used in the embedding functionality? We have another one on macOS CViewEmbeddedFrame. One of them was used for applets another one was used by the JAWT and SWT. Please double-check that the correct one is used for this test, and another one probably can be removed. ------------- PR: https://git.openjdk.java.net/jdk/pull/8348 From duke at openjdk.java.net Fri Apr 22 22:37:24 2022 From: duke at openjdk.java.net (DamonGuy) Date: Fri, 22 Apr 2022 22:37:24 GMT Subject: RFR: 8196367: java/awt/List/SingleModeDeselect/SingleModeDeselect.java times out [v2] In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 21:57:23 GMT, Alexander Zuev wrote: >> Clean up imports; >> Close and dispose frame before exiting the test; > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Use one tyr/catch instead of two > Generic code cleanup Looks good to me now. I ran the test with & without your changes and it no longer times out when it did previously. ------------- Marked as reviewed by DamonGuy at github.com (no known OpenJDK username). PR: https://git.openjdk.java.net/jdk/pull/8351 From serb at openjdk.java.net Fri Apr 22 23:19:25 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 22 Apr 2022 23:19:25 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v7] In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 16:44:07 GMT, Harshitha Onkar wrote: >> The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. >> >> The following approaches were evaluated before considering it as not a test issue - >> >> - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. >> >> - Removing existing constraints on text and icon is incompatible for Aqua LAF. >> >> Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list >> >> ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > formatted test instructions Probably we should think about care of the big font in the aqua L&F and decrease the size we know it is too big? ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From serb at openjdk.java.net Fri Apr 22 23:29:26 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 22 Apr 2022 23:29:26 GMT Subject: RFR: 8273506: java Robot API did the 'm' keypress and caused /awt/event/KeyEvent/KeyCharTest/KeyCharTest.html is timing out on macOS 12 [v2] In-Reply-To: <33wbZN4ZDtQ564BCCatIOTX2sVRXi308jFUzKbKOaVE=.4ecfdde4-74ed-4319-bf86-492c3e47a32b@github.com> References: <33wbZN4ZDtQ564BCCatIOTX2sVRXi308jFUzKbKOaVE=.4ecfdde4-74ed-4319-bf86-492c3e47a32b@github.com> Message-ID: On Thu, 21 Apr 2022 18:50:16 GMT, Alexander Zuev wrote: >> Clear the kCGEventFlagMaskSecondaryFn flag if it is set before posting keyboard events to the system queue. > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Adding test case. I am not sure do we need to discard the possibility to press the shortcuts via the FN key, if the user may press them then why the robot cannot do the same? Looks like the behavior of this key is similar to the capslock which can be toggled on/off and may have a similar issue? If yes then we can press that button in the test twice to set an initial state(similar to how could fix the same issue for the capslock). ------------- PR: https://git.openjdk.java.net/jdk/pull/8320 From duke at openjdk.java.net Fri Apr 22 23:39:26 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Fri, 22 Apr 2022 23:39:26 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v7] In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 23:15:51 GMT, Sergey Bylokhov wrote: > Probably we should think about care of the big font in the aqua L&F and decrease the size we know it is too big? @mrserb since point size are estimates will this pose a problem while decreasing the size of the text? "to decrease the size when it is too big" do you mean the size set in the html string (tab-title) is parsed first, set to a lower value before tab height calculations are carried out? ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From serb at openjdk.java.net Fri Apr 22 23:45:27 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 22 Apr 2022 23:45:27 GMT Subject: RFR: 8285149: Using HashMap.newHashMap to replace new HashMap(int) [v3] In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 19:24:25 GMT, XenoAmess wrote: >> These are the changes that too many to be reviewed in 8186958, thus split some of them out. > > XenoAmess has updated the pull request incrementally with one additional commit since the last revision: > > add more replaces src/demo/share/java2d/J2DBench/src/j2dbench/tests/text/TextTests.java line 291: > 289: > 290: > 291: static HashMap strcache = HashMap.newHashMap(tscripts.length); This code maintains compatibility with jdk1.4, not necessary to change it. src/java.datatransfer/share/classes/java/awt/datatransfer/SystemFlavorMap.java line 815: > 813: } > 814: > 815: Map retval =HashMap.newHashMap(natives.length); missed space after '=' ------------- PR: https://git.openjdk.java.net/jdk/pull/8301 From serb at openjdk.java.net Fri Apr 22 23:47:27 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 22 Apr 2022 23:47:27 GMT Subject: RFR: 8225777: java/awt/Mixing/MixingOnDialog.java fails on Ubuntu [v4] In-Reply-To: <_LqQzGG2KEEVS73LQzkX-DluseYWv4-sA2GVCt7CvBA=.4dc7be33-ea42-4333-8d24-ac37bc7b65d3@github.com> References: <_LqQzGG2KEEVS73LQzkX-DluseYWv4-sA2GVCt7CvBA=.4dc7be33-ea42-4333-8d24-ac37bc7b65d3@github.com> Message-ID: On Fri, 22 Apr 2022 17:52:20 GMT, Alexander Zvegintsev wrote: >> The test was failing due to it tried to place windows too close to left top corner, so they got shifted from the dock and top panel on Gnome. >> >> Shifting all test windows fixes the issue. >> >> >> Testing is green on all platforms. > > Alexander Zvegintsev has updated the pull request incrementally with one additional commit since the last revision: > > review comments Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8326 From serb at openjdk.java.net Fri Apr 22 23:52:51 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 22 Apr 2022 23:52:51 GMT Subject: RFR: 8264666: Change implementation of safeAdd/safeMult in the LCMSImageLayout class [v2] In-Reply-To: References: <3iYQc9duUeEGRqm3146n4XhLQ_LY6YzXv-f-WgDu9sE=.a0a36297-4ce8-489c-9b50-43aede408e3b@github.com> Message-ID: On Fri, 22 Apr 2022 07:36:43 GMT, Sergey Bylokhov wrote: >> Description of the new version of the fix: >> While I have worked on this change and tried to consider the comments, I have found that the usages of the "safeAdd/safeMult" in the LCMSImageLayout class are incorrect. Both methods are based on the "Math" versions but throw a different exception. The problem is that its implementation may accept the negative values during intermediate calculation, see the old implementation of "[verify](https://github.com/openjdk/jdk/blob/139615b1815d4afd3593536d83fa8b25430f35e7/src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java#L343)" method: >> 1. We check the "offset" value: 0 <= offset < dataArrayLength >> 2. We do some intermediate calculations that "accept" negative values >> 3. We check the final "off" value: 0 <= offset < dataArrayLength >> >> I wondered is it possible to provide some data that using wrong/negative data at step2 may result in the correct check at step3. I spent some time and was able to reproduce the problem with the attached test case. Note that the test is a little bit cryptic since it is not possible to reproduce it by input image data. >> >> Note: I have removed all cleanup from the fix, to make it simpler. >> >> <======> >> Description of the old version of the fix: >> - The hand-crafted methods for addition and multiplication are replaced by the "Math" versions. >> - Cleanup: the usage of do/while(false) is removed > > 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 six additional commits since the last revision: > > - Initial version 8264666 > - Merge branch 'master' into LCMSImageLayout > - Revert "safeXX -> xxExact" > > This reverts commit a1876fa596a6831f036c04f45fa89c2caba47087. > - Revert "delete "do{...} while (false);"" > > This reverts commit a9e91601c355f96c82dd8b2b8564a3a3e7b96aef. > - delete "do{...} while (false);" > - safeXX -> xxExact The fix is reworked based on the new facts about that methods. ------------- PR: https://git.openjdk.java.net/jdk/pull/3333 From prr at openjdk.java.net Fri Apr 22 23:59:24 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 22 Apr 2022 23:59:24 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v7] In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 16:44:07 GMT, Harshitha Onkar wrote: >> The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. >> >> The following approaches were evaluated before considering it as not a test issue - >> >> - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. >> >> - Removing existing constraints on text and icon is incompatible for Aqua LAF. >> >> Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list >> >> ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > formatted test instructions This is just to fix a complaint about the test. Whether we want to make that policy change of ignoring font sizes that are "too big" is a separate issue. And the best we could do is some estimate based on metrics of the font, which probably could be based on the L&Fs max tab button size and calculated once. But some text could still be clipped. ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From duke at openjdk.java.net Sat Apr 23 00:14:36 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Sat, 23 Apr 2022 00:14:36 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v7] In-Reply-To: References: Message-ID: <-z0bHZlTfo7fN7BsGzz1PgoC8RvhLYSC6ZCRbgFoV2U=.6e809e27-166c-4de8-a58d-ddc982caddc8@github.com> On Fri, 22 Apr 2022 23:56:05 GMT, Phil Race wrote: > This is just to fix a complaint about the test. Whether we want to make that policy change of ignoring font sizes that are "too big" is a separate issue. And the best we could do is some estimate based on metrics of the font, which probably could be based on the L&Fs max tab button size and calculated once. But some text could still be clipped. @prrace Thank you Phil. Makes sense and will look into it as a separate issue. ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From kizune at openjdk.java.net Sat Apr 23 07:25:36 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Sat, 23 Apr 2022 07:25:36 GMT Subject: RFR: 8273506: java Robot API did the 'm' keypress and caused /awt/event/KeyEvent/KeyCharTest/KeyCharTest.html is timing out on macOS 12 [v2] In-Reply-To: References: <33wbZN4ZDtQ564BCCatIOTX2sVRXi308jFUzKbKOaVE=.4ecfdde4-74ed-4319-bf86-492c3e47a32b@github.com> Message-ID: On Fri, 22 Apr 2022 23:26:02 GMT, Sergey Bylokhov wrote: > I am not sure do we need to discard the possibility to press the shortcuts via the FN key, if the user may press them then why the robot cannot do the same? Looks like the behavior of this key is similar to the capslock which can be toggled on/off and may have a similar issue? If yes then we can press that button in the test twice to set an initial state(similar to how could fix the same issue for the capslock). Ok, starting from the beginning - there is no possibility to press the Function key with Robot, the corresponding key code (OSX_Function - 0x3F) has not mapped to any of the keys available to Robot. Function key does not act like a caps lock - it acts like a shift. Just like a shift, it can only be fixated by the accessibility feature "sticky keys". Once Function key is released the global state should be changed in a way as if this key is not active. We do not issue key press or key release event for the Function key. The reason of why global state is being changed this way when we issue key press/key release sequence or a totally unrelated key (OSX_DownArrow - 0x7D) is unknown, it happens in the native code outside of our control. All we can do is to eliminate the consequences of this action that started to cause problems in Mac OS X 12. ------------- PR: https://git.openjdk.java.net/jdk/pull/8320 From duke at openjdk.java.net Sat Apr 23 14:34:58 2022 From: duke at openjdk.java.net (XenoAmess) Date: Sat, 23 Apr 2022 14:34:58 GMT Subject: RFR: 8285149: Using HashMap.newHashMap to replace new HashMap(int) [v4] In-Reply-To: References: Message-ID: > These are the changes that too many to be reviewed in 8186958, thus split some of them out. XenoAmess has updated the pull request incrementally with two additional commits since the last revision: - maintains compatibility with jdk1.4 for TextTests - fix missed space after '=' ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8301/files - new: https://git.openjdk.java.net/jdk/pull/8301/files/4f2d4838..684d1528 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8301&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8301&range=02-03 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8301.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8301/head:pull/8301 PR: https://git.openjdk.java.net/jdk/pull/8301 From duke at openjdk.java.net Sat Apr 23 14:35:00 2022 From: duke at openjdk.java.net (XenoAmess) Date: Sat, 23 Apr 2022 14:35:00 GMT Subject: RFR: 8285149: Using HashMap.newHashMap to replace new HashMap(int) [v3] In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 23:31:41 GMT, Sergey Bylokhov wrote: >> XenoAmess has updated the pull request incrementally with one additional commit since the last revision: >> >> add more replaces > > src/demo/share/java2d/J2DBench/src/j2dbench/tests/text/TextTests.java line 291: > >> 289: >> 290: >> 291: static HashMap strcache = HashMap.newHashMap(tscripts.length); > > This code maintains compatibility with jdk1.4, not necessary to change it. @mrserb done. > src/java.datatransfer/share/classes/java/awt/datatransfer/SystemFlavorMap.java line 815: > >> 813: } >> 814: >> 815: Map retval =HashMap.newHashMap(natives.length); > > missed space after '=' @mrserb done. ------------- PR: https://git.openjdk.java.net/jdk/pull/8301 From mvs at openjdk.java.net Sat Apr 23 14:50:17 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Sat, 23 Apr 2022 14:50:17 GMT Subject: RFR: 8283624: Create an automated regression test for RFE-4390885 [v3] In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 07:14:33 GMT, Manukumar V S wrote: >> Write a regression test for [JDK-4390885](https://bugs.openjdk.java.net/browse/JDK-4390885) Enhancement Request. >> >> Issue: >> Please add the ability to set the location of a JFileChooser. This might be a >> bug, but JFileChooser.setLocation() has no effect when >> JFileChooser.showXXXXDialog() is called. This is becoming very important as the >> popularity of multiple monitors is increasing. These dialogs show up on the >> wrong monitor which is really annoying. Also due to bug #4189244 I am unable to >> avoid painting problems by positioning the dialog away from the menu item that >> initiated it. >> >> Fix: >> Now it's possible to set the location of Dialog in JFileChooser. >> >> Testing: >> 1. Tested in Mach5 10 times per platform(macos,linux,windows) and got all Pass. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Removed some duplicate code Any volunteers? ------------- PR: https://git.openjdk.java.net/jdk/pull/7996 From azvegint at openjdk.java.net Sat Apr 23 20:43:40 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Sat, 23 Apr 2022 20:43:40 GMT Subject: Integrated: 8129827: [TEST_BUG] Test java/awt/Robot/RobotWheelTest/RobotWheelTest.java fails In-Reply-To: References: Message-ID: On Tue, 19 Apr 2022 20:03:57 GMT, Alexander Zvegintsev wrote: > Test was written based on assumption that we will receive only one `mouseWheelMoved` event with `getWheelRotation() == 20` after `robot.mouseWheel(20)` call, but we can receive 20 events with `getWheelRotation == 1` instead. > > So the test is modified to accumulate wheel rotation values before checking. > > Testing is green on all platforms. This pull request has now been integrated. Changeset: a1efb955 Author: Alexander Zvegintsev URL: https://git.openjdk.java.net/jdk/commit/a1efb95536fb3995780336604cc727f921770c63 Stats: 43 lines in 2 files changed: 32 ins; 6 del; 5 mod 8129827: [TEST_BUG] Test java/awt/Robot/RobotWheelTest/RobotWheelTest.java fails Reviewed-by: psadhukhan ------------- PR: https://git.openjdk.java.net/jdk/pull/8305 From azvegint at openjdk.java.net Sat Apr 23 20:45:36 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Sat, 23 Apr 2022 20:45:36 GMT Subject: Integrated: 8193543: Regression automated test '/open/test/jdk/java/awt/TrayIcon/SystemTrayInstance/SystemTrayInstanceTest.java' fails In-Reply-To: <6S1J2MYhxOU4Gt_H5xTetVR0pkrM7iIlLfkOf9mlo_g=.ccdbb91e-16b1-4982-85d8-27e6a2754939@github.com> References: <6S1J2MYhxOU4Gt_H5xTetVR0pkrM7iIlLfkOf9mlo_g=.ccdbb91e-16b1-4982-85d8-27e6a2754939@github.com> Message-ID: <4ZDol2DNUoE5XS3Qrt_piKBVI_0IeqWG6kaIXshWEng=.5e207f17-bb12-46cb-8daa-3aa0be9914c7@github.com> On Thu, 21 Apr 2022 17:47:12 GMT, Alexander Zvegintsev wrote: > Looks like this test was written based on assumption that SystemTray is supported on all platforms. > > However on Linux it may not be true. > > Availability of SystemTray is detected by getting owner of `_NET_SYSTEM_TRAY` selection: > > https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.desktop/unix/classes/sun/awt/X11/XSystemTrayPeer.java#L42 > > https://github.com/openjdk/jdk/blob/739769c8fc4b496f08a92225a12d07414537b6c0/src/java.desktop/unix/classes/sun/awt/X11/XSystemTrayPeer.java#L58-L59 > > > As an example, SystemTray is not available on Wayland because of this. > > > > So I modified the test: > > - WIndows and macOS: expecting available SystemTray. > - Linux: check absence/presence of `UnsupportedOperationException` exception of `SystemTray.getSystemTray()` call based on `SystemTray.isSupported()` result. > > Testing is green on all platforms. This pull request has now been integrated. Changeset: 08024d95 Author: Alexander Zvegintsev URL: https://git.openjdk.java.net/jdk/commit/08024d9583d02398d986db0e9b32fe19a2b8fec2 Stats: 29 lines in 2 files changed: 14 ins; 2 del; 13 mod 8193543: Regression automated test '/open/test/jdk/java/awt/TrayIcon/SystemTrayInstance/SystemTrayInstanceTest.java' fails Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8346 From tnakamura at openjdk.java.net Mon Apr 25 08:15:18 2022 From: tnakamura at openjdk.java.net (Toshio Nakamura) Date: Mon, 25 Apr 2022 08:15:18 GMT Subject: RFR: 8285308: Win: Japanese logical fonts are drawn with wrong size [v2] In-Reply-To: References: Message-ID: > Japanese logical fonts are drawn with wrong size since Java 18. > It's triggered by JEP 400, UTF-8 by Default. `sun.awt.FontConfiguration` (and `sun.awt.windows.WFontConfiguration`) seems to expect the native encoding instead of the default encoding. This patch changes to use native encoding. > > Tested: jdk_desktop on Windows, Linux, and macOS Toshio Nakamura has updated the pull request incrementally with one additional commit since the last revision: Moved the fix to WFontConfiguration ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8329/files - new: https://git.openjdk.java.net/jdk/pull/8329/files/b8d737de..2a409cc6 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8329&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8329&range=00-01 Stats: 17 lines in 2 files changed: 10 ins; 3 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/8329.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8329/head:pull/8329 PR: https://git.openjdk.java.net/jdk/pull/8329 From psadhukhan at openjdk.java.net Mon Apr 25 09:43:55 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Mon, 25 Apr 2022 09:43:55 GMT Subject: RFR: 8284888 : [macos] javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java failed with "NimbusLookAndFeel] : ERROR: icon and imageIcon not same." Message-ID: Test used to fail in specific CI macos M1 system owing to miniscule color difference x 0 y 0 red1 171 red2 171 green1 174 green2 175 blue1 184 blue2 184 x 0 y 1 red1 172 red2 173 green1 177 green2 177 blue1 185 blue2 185 x 0 y 2 red1 173 red2 174 green1 177 green2 178 blue1 187 blue2 187 x 0 y 6 red1 0 red2 0 green1 1 green2 0 blue1 0 blue2 0 x 0 y 15 red1 1 red2 0 green1 0 green2 0 blue1 0 blue2 0 SInce we already have color-tolerance check present, there is no need of exact color value check. Also, made the frame undecorated and remove unneeded library being built. Several iterations of the test passed in the same system (where it used to fail 4/7) along with other platforms (link in JBS) ------------- Commit messages: - Fix Changes: https://git.openjdk.java.net/jdk/pull/8380/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8380&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284888 Stats: 14 lines in 1 file changed: 4 ins; 3 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/8380.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8380/head:pull/8380 PR: https://git.openjdk.java.net/jdk/pull/8380 From azvegint at openjdk.java.net Mon Apr 25 10:05:29 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Mon, 25 Apr 2022 10:05:29 GMT Subject: Integrated: 8225777: java/awt/Mixing/MixingOnDialog.java fails on Ubuntu In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 07:58:39 GMT, Alexander Zvegintsev wrote: > The test was failing due to it tried to place windows too close to left top corner, so they got shifted from the dock and top panel on Gnome. > > Shifting all test windows fixes the issue. > > > Testing is green on all platforms. This pull request has now been integrated. Changeset: 36f2e524 Author: Alexander Zvegintsev URL: https://git.openjdk.java.net/jdk/commit/36f2e5240b8c4d94643188d3a9d87d906c1e8bdf Stats: 177 lines in 2 files changed: 7 ins; 141 del; 29 mod 8225777: java/awt/Mixing/MixingOnDialog.java fails on Ubuntu Reviewed-by: prr, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8326 From azvegint at openjdk.java.net Mon Apr 25 10:06:20 2022 From: azvegint at openjdk.java.net (Alexander Zvegintsev) Date: Mon, 25 Apr 2022 10:06:20 GMT Subject: Integrated: 8129778: Few awt test fail for Solaris 11 with RuntimeException In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 13:24:15 GMT, Alexander Zvegintsev wrote: > Those tests were failing on Solaris, which is no longer supported. > > They pass as they are, but decreasing of delays reduce execution time significantly: > > e.g. proposed changes drops execution time from ~5min to ~2 min > for MouseButtonsAndKeyMasksTest on my machine. > > Testing is green on all platforms. This pull request has now been integrated. Changeset: 293bc5e5 Author: Alexander Zvegintsev URL: https://git.openjdk.java.net/jdk/commit/293bc5e5cdef4590106de81473cc8b2d2793987a Stats: 44 lines in 4 files changed: 22 ins; 6 del; 16 mod 8129778: Few awt test fail for Solaris 11 with RuntimeException Reviewed-by: serb, prr ------------- PR: https://git.openjdk.java.net/jdk/pull/8339 From smandalika at openjdk.java.net Mon Apr 25 11:36:28 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Mon, 25 Apr 2022 11:36:28 GMT Subject: RFR: 8282857: Create a regression test for JDK-4702690 [v3] In-Reply-To: <1MCuz4h2_IMc9oR2q-DP_O5xoiS_7j1cQ8DTHaQxDlU=.a5b07c51-39fa-4c39-aa2d-74643c22cf0f@github.com> References: <1MCuz4h2_IMc9oR2q-DP_O5xoiS_7j1cQ8DTHaQxDlU=.a5b07c51-39fa-4c39-aa2d-74643c22cf0f@github.com> Message-ID: On Wed, 6 Apr 2022 07:02:25 GMT, Srinivas Mandalika wrote: >> Create a regression test for [JDK-4702690](https://bugs.openjdk.java.net/browse/JDK-4702690) >> >> In many cases in Swing it is possible to easily programatically determine that a JScrollBar (or two) is scrolling some JPanel (the cannonical case is a JScrollPane). >> In these cases, when accessibility support is instantiated (e.g. the AccessibleJScrollBar is created), a Controller_For and Controled_By relation should be instantiated between the AccessibleJScrollBar and the AccessibleJPanel that the JScrollBar and JPanel are associated with. >> >> This allows various assistive technologies, especially voice-recognition technologies, to better interact with scrolling items. >> >> The test put up validates that the target object for these properties(CONTROLLED_BY, CONTROLLED_FOR) are set appropriately for JScrollPane and JScrollBar. >> This review is for migrating tests from a closed test suite to open. > > Srinivas Mandalika has updated the pull request incrementally with two additional commits since the last revision: > > - Review Comments Fixed: Swing Components on EDT, 80 chars lines > - Review Comments Fixed: Swing Components on EDT, 80 chars lines @mrserb can you please review the changes after incorporating the earlier feedback ? ------------- PR: https://git.openjdk.java.net/jdk/pull/7753 From smandalika at openjdk.java.net Mon Apr 25 11:36:42 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Mon, 25 Apr 2022 11:36:42 GMT Subject: RFR: JDK-8282778: Create a regression test for JDK-4699544 [v4] In-Reply-To: References: Message-ID: On Tue, 12 Apr 2022 09:05:56 GMT, Srinivas Mandalika wrote: >> Create a regression test for JDK-4699544 >> >> The subclass of javax.swing.JRootPane (AccessibleJRootPane) that implements the accessibility interface javax.accessibility.AccessibleComponent is derived from java.awt.AccessibleAWTComponent, which returns null for getAccessibleAt() because a component does not necessarily have childs. >> >> The root pane always has a content pane child, so getAccessibleAt() should be overwritten by AccessibleJRootPane appropriately. >> The test added verifies the same. >> This review is for migrating tests from a closed test suite to open. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > Review Comments Fixed: removed redundant class variables @mrserb can you please review the changes after incorporating the earlier feedback ? ------------- PR: https://git.openjdk.java.net/jdk/pull/7739 From smandalika at openjdk.java.net Mon Apr 25 11:37:31 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Mon, 25 Apr 2022 11:37:31 GMT Subject: RFR: JDK-8282933: Create a test for JDK-4529616 [v4] In-Reply-To: References: <3d_szd4R6oyDqof-g7sLsV_wkAzuEuma-aXiiUZ03Zw=.6579f560-f11e-4bea-a292-dfcee111a246@github.com> Message-ID: On Thu, 7 Apr 2022 07:02:18 GMT, Srinivas Mandalika wrote: >> JDK-8282933: Create a test for JDK-4529616 >> AccessibleJTableCell.isShowing() returns false when the cell is actually on >> the screen. >> The test validates the fix for the above issue by verifying that the isShowing call returns true when invoked via the accessiblity context. >> This review is for migrating tests from a closed test suite to open. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > 8282933: Whitespace issue fixed Hi! Can someone please take a look at PR and provide their valuable feedback ? ------------- PR: https://git.openjdk.java.net/jdk/pull/7783 From smandalika at openjdk.java.net Mon Apr 25 11:39:30 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Mon, 25 Apr 2022 11:39:30 GMT Subject: RFR: JDK-8282777: Create a Regression test for JDK-4515031 [v3] In-Reply-To: References: Message-ID: On Wed, 30 Mar 2022 10:05:22 GMT, Srinivas Mandalika wrote: >> Create a Regression test for [JDK-4515031](https://bugs.openjdk.java.net/browse/JDK-4515031) >> >> The issue indicates the need for a a getAccessibleDescription being implemented for the JFileChooser. >> The test added verifies the same. >> This review is for migrating tests from a closed test suite to open. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > Review Comments Fixed: Button on EDT, split long lines, volatile description string @mrserb can you please review the changes after incorporating the earlier feedback ? ------------- PR: https://git.openjdk.java.net/jdk/pull/7738 From smandalika at openjdk.java.net Mon Apr 25 11:40:30 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Mon, 25 Apr 2022 11:40:30 GMT Subject: RFR: 8284077: Create an automated test for JDK-4170173 [v2] In-Reply-To: References: <8iul_waSMDD6G1oVVmwPtW89ihAc6YoMFrTR1-XFmmw=.7802104e-60cb-4b90-9ef5-cc479d3f5a78@github.com> Message-ID: On Tue, 12 Apr 2022 06:09:35 GMT, Srinivas Mandalika wrote: >> Create an automated test for [JDK-4170173](https://bugs.openjdk.java.net/browse/JDK-4170173) >> >> Issue >> JTextComponent.AccessibleJTextComponent.getAfterIndex(int part, int index) works incorrectly, when 'part' parameter is AccessibleText.WORD. >> It returns a space (" ") instead of the correct word. >> >> The test verifies the fix for this behavior by checking the getAfterIndex for AccessibleText.CHARACTER,AccessibleText.WORD,AccessibleText.SENTENCE for the components JTextField, JTextArea, JEditorPane. >> >> While working on this test case there was a related bug relevant to this [JDK-4170174](https://bugs.openjdk.java.net/browse/JDK-4170174) >> This is marked as duplicate, addressess a similar issue. >> It indicates that JTextComponent.AccessibleJTextComponent.getBeforeIndex(int part, int index) works incorrectly, when part parameter is AccessibleText.WORD. >> It returns a space (" ") instead of correct word. >> >> Hence an additional test was added for this, for verifying the behavior of getBeforeIndex. >> AccessibleText.CHARACTER,AccessibleText.WORD,AccessibleText.SENTENCE for the components JTextField, JTextArea, JEditorPane. >> >> The two tests have multiple distinct assertions. For this reason, as well as for maintainability, the two were not clubbed into a single test. >> However, the two tests are still similar in the functional flow of the code and the functionality they are testing as well - hence they have been clubbed into a single review. >> This review is for migrating tests from a closed test suite to open. >> >> Testing: >> The tests ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > Review Comments Fixed: Simplied test @mrserb can you please review the changes after I have incorporated the earlier feedback ? ------------- PR: https://git.openjdk.java.net/jdk/pull/8138 From smandalika at openjdk.java.net Mon Apr 25 11:41:25 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Mon, 25 Apr 2022 11:41:25 GMT Subject: RFR: 8284524: Create an automated test for JDK-4422362 [v2] In-Reply-To: References: Message-ID: On Tue, 12 Apr 2022 09:19:33 GMT, Srinivas Mandalika wrote: >> Create an automated test for [JDK-4422362](https://bugs.openjdk.java.net/browse/JDK-4422362) >> >> The BoundedRangeModel components (JScrollBar, JSlider, JProgressBar) return >> BoundedRangeModel.getMaximum() from getMaximumAccessibleValue() in their >> AccessibleValue implementation. >> The real maximum value (due to the constraints on BoundedRangeModel) is >> model.getMaximum() - model.getExtent(). >> >> The test verifies that the above is adhered to as expected. >> >> This review is for migrating tests from a closed test suite to open. >> >> Testing: >> The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > 8284524: Create an automated test for JDK-4422362 Hi! Can someone please take a look at this PR and provide their valuable feedback ? ------------- PR: https://git.openjdk.java.net/jdk/pull/8158 From smandalika at openjdk.java.net Mon Apr 25 13:25:38 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Mon, 25 Apr 2022 13:25:38 GMT Subject: RFR: 8285373: Create an automated test for JDK-4702233 In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 15:54:02 GMT, Srinivas Mandalika wrote: > Create an automated test for [JDK-4702233](https://bugs.openjdk.java.net/browse/JDK-4702233) > > Several new AccessibleRole and AccessibleRelation constants are needed in those classes in the java.accessibility package. These new contants codify additions made in the GNOME, Netscape, and UNO (StarOffice) accessibility APIs. > StarOffice 6.1 and GNOME accessibility require new role, state and relation > constants in the javax.accessibility package. The existing constants are > inadequate for providing accessibility to StarOffice and GNOME applications > as required by Section 508. > > Solution > -------- > Define new constants in the javax.accessibility package. > AccessibleRelation > AccessibleRoles > AccessibleState > AccessibleAction > AccessibleContext > > The test validates the public fields of the above AccessibleConstants. > > This review is for migrating tests from a closed test suite to open. > > Testing: > The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. Hi! Can someone please take a look at this PR and provide their valuable feedback ? ------------- PR: https://git.openjdk.java.net/jdk/pull/8342 From smandalika at openjdk.java.net Mon Apr 25 13:27:49 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Mon, 25 Apr 2022 13:27:49 GMT Subject: RFR: 8285305: Create an automated test for JDK-4495286 In-Reply-To: References: Message-ID: <5fEx9Yh6mRMaadW78bDMKsYC_KUNkkaT3ofjV3fSFF8=.4d084c28-d8f6-4939-a23d-7e73fe163e5c@github.com> On Thu, 21 Apr 2022 10:51:18 GMT, Srinivas Mandalika wrote: > Create an automated test for [JDK-4495286](https://bugs.openjdk.java.net/browse/JDK-4495286) > > AccessibleJTable.setAccessibleSelction should select rows/cols when cell selection. > When cell selection is not enabled, there is no way, using > accessibility, to select rows or columns. It seems logical that selecting a cell > using accessibility should have the same effect as clicking on a cell with the > mouse. That is, if row or column selection is enabled, then selecting a cell > should instead cause the row or column to be selected. > The proposed test verifies that the above behavior is fixed. > > This review is for migrating tests from a closed test suite to open. > > Testing: > The test ran successfully on Mach5 with multiple runs (40) on windows-x64, linux-x64 and macos-x64. Hi! Can someone please take a look at this PR and provide their valuable feedback ? ------------- PR: https://git.openjdk.java.net/jdk/pull/8333 From achung at openjdk.java.net Mon Apr 25 16:10:36 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Mon, 25 Apr 2022 16:10:36 GMT Subject: RFR: 8198666: Many java/awt/Modal/OnTop/ test fails on mac In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 17:38:28 GMT, Alisen Chung wrote: > Removed passing tests from problem list Tests were run 100 times and passed ------------- PR: https://git.openjdk.java.net/jdk/pull/8368 From duke at openjdk.java.net Mon Apr 25 16:46:28 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Mon, 25 Apr 2022 16:46:28 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v7] In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 16:44:07 GMT, Harshitha Onkar wrote: >> The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. >> >> The following approaches were evaluated before considering it as not a test issue - >> >> - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. >> >> - Removing existing constraints on text and icon is incompatible for Aqua LAF. >> >> Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list >> >> ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > formatted test instructions PR requires a second reviewer approval ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From duke at openjdk.java.net Mon Apr 25 16:50:28 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Mon, 25 Apr 2022 16:50:28 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v8] In-Reply-To: <5VA647IOBnDIdo8c2iI3eonRjOA-udrPOEoBqqpVBQ8=.92d2beb7-c8b6-4d96-b120-723d34c0c356@github.com> References: <5VA647IOBnDIdo8c2iI3eonRjOA-udrPOEoBqqpVBQ8=.92d2beb7-c8b6-4d96-b120-723d34c0c356@github.com> Message-ID: On Tue, 5 Apr 2022 05:48:37 GMT, Prasanta Sadhukhan wrote: > Need more change @prsadhuk Suggested changes have been incorporated. Needs to be re-reviewed. PR requires second reviewer ------------- PR: https://git.openjdk.java.net/jdk/pull/7768 From serb at openjdk.java.net Mon Apr 25 17:16:25 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 25 Apr 2022 17:16:25 GMT Subject: RFR: 8284888 : [macos] javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java failed with "NimbusLookAndFeel] : ERROR: icon and imageIcon not same." In-Reply-To: References: Message-ID: On Mon, 25 Apr 2022 09:37:10 GMT, Prasanta Sadhukhan wrote: > Test used to fail in specific CI macos M1 system owing to miniscule color difference > > > x 0 y 0 red1 171 red2 171 green1 174 green2 175 blue1 184 blue2 184 > x 0 y 1 red1 172 red2 173 green1 177 green2 177 blue1 185 blue2 185 > x 0 y 2 red1 173 red2 174 green1 177 green2 178 blue1 187 blue2 187 > x 0 y 6 red1 0 red2 0 green1 1 green2 0 blue1 0 blue2 0 > x 0 y 15 red1 1 red2 0 green1 0 green2 0 blue1 0 blue2 0 > > > SInce we already have color-tolerance check present, there is no need of exact color value check. > Also, made the frame undecorated and remove unneeded library being built. > Several iterations of the test passed in the same system (where it used to fail 4/10) along with other platforms (link in JBS) The JDK-8284888 bug is not public, cannot see a bug description. ------------- PR: https://git.openjdk.java.net/jdk/pull/8380 From achung at openjdk.java.net Mon Apr 25 17:24:23 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Mon, 25 Apr 2022 17:24:23 GMT Subject: RFR: 7080150: [TEST_BUG][macosx] No mac os x EmbeddedFrame support in regression regtesthelpers [v2] In-Reply-To: References: <6ZgUTjzqY7BMiXBOVBgNe0eDs-cRoH6AaHf3xv_fV9Q=.c2db1051-7791-49db-9cfd-fd730aa67b90@github.com> Message-ID: On Fri, 22 Apr 2022 22:30:06 GMT, Sergey Bylokhov wrote: >> CEmbeddedFrame doesn't have a way to pass in a handle like in WEmbeddedFrame and XEmbeddedFrame, so I can't pass in the peer's target. If I try to use CEmbeddedFrame the test window will pop up but the EmbeddedFrame won't show up and the test fails > > Are you sure that CEmbeddedFrame is used in the embedding functionality? We have another one on macOS CViewEmbeddedFrame. One of them was used for applets another one was used by the JAWT and SWT. Please double-check that the correct one is used for this test, and another one probably can be removed. I see that windows and linux have a long value that identifies the window that gets pass into the constructor of the EmbeddedFrame class object. Is there an equivalent in macOS? I see that CViewEmbeddedFrame has the nsViewPtr that is equivalent, but I don't see any way to find that value from LWComponentPeer. ------------- PR: https://git.openjdk.java.net/jdk/pull/8348 From prr at openjdk.java.net Mon Apr 25 19:26:29 2022 From: prr at openjdk.java.net (Phil Race) Date: Mon, 25 Apr 2022 19:26:29 GMT Subject: RFR: JDK-8202790: DnD test DisposeFrameOnDragTest.java does not clean up In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 19:41:44 GMT, Alisen Chung wrote: > Added a background to the test to prevent the file from dragging onto the desktop and creating an extra file. InputEvent.BUTTON1_MASK); could be BUTTON1_DOWN_MASK since you are touching this already. ------------- PR: https://git.openjdk.java.net/jdk/pull/8370 From serb at openjdk.java.net Mon Apr 25 19:49:26 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 25 Apr 2022 19:49:26 GMT Subject: RFR: 8284888 : [macos] javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java failed with "NimbusLookAndFeel] : ERROR: icon and imageIcon not same." In-Reply-To: References: Message-ID: On Mon, 25 Apr 2022 09:37:10 GMT, Prasanta Sadhukhan wrote: > Test used to fail in specific CI macos M1 system owing to miniscule color difference > > > x 0 y 0 red1 171 red2 171 green1 174 green2 175 blue1 184 blue2 184 > x 0 y 1 red1 172 red2 173 green1 177 green2 177 blue1 185 blue2 185 > x 0 y 2 red1 173 red2 174 green1 177 green2 178 blue1 187 blue2 187 > x 0 y 6 red1 0 red2 0 green1 1 green2 0 blue1 0 blue2 0 > x 0 y 15 red1 1 red2 0 green1 0 green2 0 blue1 0 blue2 0 > > > SInce we already have color-tolerance check present, there is no need of exact color value check. > Also, made the frame undecorated and remove unneeded library being built. > Several iterations of the test passed in the same system (where it used to fail 4/10) along with other platforms (link in JBS) BTW did you have a chance to check why to images are not the same? Is it a problem in the robot or in the rendering? Can it be related to upscaling/downscaling? ------------- PR: https://git.openjdk.java.net/jdk/pull/8380 From serb at openjdk.java.net Mon Apr 25 19:49:45 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 25 Apr 2022 19:49:45 GMT Subject: RFR: 8198666: Many java/awt/Modal/OnTop/ test fails on mac In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 17:38:28 GMT, Alisen Chung wrote: > Removed passing tests from problem list Good to know that these tests become stable. ------------- Marked as reviewed by serb (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8368 From achung at openjdk.java.net Mon Apr 25 21:46:27 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Mon, 25 Apr 2022 21:46:27 GMT Subject: RFR: JDK-8202790: DnD test DisposeFrameOnDragTest.java does not clean up [v2] In-Reply-To: References: Message-ID: > Added a background to the test to prevent the file from dragging onto the desktop and creating an extra file. Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: changed button mask to button down mask ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8370/files - new: https://git.openjdk.java.net/jdk/pull/8370/files/e9dace84..795d2a2d Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8370&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8370&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8370.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8370/head:pull/8370 PR: https://git.openjdk.java.net/jdk/pull/8370 From kizune at openjdk.java.net Mon Apr 25 21:54:27 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Mon, 25 Apr 2022 21:54:27 GMT Subject: RFR: JDK-8202790: DnD test DisposeFrameOnDragTest.java does not clean up [v2] In-Reply-To: References: Message-ID: On Mon, 25 Apr 2022 21:46:27 GMT, Alisen Chung wrote: >> Added a background to the test to prevent the file from dragging onto the desktop and creating an extra file. > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > changed button mask to button down mask Marked as reviewed by kizune (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8370 From kizune at openjdk.java.net Mon Apr 25 21:57:03 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Mon, 25 Apr 2022 21:57:03 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v7] In-Reply-To: References: Message-ID: <4i0T8PjQa_xsdd_CcbuV26ukematijv0mjh1UYwwIQA=.497dab04-f5f4-4c1f-a409-132a08c99e56@github.com> On Fri, 22 Apr 2022 16:44:07 GMT, Harshitha Onkar wrote: >> The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. >> >> The following approaches were evaluated before considering it as not a test issue - >> >> - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. >> >> - Removing existing constraints on text and icon is incompatible for Aqua LAF. >> >> Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list >> >> ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > formatted test instructions Marked as reviewed by kizune (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From duke at openjdk.java.net Mon Apr 25 22:31:49 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Mon, 25 Apr 2022 22:31:49 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v7] In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 23:15:51 GMT, Sergey Bylokhov wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> formatted test instructions > > Probably we should think about care of the big font in the aqua L&F and decrease the size we know it is too big? @mrserb I have added a new issue ([JDK-8285615](https://bugs.openjdk.java.net/browse/JDK-8285615)) to keep track and handle big fonts for Aqua LAF as a separate issue from the test issue. I wanted to check if you wanted to add anything more to this PR or the newly created issue. ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From duke at openjdk.java.net Mon Apr 25 22:43:13 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Mon, 25 Apr 2022 22:43:13 GMT Subject: RFR: 8285612 : Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/ImagePrinting/ClippedImages.java Message-ID: 1) Removed yesno to eliminate parserException 2) Added code to fit into manual framework so that timeout, pass & fail is handled. 3) Added code to mark the test as pass if printer service is not available 4) Added code to handle pressing or clicking of 'Cancel' button. @shurymury @aivanov-jdk ------------- Commit messages: - 8285612 : Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/ImagePrinting/ClippedImages.java Changes: https://git.openjdk.java.net/jdk/pull/8391/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8391&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285612 Stats: 160 lines in 1 file changed: 66 ins; 50 del; 44 mod Patch: https://git.openjdk.java.net/jdk/pull/8391.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8391/head:pull/8391 PR: https://git.openjdk.java.net/jdk/pull/8391 From prr at openjdk.java.net Mon Apr 25 23:02:54 2022 From: prr at openjdk.java.net (Phil Race) Date: Mon, 25 Apr 2022 23:02:54 GMT Subject: RFR: JDK-8202790: DnD test DisposeFrameOnDragTest.java does not clean up [v2] In-Reply-To: References: Message-ID: <28HU4vrRBnDRzQLQN7czzkP8cNy21PeejLWQhA1_HZI=.545d71ad-4d5d-41e2-8ffd-c406435eb614@github.com> On Mon, 25 Apr 2022 21:46:27 GMT, Alisen Chung wrote: >> Added a background to the test to prevent the file from dragging onto the desktop and creating an extra file. > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > changed button mask to button down mask Marked as reviewed by prr (Reviewer). It looks OK. Would be nice to have a comment explaining that you are trying to prevent drop on to the desktop which might accept this dragged text. In fact you should explain this in the bug report eval too. ------------- PR: https://git.openjdk.java.net/jdk/pull/8370 From serb at openjdk.java.net Mon Apr 25 23:06:54 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Mon, 25 Apr 2022 23:06:54 GMT Subject: RFR: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane [v7] In-Reply-To: References: Message-ID: <9rr0MSXnGerpXmpnQtEuciG14u9eG-hyTzU-6zY-k4o=.65d08265-91f8-4626-a7bc-b15de5f00526@github.com> On Fri, 22 Apr 2022 16:44:07 GMT, Harshitha Onkar wrote: >> The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. >> >> The following approaches were evaluated before considering it as not a test issue - >> >> - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. >> >> - Removing existing constraints on text and icon is incompatible for Aqua LAF. >> >> Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list >> >> ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > formatted test instructions Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From prr at openjdk.java.net Mon Apr 25 23:48:51 2022 From: prr at openjdk.java.net (Phil Race) Date: Mon, 25 Apr 2022 23:48:51 GMT Subject: RFR: JDK-8202790: DnD test DisposeFrameOnDragTest.java does not clean up [v2] In-Reply-To: References: Message-ID: On Mon, 25 Apr 2022 21:46:27 GMT, Alisen Chung wrote: >> Added a background to the test to prevent the file from dragging onto the desktop and creating an extra file. > > Alisen Chung has updated the pull request incrementally with one additional commit since the last revision: > > changed button mask to button down mask Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8370 From tnakamura at openjdk.java.net Tue Apr 26 00:02:51 2022 From: tnakamura at openjdk.java.net (Toshio Nakamura) Date: Tue, 26 Apr 2022 00:02:51 GMT Subject: RFR: 8285308: Win: Japanese logical fonts are drawn with wrong size In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 03:24:09 GMT, Phil Race wrote: >> Japanese logical fonts are drawn with wrong size since Java 18. >> It's triggered by JEP 400, UTF-8 by Default. `sun.awt.FontConfiguration` (and `sun.awt.windows.WFontConfiguration`) seems to expect the native encoding instead of the default encoding. This patch changes to use native encoding. >> >> Tested: jdk_desktop on Windows, Linux, and macOS > > Hmm. I am surprised that the glyphs are actually bigger. Did you come to understand the exact mechanism (steps) > by which this triggers the wrong size ? Without that explanation it isn't apparent to me we've understood the problem > even if this fixes it. > > And whilst you tested linux & mac it is a shared code change so it is another reason to understand .. > > And are you sure you can't write a test ? Even something that uses heuristics around the metrics ? Thank you for the comments, @prrace @naotoj The bigger fonts are caused by the behavior of RichEdit component. I was able to recreate the similar behavior with a native application. I attached the code and the screen shot to JBS. RichEdit seems to use fallback font if English font (Arial, for example) was set for Japanese text. It could show Japanese, but its size was not perfect. So, we need to set a proper font. NG case (Java18): "Arial 9pt" with ANSI_CHARSET was used. OK case (Java17): "MS Gothic 9pt" with SHIFTJIS_CHARSET was used. > And whilst you tested linux & mac it is a shared code change so it is another reason to understand .. OK, I moved the fix to Windows part. I need to change setEncoding method to protected, because "encoding" value was used in the constructor. > And are you sure you can't write a test ? Even something that uses heuristics around the metrics ? Sorry, I tried some ways, but I couldn't. It tightly binds with OS settings. A pre-submit test was failed once, but passed after rerun. ------------- PR: https://git.openjdk.java.net/jdk/pull/8329 From duke at openjdk.java.net Tue Apr 26 01:51:18 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Tue, 26 Apr 2022 01:51:18 GMT Subject: RFR: 8285617 : Fix java/awt/print/PrinterJob/ImagePrinting/PrintARGBImage.java manual test Message-ID: 1) Removed yesno since test was failing with parser error due to @run main/manual=yesno 2) User can't decide whether it as pass or fail after looking into the printout so add the PassFailJFrame support @shurymury @aivanov-jdk ------------- Commit messages: - 8285617 : Fix java/awt/print/PrinterJob/ImagePrinting/PrintARGBImage.java manual test Changes: https://git.openjdk.java.net/jdk/pull/8395/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8395&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285617 Stats: 49 lines in 1 file changed: 26 ins; 7 del; 16 mod Patch: https://git.openjdk.java.net/jdk/pull/8395.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8395/head:pull/8395 PR: https://git.openjdk.java.net/jdk/pull/8395 From psadhukhan at openjdk.java.net Tue Apr 26 03:52:01 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 26 Apr 2022 03:52:01 GMT Subject: RFR: 8284888 : [macos] javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java failed with "NimbusLookAndFeel] : ERROR: icon and imageIcon not same." In-Reply-To: References: Message-ID: <1OYwEG8b8QLK1qYmQ3DIAL6XwKN-Le4-1ceI2-hX2u4=.6df0b3d6-c07e-46a6-8ecb-99ac2b65e075@github.com> On Mon, 25 Apr 2022 09:37:10 GMT, Prasanta Sadhukhan wrote: > Test used to fail in specific CI macos M1 system owing to miniscule color difference > > > x 0 y 0 red1 171 red2 171 green1 174 green2 175 blue1 184 blue2 184 > x 0 y 1 red1 172 red2 173 green1 177 green2 177 blue1 185 blue2 185 > x 0 y 2 red1 173 red2 174 green1 177 green2 178 blue1 187 blue2 187 > x 0 y 6 red1 0 red2 0 green1 1 green2 0 blue1 0 blue2 0 > x 0 y 15 red1 1 red2 0 green1 0 green2 0 blue1 0 blue2 0 > > > SInce we already have color-tolerance check present, there is no need of exact color value check. > Also, made the frame undecorated and remove unneeded library being built. > Several iterations of the test passed in the same system (where it used to fail 4/10) along with other platforms (link in JBS) The bug is made public. The images looks alike visually. I could not find anything wrong with rendering or robot which otherwise could have caused issue in other systems and platforms but it's only failing in this CI system (but color profile setting is ok). As per [JDK-8266247](https://bugs.openjdk.java.net/browse/JDK-8266247) which also happens in same mc, some faulty video memory is doubted. Also, it's not happening everytime but intermittently so seeing all this, I have just relaxed color check a bit ------------- PR: https://git.openjdk.java.net/jdk/pull/8380 From psadhukhan at openjdk.java.net Tue Apr 26 04:01:04 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 26 Apr 2022 04:01:04 GMT Subject: RFR: 8208565: [TEST_BUG] javax\swing\PopupFactory\6276087\NonOpaquePopupMenuTest.java throws NPE In-Reply-To: References: Message-ID: On Mon, 18 Apr 2022 07:11:45 GMT, Prasanta Sadhukhan wrote: > Test was failing in the past owing to NPE while accessing JMenu probably owing to fact the test did not wait for UI to be visible before starting the test, so added a delay after the frame is made visible. Also, added disposal of frame. > Also, it seems JDK-8213535 fix might be having a positive impact on this test. > > Several iterations of this test in all platforms have passed (link in JBS). Any reviewers? ------------- PR: https://git.openjdk.java.net/jdk/pull/8282 From psadhukhan at openjdk.java.net Tue Apr 26 05:34:50 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 26 Apr 2022 05:34:50 GMT Subject: RFR: 7080150: [TEST_BUG][macosx] No mac os x EmbeddedFrame support in regression regtesthelpers [v2] In-Reply-To: References: <6ZgUTjzqY7BMiXBOVBgNe0eDs-cRoH6AaHf3xv_fV9Q=.c2db1051-7791-49db-9cfd-fd730aa67b90@github.com> Message-ID: On Mon, 25 Apr 2022 17:20:39 GMT, Alisen Chung wrote: >> Are you sure that CEmbeddedFrame is used in the embedding functionality? We have another one on macOS CViewEmbeddedFrame. One of them was used for applets another one was used by the JAWT and SWT. Please double-check that the correct one is used for this test, and another one probably can be removed. > > I see that windows and linux have a long value that identifies the window that gets pass into the constructor of the EmbeddedFrame class object. Is there an equivalent in macOS? I see that CViewEmbeddedFrame has the nsViewPtr that is equivalent, but I don't see any way to find that value from LWComponentPeer. It seems LWCToolkit creates a CViewPlatformEmbeddedFrame for VIEW_EMBEDDED_FRAME type so probably you can call CViewPlatformEmbeddedFrame.getNSViewPtr to get the long value and then call CViewEmbeddedFrame with the nsviewPtr value ------------- PR: https://git.openjdk.java.net/jdk/pull/8348 From psadhukhan at openjdk.java.net Tue Apr 26 06:01:06 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Tue, 26 Apr 2022 06:01:06 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v11] In-Reply-To: <9T2LZvjkusyRd4JjbAU5_Yn277lAOnC02Esvq_R8yyg=.136fa8f8-0768-4774-8461-4591ca071453@github.com> References: <9T2LZvjkusyRd4JjbAU5_Yn277lAOnC02Esvq_R8yyg=.136fa8f8-0768-4774-8461-4591ca071453@github.com> Message-ID: On Tue, 12 Apr 2022 00:22:31 GMT, Harshitha Onkar wrote: >> Previously while tabbing through the JTable cell, the cell highlighter/focus ring was not visible against the selection background. >> >> Changes are made to Aqua LAF to derive a lighter focus ring color by changing saturation and setting brightness component to 100% of original focus ring color so that it is visible while tabbing through `JTable` cells. A new method is added for this purpose which takes in `focusRingColor`, does adjustment to saturation and brightness and returns a new focus ring color. There are edge cases where the HSB transformation does not yield the right focus ring color, for these cases a default color is returned. >> >> **Edge Cases** >> ![image](https://user-images.githubusercontent.com/95945681/161360456-3929acf1-282b-4c2b-95d1-1d5707c1e238.png) >> >> The edge case condition consists of two parts ? >> To handle white/black colors - (hsbValues[0] == 0 && hsbValues[1] == 0) - representing hue and saturation of zero obtained for black, white or exactly grey (red=green=color) conditions >> To handle grayish colors - hsbValues[1] <= satGrayScale where satGrayScale <= 0.10 . For any given hue and brightness, a saturation of less than or equal to 10% represents grayish tint colors. >> (The second case was added to accommodate grayish focus ring color returned by system when Accent color = Graphite. The returned color is not exactly gray but grayish (r=135, g=135, b=140)). >> To accommodate a more generic case of grayish colors, the satGrayScale has a threshold or buffer of 0.10 or 10%. >> >> Used the following resources to test out different grayish colors and optimal saturation offsets used in `deriveLighterFocusRing()`. >> >> - [RapidTables](https://www.rapidtables.com/convert/color/rgb-to-hsl.html) >> - [Colorizer](http://colorizer.org/). >> - [Chart Link](https://codepen.io/HunorMarton/details/eWvewo) >> >> A test case is added to compare the RGB difference between the original focus ring color & selection background and the new focus ring color & selection background. >> >> PS: The native L&F (Mac OS) and Swing L&F for JTable cell tabbing differs (on native tables the cell background turns white on focus with a cell focus ring). Since the background for Swing tables can be set by users and also overridden by subclassing `DefaultTableCellRenderer`, and to adhere to current implementation of Swing, the white cell background changes are not incorporated. Only the Focus Ring/ Cell Highlighter is made more prominent. > > Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: > > added new color to CSystemColors.m - CELL_HIGHLIGHT_COLOR src/java.desktop/macosx/classes/com/apple/laf/AquaLookAndFeel.java line 392: > 390: > 391: // for table cell highlighter > 392: final Color cellFocusRing = AquaImageFactory.getCellHighlightColorUIResource(); overall looks ok. I believe you have tested well in BigSur and Monterey also.. Minor nit, this cellFocusRing should be "cellFocusRingColor" like other color variables. ------------- PR: https://git.openjdk.java.net/jdk/pull/7768 From jdv at openjdk.java.net Tue Apr 26 06:06:54 2022 From: jdv at openjdk.java.net (Jayathirth D V) Date: Tue, 26 Apr 2022 06:06:54 GMT Subject: RFR: 8198622: java/awt/Focus/TypeAhead/TestFocusFreeze.java fails on mac [v2] In-Reply-To: References: <8guUkZCRSqeoI9P6-bxBTJjWgQuw_nQbLcfuUeUv3MA=.0fffd884-dff4-4bdc-a522-be7cf921a72c@github.com> Message-ID: On Wed, 20 Apr 2022 18:05:04 GMT, Alisen Chung wrote: >> test passes, so removing from problem list > > Alisen Chung has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: > > - Merge master > - remove test from ProblemList Marked as reviewed by jdv (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8254 From mvs at openjdk.java.net Tue Apr 26 07:11:44 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Tue, 26 Apr 2022 07:11:44 GMT Subject: RFR: 8274597: Some of the dnd tests time out and fail intermittently [v2] In-Reply-To: <-M3RkI7ibFy3E3pyMdIyr-7-WWbZQXFo_4no53mvgDY=.761ad3d4-ff6c-4453-a328-173492e14616@github.com> References: <-M3RkI7ibFy3E3pyMdIyr-7-WWbZQXFo_4no53mvgDY=.761ad3d4-ff6c-4453-a328-173492e14616@github.com> Message-ID: On Wed, 20 Apr 2022 13:28:17 GMT, Manukumar V S wrote: >> These dnd tests fails with a time out intermittently in some machines(mostly Windows 11) which creates frequent noise in CI. >> 1. java/awt/dnd/AcceptDropMultipleTimes/AcceptDropMultipleTimes.java >> 2. java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java >> 3. java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java >> >> Issue : >> These tests are using the Util.drag() method and there was no robot.delay() added between different mouse actions in this method. This could potentially make tests using this method unstable. >> >> Fix: >> Adding a small auto delay of 100ms to fix this. >> >> Testing: >> 1. All the three tests are run 15 times per platform. >> 2. All the tests in java/awt/dnd package run 5 times per platform >> 3. All the three tests are run 5 times specifically on Windows 11 platform. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Added blank line at end of file Any takers? ------------- PR: https://git.openjdk.java.net/jdk/pull/8316 From smandalika at openjdk.java.net Tue Apr 26 09:28:28 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Tue, 26 Apr 2022 09:28:28 GMT Subject: RFR: 8284767: Create an automated test for JDK-4422535 [v2] In-Reply-To: References: Message-ID: <1cZzZNkeKLMbo_-pRiMpaTbVQnRhEZdtJJ1tKQckWQA=.58617cb8-1e88-4bde-9936-f4a0788a72ea@github.com> > Create an automated test for [JDK-4422535](https://bugs.openjdk.java.net/browse/JDK-4422535) > AccessibleValue implementation only accept Integers > The AccessibleValue implementations of the following components: > > java.awt.Scrollbar > javax.swing.AbstractButton > javax.swing.JInternalFrame > javax.swing.JSplitPane > javax.swing.JScrollBar > javax.swing.JProgressBar > javax.swing.JSlider > > require the argument to setCurrentAccessibleValue(Number) to be an Integer, else they completely ignore it - it returns a false indicating that the value has not been set by the return value, but they cannot know the reason for that). > > The test verifies that for each of the above components, the AccessibleValue is set when it is set to a Number (Float, Double, long etc) and not just for an Integer. > > his review is for migrating tests from a closed test suite to open. > > Testing: > The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: Review Comments Fixed: Simplified test code with a loop over the JComponents being tested. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8220/files - new: https://git.openjdk.java.net/jdk/pull/8220/files/21061b62..8536a648 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8220&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8220&range=00-01 Stats: 267 lines in 1 file changed: 4 ins; 248 del; 15 mod Patch: https://git.openjdk.java.net/jdk/pull/8220.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8220/head:pull/8220 PR: https://git.openjdk.java.net/jdk/pull/8220 From smandalika at openjdk.java.net Tue Apr 26 09:28:29 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Tue, 26 Apr 2022 09:28:29 GMT Subject: RFR: 8284767: Create an automated test for JDK-4422535 [v2] In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 18:02:47 GMT, Alisen Chung wrote: >> Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: >> >> Review Comments Fixed: Simplified test code with a loop over the JComponents being tested. > > test/jdk/javax/accessibility/4422535/SetCurrentAccessibleValueTest.java line 93: > >> 91: } >> 92: >> 93: if (!jScrollBar.getAccessibleContext().getAccessibleValue() > > maybe you could write a loop to run each component? Done. Simplified test code with a loop over the JComponents being tested. ------------- PR: https://git.openjdk.java.net/jdk/pull/8220 From prr at openjdk.java.net Tue Apr 26 16:53:53 2022 From: prr at openjdk.java.net (Phil Race) Date: Tue, 26 Apr 2022 16:53:53 GMT Subject: RFR: 8285308: Win: Japanese logical fonts are drawn with wrong size [v2] In-Reply-To: References: Message-ID: On Mon, 25 Apr 2022 08:15:18 GMT, Toshio Nakamura wrote: >> Japanese logical fonts are drawn with wrong size since Java 18. >> It's triggered by JEP 400, UTF-8 by Default. `sun.awt.FontConfiguration` (and `sun.awt.windows.WFontConfiguration`) seems to expect the native encoding instead of the default encoding. This patch changes to use native encoding. >> >> Tested: jdk_desktop on Windows, Linux, and macOS > > Toshio Nakamura has updated the pull request incrementally with one additional commit since the last revision: > > Moved the fix to WFontConfiguration Hmm. I'm not sure I'm seeing what you see in the native app. There the Latin font is larger than the JDK case, and the Japanese font is smaller than the JDK case, and they end up about the same size as each other. Also you have to remember if you select "8 pt" in a windows native app, that (at 100% scale) is at 96dpi, not 72dpi. So that's 96/72 times the size of the Java 8 pt font. 8 * 96 / 72 will round up to 11 pixels in native, not the 8 pixels in Java. Also JDK - in theory - controls the exact fonts that are used even in a TextField. I'd like to see this resolved but I'm still not feeling like I have a sufficient understanding. ------------- PR: https://git.openjdk.java.net/jdk/pull/8329 From duke at openjdk.java.net Tue Apr 26 17:05:12 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Tue, 26 Apr 2022 17:05:12 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v11] In-Reply-To: References: <9T2LZvjkusyRd4JjbAU5_Yn277lAOnC02Esvq_R8yyg=.136fa8f8-0768-4774-8461-4591ca071453@github.com> Message-ID: On Tue, 26 Apr 2022 05:57:32 GMT, Prasanta Sadhukhan wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> added new color to CSystemColors.m - CELL_HIGHLIGHT_COLOR > > src/java.desktop/macosx/classes/com/apple/laf/AquaLookAndFeel.java line 392: > >> 390: >> 391: // for table cell highlighter >> 392: final Color cellFocusRing = AquaImageFactory.getCellHighlightColorUIResource(); > > overall looks ok. I believe you have tested well in BigSur and Monterey also.. > Minor nit, this cellFocusRing should be "cellFocusRingColor" like other color variables. @prsadhuk I have tested it on BigSur and Monterey, the new changes are working well. I will change the variable name as suggested and update the PR. ------------- PR: https://git.openjdk.java.net/jdk/pull/7768 From duke at openjdk.java.net Tue Apr 26 19:49:13 2022 From: duke at openjdk.java.net (DamonGuy) Date: Tue, 26 Apr 2022 19:49:13 GMT Subject: RFR: JDK-8282772: JButton text set as HTML content has unwanted padding Message-ID: The insets for buttons were incorrect for L&Fs except for Aqua when the text is set to HTML. This was fixed in Aqua by adding a conditional to check for the BasicHTML property key in the button component. This same logic can be used to fix Metal & Motif L&Fs in BasicButtonUI, but Nimbus is not fixed by this. Nimbus gets its default values from a skin.laf file, and when the defaults here are set to have left & right insets to 0 for ButtonUI, the issue is fixed. I also tested for non-HTML text after the changes, and the changes do not affect normal text. The HtmlButtonImageTest has been changed to cycle through all L&Fs available on a device. ------------- Commit messages: - Added conditional for HTML in BasicButtonUI. Edited default Nimbus ButtonUI insets. Edited HtmlButtonImageTest to cycle all L&Fs. Recreated this branch to fix sync issue. Changes: https://git.openjdk.java.net/jdk/pull/8407/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8407&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8282772 Stats: 67 lines in 3 files changed: 45 ins; 4 del; 18 mod Patch: https://git.openjdk.java.net/jdk/pull/8407.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8407/head:pull/8407 PR: https://git.openjdk.java.net/jdk/pull/8407 From prr at openjdk.java.net Tue Apr 26 20:18:47 2022 From: prr at openjdk.java.net (Phil Race) Date: Tue, 26 Apr 2022 20:18:47 GMT Subject: RFR: JDK-8282772: JButton text set as HTML content has unwanted padding In-Reply-To: References: Message-ID: On Tue, 26 Apr 2022 19:42:05 GMT, DamonGuy wrote: > The insets for buttons were incorrect for L&Fs except for Aqua when the text is set to HTML. This was fixed in Aqua by adding a conditional to check for the BasicHTML property key in the button component. This same logic can be used to fix Metal & Motif L&Fs in BasicButtonUI, but Nimbus is not fixed by this. Nimbus gets its default values from a skin.laf file, and when the defaults here are set to have left & right insets to 0 for ButtonUI, the issue is fixed. I also tested for non-HTML text after the changes, and the changes do not affect normal text. > > The HtmlButtonImageTest has been changed to cycle through all L&Fs available on a device. src/java.desktop/share/classes/javax/swing/plaf/nimbus/skin.laf line 271: > (failed to retrieve contents of file, check the PR for context) > I also tested for non-HTML text after the changes, and the changes do not affect normal text. And this is true for this Nimbus case too ? Whereas your code update in BasicButtonUI is checking for HTML, I don't see how it could *not* change normal text in the Nimbus case. ------------- PR: https://git.openjdk.java.net/jdk/pull/8407 From prr at openjdk.java.net Tue Apr 26 20:19:51 2022 From: prr at openjdk.java.net (Phil Race) Date: Tue, 26 Apr 2022 20:19:51 GMT Subject: RFR: 8285617 : Fix java/awt/print/PrinterJob/ImagePrinting/PrintARGBImage.java manual test In-Reply-To: References: Message-ID: On Tue, 26 Apr 2022 01:44:45 GMT, lawrence.andrews wrote: > 1) Removed yesno since test was failing with parser error due to @run main/manual=yesno > 2) User can't decide whether it as pass or fail after looking into the printout so add the PassFailJFrame support > > @shurymury > @aivanov-jdk Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8395 From prr at openjdk.java.net Tue Apr 26 20:25:51 2022 From: prr at openjdk.java.net (Phil Race) Date: Tue, 26 Apr 2022 20:25:51 GMT Subject: RFR: 8285612 : Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/ImagePrinting/ClippedImages.java In-Reply-To: References: Message-ID: On Mon, 25 Apr 2022 22:36:59 GMT, lawrence.andrews wrote: > 1) Removed yesno to eliminate parserException > 2) Added code to fit into manual framework so that timeout, pass & fail is handled. > 3) Added code to mark the test as pass if printer service is not available > 4) Added code to handle pressing or clicking of 'Cancel' button. > > @shurymury > @aivanov-jdk test/jdk/java/awt/print/PrinterJob/ImagePrinting/ClippedImages.java line 81: > 79: b) that numerical text on the image is displayed similarly > 80: e) that the green quadrilaterals match on-screen > 81: f) that the rendering is clipped at the default (typically1 inch) typically1 inch -> typically 1 inch test/jdk/java/awt/print/PrinterJob/ImagePrinting/ClippedImages.java line 89: > 87: PassFailJFrame passFailJFrame = new PassFailJFrame("Test " + > 88: "Instruction", instruction, 15); > 89: createTestUI(); might as well make this EventQueue.invokeAndWait(createTestUI()) ------------- PR: https://git.openjdk.java.net/jdk/pull/8391 From prr at openjdk.java.net Tue Apr 26 20:32:52 2022 From: prr at openjdk.java.net (Phil Race) Date: Tue, 26 Apr 2022 20:32:52 GMT Subject: RFR: 8196367: java/awt/List/SingleModeDeselect/SingleModeDeselect.java times out [v2] In-Reply-To: References: Message-ID: On Fri, 22 Apr 2022 21:57:23 GMT, Alexander Zuev wrote: >> Clean up imports; >> Close and dispose frame before exiting the test; > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Use one tyr/catch instead of two > Generic code cleanup Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8351 From achung at openjdk.java.net Tue Apr 26 20:34:03 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Tue, 26 Apr 2022 20:34:03 GMT Subject: Integrated: JDK-8202790: DnD test DisposeFrameOnDragTest.java does not clean up In-Reply-To: References: Message-ID: <0Vb48-6dhzQwXQbTldmIrXfYwnppWPaNPGt2BzeusAs=.9ce9ccad-f50a-4587-afe5-b21c86261595@github.com> On Fri, 22 Apr 2022 19:41:44 GMT, Alisen Chung wrote: > Added a background to the test to prevent the file from dragging onto the desktop and creating an extra file. This pull request has now been integrated. Changeset: 102a305f Author: Alisen Chung Committer: Phil Race URL: https://git.openjdk.java.net/jdk/commit/102a305f73d52d8e378de46c3c0b170db0f2c8af Stats: 9 lines in 2 files changed: 7 ins; 1 del; 1 mod 8202790: DnD test DisposeFrameOnDragTest.java does not clean up Reviewed-by: serb, kizune, prr ------------- PR: https://git.openjdk.java.net/jdk/pull/8370 From achung at openjdk.java.net Tue Apr 26 20:34:46 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Tue, 26 Apr 2022 20:34:46 GMT Subject: Integrated: 8198666: Many java/awt/Modal/OnTop/ test fails on mac In-Reply-To: References: Message-ID: <0BRN_BoTO4jl_-FAYGnXjN1WkgZz0kv3Y0hpGxMcQNA=.7a96384b-dfbc-4f17-99ac-131e89f2baf6@github.com> On Fri, 22 Apr 2022 17:38:28 GMT, Alisen Chung wrote: > Removed passing tests from problem list This pull request has now been integrated. Changeset: dbcf3893 Author: Alisen Chung Committer: Phil Race URL: https://git.openjdk.java.net/jdk/commit/dbcf38932ef4f87b560ec660851368ac5697f4da Stats: 30 lines in 1 file changed: 0 ins; 30 del; 0 mod 8198666: Many java/awt/Modal/OnTop/ test fails on mac Reviewed-by: kizune, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8368 From prr at openjdk.java.net Tue Apr 26 20:36:59 2022 From: prr at openjdk.java.net (Phil Race) Date: Tue, 26 Apr 2022 20:36:59 GMT Subject: Integrated: 8284965: closed test sun/java2d/OpenGL/XORPaint.java is unstable In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 17:15:20 GMT, Phil Race wrote: > This fix moves a closed test to open but updated to be more comprehensive in testing multiple pipelines and with some stabilisation improvements. This pull request has now been integrated. Changeset: 110edd99 Author: Phil Race URL: https://git.openjdk.java.net/jdk/commit/110edd9999c1d26154fc090562d7c8b2ded18a10 Stats: 239 lines in 1 file changed: 239 ins; 0 del; 0 mod 8284965: closed test sun/java2d/OpenGL/XORPaint.java is unstable Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8345 From kizune at openjdk.java.net Tue Apr 26 20:58:24 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Tue, 26 Apr 2022 20:58:24 GMT Subject: RFR: 8196367: java/awt/List/SingleModeDeselect/SingleModeDeselect.java times out [v3] In-Reply-To: References: Message-ID: <8c5coAq2GVLjhadsfYp_1RPmB1qD2sK67wCWpGw4sMw=.ce100fc6-ea1b-4953-abe9-564d401b58da@github.com> > Clean up imports; > Close and dispose frame before exiting the test; Alexander Zuev 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-8196367 - Use one tyr/catch instead of two Generic code cleanup - Remove test from the ProblemList - 8196367: java/awt/List/SingleModeDeselect/SingleModeDeselect.java times out Clean up imports; Close and dispose frame before exiting the test; ------------- Changes: https://git.openjdk.java.net/jdk/pull/8351/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8351&range=02 Stats: 27 lines in 2 files changed: 12 ins; 9 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/8351.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8351/head:pull/8351 PR: https://git.openjdk.java.net/jdk/pull/8351 From kizune at openjdk.java.net Tue Apr 26 20:58:25 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Tue, 26 Apr 2022 20:58:25 GMT Subject: Integrated: 8196367: java/awt/List/SingleModeDeselect/SingleModeDeselect.java times out In-Reply-To: References: Message-ID: On Thu, 21 Apr 2022 22:03:17 GMT, Alexander Zuev wrote: > Clean up imports; > Close and dispose frame before exiting the test; This pull request has now been integrated. Changeset: e574cc0e Author: Alexander Zuev URL: https://git.openjdk.java.net/jdk/commit/e574cc0e2b3330daf7494b809a06b12f2c875916 Stats: 27 lines in 2 files changed: 12 ins; 9 del; 6 mod 8196367: java/awt/List/SingleModeDeselect/SingleModeDeselect.java times out Reviewed-by: prr ------------- PR: https://git.openjdk.java.net/jdk/pull/8351 From kizune at openjdk.java.net Tue Apr 26 22:06:09 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Tue, 26 Apr 2022 22:06:09 GMT Subject: RFR: 8282526: Default icon is not painted properly [v3] In-Reply-To: References: Message-ID: > Detect the situation where we do need to perform interpolation during ImageIcon > painting and set a hint to the rendering to perform bicubic approximation so > image details are preserved during transition. Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: Take into account scale factor; Create a new Graphics2D object instead of juggle the rendering hints; ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7805/files - new: https://git.openjdk.java.net/jdk/pull/7805/files/6967cc18..a6aef9a9 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7805&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7805&range=01-02 Stats: 19 lines in 1 file changed: 2 ins; 2 del; 15 mod Patch: https://git.openjdk.java.net/jdk/pull/7805.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7805/head:pull/7805 PR: https://git.openjdk.java.net/jdk/pull/7805 From kizune at openjdk.java.net Tue Apr 26 22:20:10 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Tue, 26 Apr 2022 22:20:10 GMT Subject: RFR: 8282526: Default icon is not painted properly [v3] In-Reply-To: References: Message-ID: On Tue, 26 Apr 2022 22:06:09 GMT, Alexander Zuev wrote: >> Detect the situation where we do need to perform interpolation during ImageIcon >> painting and set a hint to the rendering to perform bicubic approximation so >> image details are preserved during transition. > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Take into account scale factor; > Create a new Graphics2D object instead of juggle the rendering hints; Ok, i have modified PR to use the scale factor to determine if we will need the scaling operation at all and i'm creating a new Graphics2D object so i do not need to swap the rendering hints. Saying that BICUBIC is expensive - i have found any noticeable performance impact when using this code. And it is not always the scale down that needs this hint - even scaling up of the icons when scaling factor is set to 125 or 175% gives much better result for icons that do not have the exact match in size for the said scaling. ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From serb at openjdk.java.net Tue Apr 26 22:20:11 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 26 Apr 2022 22:20:11 GMT Subject: RFR: 8282526: Default icon is not painted properly [v3] In-Reply-To: References: Message-ID: On Wed, 16 Mar 2022 05:36:04 GMT, Sergey Bylokhov wrote: >>> This might be a rookie question: >>> >>> When it comes to modifying and restoring a Graphics, I've seen two common patterns: A. Call `newG = g.create()` and later `newG.dispose()` B. Call `g.setX(newValue)` and then call `g.setX(oldValue)` later >>> >>> Is there guidance on when to use which? Or is one always preferred? >> >> Usually i follow the rule of minimal action. When i need to set a lot of hints that needs to be later unrolled such as changing graphics coordinates and such - i'm creating a new Graphics. When i only need to manipulate a single hint and it can easily be unrolled - i am using the same object. In this case i'm changing just a single hint. > > I am not sure that this is the right place to change the hints. > If we want to always scale the icon using the bicubic interpolation then it is better to do it where we call the paintIcon() method in some jcomponent(this probably may be configured by some option - similar to the text antialisaing). But it will affect performance since the bicubic is much slower. > > But before discussing this shared code change could you please provide some info on why it worked fine before? Why we try to downscale the image and do not get an exact size from the native. I suggest to recheck the issues described above, updating the shared implementation of `ImageIcon.java` seems wrong ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From kizune at openjdk.java.net Tue Apr 26 22:27:23 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Tue, 26 Apr 2022 22:27:23 GMT Subject: RFR: 8282526: Default icon is not painted properly [v3] In-Reply-To: References: Message-ID: On Tue, 26 Apr 2022 22:06:09 GMT, Alexander Zuev wrote: >> Detect the situation where we do need to perform interpolation during ImageIcon >> painting and set a hint to the rendering to perform bicubic approximation so >> image details are preserved during transition. > > Alexander Zuev has updated the pull request incrementally with one additional commit since the last revision: > > Take into account scale factor; > Create a new Graphics2D object instead of juggle the rendering hints; > I suggest to recheck the issues described above, updating the shared implementation of ImageIcon.java seems wrong Yes, the issue manifests itself only on Windows - but i was able to reproduce it using generic MultiResolutionIcon in the test case so while it CAN be fixed in the Windows specific code i still think addressing it in the shared code is a right thing to do. ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From darcy at openjdk.java.net Tue Apr 26 22:33:21 2022 From: darcy at openjdk.java.net (Joe Darcy) Date: Tue, 26 Apr 2022 22:33:21 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces Message-ID: To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). I'll update copyright years before pushing. ------------- Commit messages: - JDK-8285676: Add missing @param tags for type parameters on classes and interfaces Changes: https://git.openjdk.java.net/jdk/pull/8410/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8410&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285676 Stats: 76 lines in 40 files changed: 76 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8410.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8410/head:pull/8410 PR: https://git.openjdk.java.net/jdk/pull/8410 From duke at openjdk.java.net Tue Apr 26 22:41:14 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Tue, 26 Apr 2022 22:41:14 GMT Subject: RFR: 8285612 : Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/ImagePrinting/ClippedImages.java [v2] In-Reply-To: References: Message-ID: <6dYI6zyPcsfDxamssY5OvarQUnj_L73kZEm1zw-9UBE=.3fa6d985-201e-4a76-b6b1-5e72555d4158@github.com> > 1) Removed yesno to eliminate parserException > 2) Added code to fit into manual framework so that timeout, pass & fail is handled. > 3) Added code to mark the test as pass if printer service is not available > 4) Added code to handle pressing or clicking of 'Cancel' button. > > @shurymury > @aivanov-jdk lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Fixed review comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8391/files - new: https://git.openjdk.java.net/jdk/pull/8391/files/1af25bff..53aa04cb Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8391&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8391&range=00-01 Stats: 7 lines in 1 file changed: 2 ins; 3 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8391.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8391/head:pull/8391 PR: https://git.openjdk.java.net/jdk/pull/8391 From serb at openjdk.java.net Tue Apr 26 22:49:40 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 26 Apr 2022 22:49:40 GMT Subject: RFR: 8282526: Default icon is not painted properly [v3] In-Reply-To: References: Message-ID: <7zYHFtn9L54eIDP49ZZtZA_kDPWwhwWTo1Zzy82gyYc=.21baf5bc-9604-4242-92d7-65bfb68cf9a0@github.com> On Tue, 26 Apr 2022 22:23:55 GMT, Alexander Zuev wrote: > Yes, the issue manifests itself only on Windows - but i was able to reproduce it using generic MultiResolutionIcon in the test case so while it CAN be fixed in the Windows specific code i still think addressing it in the shared code is a right thing to do. Fixing it in the ImageIcon is similar to fixing it by changing internal default state of the rendering pipeline in any other places like images/graphics/fonts, while we have to change that state "externally". We have to set BICUBIC interpolation in the place where we draw that image/icon. But before discussing that, it would be good to understand: - is it a regression or not, if yes then what change caused that, did we have some wrong assumption? - why we need to downscale the image, 16x16/32x32 is quite common sizes why we cannot read an exact size from the native which I think will provide the best quality? ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From duke at openjdk.java.net Tue Apr 26 23:00:05 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Tue, 26 Apr 2022 23:00:05 GMT Subject: Integrated: JDK-8251177: [macosx] The text "big" is truncated in JTabbedPane In-Reply-To: References: Message-ID: On Tue, 19 Apr 2022 21:03:13 GMT, Harshitha Onkar wrote: > The exisiting manual test case tests different html styles of JTabbedPane tab title. The tab with "big" as title is seen to be clipped on Aqua LAF for larger font-size. In other LAFs it is observed that bigger font-size can be accommodated without clipping. > > The following approaches were evaluated before considering it as not a test issue - > > - Aqua LAF has a different tab style compared to other LAFs as seen in the screenshot below. Limiting font size on Aqua LAF requires scaling down the text which might be incompatible with Aqua LAF. > > - Removing existing constraints on text and icon is incompatible for Aqua LAF. > > Since the above two approaches are incompatible with Aqua and it is not a test issue, a note has been added about clipped text and this test has been removed from problem list > > ![image](https://user-images.githubusercontent.com/95945681/164093604-ca7ecbc3-09c2-4338-bd2a-f8c81c12f360.png) This pull request has now been integrated. Changeset: 16ebe40a Author: Harshitha Onkar Committer: Alexander Zuev URL: https://git.openjdk.java.net/jdk/commit/16ebe40a1bcd1fe43126fe1dca27bb64cb12de16 Stats: 91 lines in 3 files changed: 28 ins; 38 del; 25 mod 8251177: [macosx] The text "big" is truncated in JTabbedPane Reviewed-by: psadhukhan, kizune, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8307 From wetmore at openjdk.java.net Tue Apr 26 23:05:58 2022 From: wetmore at openjdk.java.net (Bradford Wetmore) Date: Tue, 26 Apr 2022 23:05:58 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces In-Reply-To: References: Message-ID: On Tue, 26 Apr 2022 22:24:26 GMT, Joe Darcy wrote: > To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. > > To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. > > Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). > > I'll update copyright years before pushing. The two `java.security` ones LGTM. ------------- Marked as reviewed by wetmore (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8410 From kizune at openjdk.java.net Tue Apr 26 23:25:43 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Tue, 26 Apr 2022 23:25:43 GMT Subject: RFR: 8282526: Default icon is not painted properly [v3] In-Reply-To: <7zYHFtn9L54eIDP49ZZtZA_kDPWwhwWTo1Zzy82gyYc=.21baf5bc-9604-4242-92d7-65bfb68cf9a0@github.com> References: <7zYHFtn9L54eIDP49ZZtZA_kDPWwhwWTo1Zzy82gyYc=.21baf5bc-9604-4242-92d7-65bfb68cf9a0@github.com> Message-ID: <9YGqKP4x5N0miiskVwMoF201g7ng3JjTnJF5ctGkD5w=.9b763d6a-469d-49b0-83cd-79cc46cdfecd@github.com> On Tue, 26 Apr 2022 22:46:47 GMT, Sergey Bylokhov wrote: > Fixing it in the ImageIcon is similar to fixing it by changing internal default state of the rendering pipeline in any other places like images/graphics/fonts, while we have to change that state "externally". We have to set BICUBIC interpolation in the place where we draw that image/icon. We are setting the BICUBIC only in place where we draw the image part of ImageIcon. There is no benefit in pushing this change down the pipeline. > But before discussing that, it would be good to understand: > > * is it a regression or not, if yes then what change caused that, did we have some wrong assumption? It is not a regression, it is a side effect of the JDK-8182043 combined with the Windows 10 update that changed the default windows file icon to the blank white sheet with 1 pixel wide dark gray border. > * why we need to downscale the image, 16x16/32x32 is quite common sizes why we cannot read an exact size from the native which I think will provide the best quality? Because we can not read this icon from the native, when we ask Windows API to provide this icon it ignores the icon size and gives the same 32x32 icon instead. We knew this upfront and the consensus was that we will provide the icon in the MultiResolutionImage and scaling during painting will be good enough to scale it properly. But it is not. The default scale algorithm is terrible and when new icons appeared it became obvious. Aside of that default scaling on fractional magnification factors such as 5/8 or 7/8 looks just bad - a lot of scaling artifacts and missing details. That has to be addressed and that's what i'm trying to do. ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From jjg at openjdk.java.net Tue Apr 26 23:38:42 2022 From: jjg at openjdk.java.net (Jonathan Gibbons) Date: Tue, 26 Apr 2022 23:38:42 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces In-Reply-To: References: Message-ID: On Tue, 26 Apr 2022 22:24:26 GMT, Joe Darcy wrote: > To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. > > To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. > > Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). > > I'll update copyright years before pushing. src/java.base/share/classes/java/lang/ClassValue.java line 43: > 41: * it can use a {@code ClassValue} to cache information needed to > 42: * perform the message send quickly, for each class encountered. > 43: * @param type of the derived value stylistically, compared to other comments, you are missing an initial "the" ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From serb at openjdk.java.net Tue Apr 26 23:52:41 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Tue, 26 Apr 2022 23:52:41 GMT Subject: RFR: 8273506: java Robot API did the 'm' keypress and caused /awt/event/KeyEvent/KeyCharTest/KeyCharTest.html is timing out on macOS 12 [v2] In-Reply-To: References: <33wbZN4ZDtQ564BCCatIOTX2sVRXi308jFUzKbKOaVE=.4ecfdde4-74ed-4319-bf86-492c3e47a32b@github.com> Message-ID: <37TufUb6JsjhJ_XeyGHMDcBKynjT8g6wUzw8klRoWOA=.fd51e990-f13a-47da-abb1-4fdda23aba65@github.com> On Sat, 23 Apr 2022 07:21:51 GMT, Alexander Zuev wrote: > Ok, starting from the beginning - there is no possibility to press the Function key with Robot, the corresponding key code (OSX_Function - 0x3F) has not mapped to any of the keys available to Robot. Function key does not act like a caps lock - it acts like a shift. Just like a shift, it can only be fixated by the accessibility feature "sticky keys". Once Function key is released the global state should be changed in a way as if this key is not active. We do not issue key press or key release event for the Function key. The reason of why global state is being changed this way when we issue key press/key release sequence for a totally unrelated key (OSX_DownArrow - 0x7D) is unknown, it happens in the native code outside of our control. All we can do is to eliminate the consequences of this action that started to cause problems in Mac OS X 12. That description is very helpful, thank you. Based on that it looks like this is a bug in the macOS, did we report it to the Apple? ------------- PR: https://git.openjdk.java.net/jdk/pull/8320 From serb at openjdk.java.net Wed Apr 27 00:03:45 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 27 Apr 2022 00:03:45 GMT Subject: RFR: 8282526: Default icon is not painted properly [v3] In-Reply-To: <9YGqKP4x5N0miiskVwMoF201g7ng3JjTnJF5ctGkD5w=.9b763d6a-469d-49b0-83cd-79cc46cdfecd@github.com> References: <7zYHFtn9L54eIDP49ZZtZA_kDPWwhwWTo1Zzy82gyYc=.21baf5bc-9604-4242-92d7-65bfb68cf9a0@github.com> <9YGqKP4x5N0miiskVwMoF201g7ng3JjTnJF5ctGkD5w=.9b763d6a-469d-49b0-83cd-79cc46cdfecd@github.com> Message-ID: On Tue, 26 Apr 2022 23:22:18 GMT, Alexander Zuev wrote: > We are setting the BICUBIC only in place where we draw the image part of ImageIcon. There is no benefit in pushing this change down the pipeline. We don't need to push change down to the pipeline, we should push it up to the place where we paint this ImageIcon, eventually where we call ImageIcon.paintIcon() > It is not a regression, it is a side effect of the JDK-8182043 combined with the Windows 10 update that changed the default windows file icon to the blank white sheet with 1 pixel wide dark gray border. > Because we can not read this icon from the native, when we ask Windows API to provide this icon it ignores the icon size and gives the same 32x32 icon instead. We knew this upfront and the consensus was that we will provide the icon in the MultiResolutionImage and scaling during painting will be good enough to scale it properly. But it is not. Then why, as described in the JBS, it worked before? Did we request different image, or size, or did we skip scaling? ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From duke at openjdk.java.net Wed Apr 27 00:14:21 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Wed, 27 Apr 2022 00:14:21 GMT Subject: RFR: 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java Message-ID: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> 1) Fixed Parser error by removing yesno from @run main/manual=yesno 2) Used PassFaileJFrame to show the test instruction to the user instead of printing the test instruction on the console or jtreg log file. 3) If printer is not configured then mark the test as passed. @shurymury @aivanov-jdk ------------- Commit messages: - 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java Changes: https://git.openjdk.java.net/jdk/pull/8412/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8412&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285687 Stats: 66 lines in 1 file changed: 37 ins; 22 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/8412.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8412/head:pull/8412 PR: https://git.openjdk.java.net/jdk/pull/8412 From smarks at openjdk.java.net Wed Apr 27 01:48:49 2022 From: smarks at openjdk.java.net (Stuart Marks) Date: Wed, 27 Apr 2022 01:48:49 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces In-Reply-To: References: Message-ID: On Tue, 26 Apr 2022 22:24:26 GMT, Joe Darcy wrote: > To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. > > To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. > > Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). > > I'll update copyright years before pushing. I've looked at the changes in java.util (but not sub packages). They're fine, modulo some minor wording changes. src/java.base/share/classes/java/util/AbstractMap.java line 601: > 599: * {@code Map.entrySet().toArray}. > 600: * > 601: * @param the type of keys maintained Please update to match java.util.Map, which says "the type of keys maintained by this map" src/java.base/share/classes/java/util/AbstractMap.java line 748: > 746: * > 747: * @param the type of keys maintained > 748: * @param the type of mapped values Please update to match Map.Entry, which says simply "the type of key" and "the type of the value" src/java.base/share/classes/java/util/Dictionary.java line 44: > 42: * @param the type of keys > 43: * @param the type of mapped values > 44: * Urgh. This class is obsolete, but it was retrofitted to implement Map and was subsequently generified, so I'd update these to match java.util.Map. ------------- Marked as reviewed by smarks (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8410 From prr at openjdk.java.net Wed Apr 27 03:41:42 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 27 Apr 2022 03:41:42 GMT Subject: RFR: 8285306: Fix typos in java.desktop In-Reply-To: <5gAPAoRiIJr6BEko1UEaMd3QeUte-snqvfc9eNU2Jgk=.a6d39dcd-0d89-4444-a890-a6c53f41245b@github.com> References: <5gAPAoRiIJr6BEko1UEaMd3QeUte-snqvfc9eNU2Jgk=.a6d39dcd-0d89-4444-a890-a6c53f41245b@github.com> Message-ID: <4QVTblMgjEo2KBoDGn1G67qqvHtOkdmqeU4e88o2eHU=.faf55412-6b4a-4fe4-ac84-82ee0cea2f8d@github.com> On Thu, 21 Apr 2022 08:35:36 GMT, Magnus Ihse Bursie wrote: > I ran `codespell` on the `src/java.desktop` directory, and accepted those changes where it indeed discovered real typos. > > I ignored typos in public methods and variables. Maybe they can be fixed later on without much fanfare, if they are in internal classes. Typos in exposed APIs are likely here to stay. > > I will update copyright years using a script before pushing (otherwise like every second change would be a copyright update, making reviewing much harder). > > The long term goal here is to make tooling support for running `codespell`. The trouble with automating this is of course all false positives. But before even trying to solve that issue, all true positives must be fixed. Hence this PR. static class AquaHierarchyButtonListener implements HierarchyListener { - // Everytime a hierarchy is change we need to check if the button if moved on or from + // Every time a hierarchy is change we need to check if the button if moved on or from change -> changed if moved -> is moved src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java - // it won't be invoced if focuse is moved to a html element + // it won't be invoced if focus is moved to a html element invoced -> invoked "a html" -> "an html" src/java.desktop/macosx/native/libjsound/PLATFORM_API_MacOSX_MidiOut.c + // $$fb 2002-04-04: It is responsibility of the application developer to "is the" src/java.desktop/windows/native/libjsound/PLATFORM_API_WinOS_MidiOut.c + // $$fb 2002-04-04: It is responsibility of the application developer to same as above Regarding changes in gif + freetype diff --git a/src/java.desktop/share/native/libawt/awt/image/gif/gifdecoder.c b/src/java.desktop/share/native/libawt/awt/image/gif/gifdecoder.c diff --git a/src/java.desktop/share/native/libfontmanager/freetypeScaler.c b/src/java.desktop/share/native/libfontmanager/freetypeScaler.c Please exclude ALL 3rd party libraries from this PR. ------------- PR: https://git.openjdk.java.net/jdk/pull/8328 From kizune at openjdk.java.net Wed Apr 27 03:45:44 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Wed, 27 Apr 2022 03:45:44 GMT Subject: RFR: 8273506: java Robot API did the 'm' keypress and caused /awt/event/KeyEvent/KeyCharTest/KeyCharTest.html is timing out on macOS 12 [v2] In-Reply-To: <37TufUb6JsjhJ_XeyGHMDcBKynjT8g6wUzw8klRoWOA=.fd51e990-f13a-47da-abb1-4fdda23aba65@github.com> References: <33wbZN4ZDtQ564BCCatIOTX2sVRXi308jFUzKbKOaVE=.4ecfdde4-74ed-4319-bf86-492c3e47a32b@github.com> <37TufUb6JsjhJ_XeyGHMDcBKynjT8g6wUzw8klRoWOA=.fd51e990-f13a-47da-abb1-4fdda23aba65@github.com> Message-ID: On Tue, 26 Apr 2022 23:49:26 GMT, Sergey Bylokhov wrote: > That description is very helpful, thank you. Based on that it looks like this is a bug in the macOS, did we report it to the Apple? No, we did not. I probably will but it is unlikely it will be addressed quickly so fixing this issue on out side seems to be required anyways. ------------- PR: https://git.openjdk.java.net/jdk/pull/8320 From duke at openjdk.java.net Wed Apr 27 04:34:20 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Wed, 27 Apr 2022 04:34:20 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v12] In-Reply-To: References: Message-ID: <1iSsUS97cm0YKPQwV4J0zAh6HLgpQgK7XPCK56sRkgs=.48893e06-8ea8-4d39-8509-09d0fd5caec2@github.com> > Previously while tabbing through the JTable cell, the cell highlighter/focus ring was not visible against the selection background. > > Changes are made to Aqua LAF to derive a lighter focus ring color by changing saturation and setting brightness component to 100% of original focus ring color so that it is visible while tabbing through `JTable` cells. A new method is added for this purpose which takes in `focusRingColor`, does adjustment to saturation and brightness and returns a new focus ring color. There are edge cases where the HSB transformation does not yield the right focus ring color, for these cases a default color is returned. > > **Edge Cases** > ![image](https://user-images.githubusercontent.com/95945681/161360456-3929acf1-282b-4c2b-95d1-1d5707c1e238.png) > > The edge case condition consists of two parts ? > To handle white/black colors - (hsbValues[0] == 0 && hsbValues[1] == 0) - representing hue and saturation of zero obtained for black, white or exactly grey (red=green=color) conditions > To handle grayish colors - hsbValues[1] <= satGrayScale where satGrayScale <= 0.10 . For any given hue and brightness, a saturation of less than or equal to 10% represents grayish tint colors. > (The second case was added to accommodate grayish focus ring color returned by system when Accent color = Graphite. The returned color is not exactly gray but grayish (r=135, g=135, b=140)). > To accommodate a more generic case of grayish colors, the satGrayScale has a threshold or buffer of 0.10 or 10%. > > Used the following resources to test out different grayish colors and optimal saturation offsets used in `deriveLighterFocusRing()`. > > - [RapidTables](https://www.rapidtables.com/convert/color/rgb-to-hsl.html) > - [Colorizer](http://colorizer.org/). > - [Chart Link](https://codepen.io/HunorMarton/details/eWvewo) > > A test case is added to compare the RGB difference between the original focus ring color & selection background and the new focus ring color & selection background. > > PS: The native L&F (Mac OS) and Swing L&F for JTable cell tabbing differs (on native tables the cell background turns white on focus with a cell focus ring). Since the background for Swing tables can be set by users and also overridden by subclassing `DefaultTableCellRenderer`, and to adhere to current implementation of Swing, the white cell background changes are not incorporated. Only the Focus Ring/ Cell Highlighter is made more prominent. Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: chnaged variable name ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7768/files - new: https://git.openjdk.java.net/jdk/pull/7768/files/d13e37f8..a1c17b7a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7768&range=11 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7768&range=10-11 Stats: 12 lines in 1 file changed: 0 ins; 0 del; 12 mod Patch: https://git.openjdk.java.net/jdk/pull/7768.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7768/head:pull/7768 PR: https://git.openjdk.java.net/jdk/pull/7768 From duke at openjdk.java.net Wed Apr 27 04:34:21 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Wed, 27 Apr 2022 04:34:21 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v11] In-Reply-To: References: <9T2LZvjkusyRd4JjbAU5_Yn277lAOnC02Esvq_R8yyg=.136fa8f8-0768-4774-8461-4591ca071453@github.com> Message-ID: On Tue, 26 Apr 2022 05:57:32 GMT, Prasanta Sadhukhan wrote: >> Harshitha Onkar has updated the pull request incrementally with one additional commit since the last revision: >> >> added new color to CSystemColors.m - CELL_HIGHLIGHT_COLOR > > src/java.desktop/macosx/classes/com/apple/laf/AquaLookAndFeel.java line 392: > >> 390: >> 391: // for table cell highlighter >> 392: final Color cellFocusRing = AquaImageFactory.getCellHighlightColorUIResource(); > > overall looks ok. I believe you have tested well in BigSur and Monterey also.. > Minor nit, this cellFocusRing should be "cellFocusRingColor" like other color variables. @prsadhuk Updated the PR. A note on the test case, since the test case is automated it tests the cell focus ring with colors loaded during the start of program execution and any on-the-fly accent color changes were tested manually. ------------- PR: https://git.openjdk.java.net/jdk/pull/7768 From duke at openjdk.java.net Wed Apr 27 04:36:27 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Wed, 27 Apr 2022 04:36:27 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v13] In-Reply-To: References: Message-ID: <14wuJKRV_wzf0QtTpOODhGOghNcbGpHqN3daYz_wDJU=.90c0cc59-d36b-4ab9-ac1e-13c2bf965a1b@github.com> > Previously while tabbing through the JTable cell, the cell highlighter/focus ring was not visible against the selection background. > > Changes are made to Aqua LAF to derive a lighter focus ring color by changing saturation and setting brightness component to 100% of original focus ring color so that it is visible while tabbing through `JTable` cells. A new method is added for this purpose which takes in `focusRingColor`, does adjustment to saturation and brightness and returns a new focus ring color. There are edge cases where the HSB transformation does not yield the right focus ring color, for these cases a default color is returned. > > **Edge Cases** > ![image](https://user-images.githubusercontent.com/95945681/161360456-3929acf1-282b-4c2b-95d1-1d5707c1e238.png) > > The edge case condition consists of two parts ? > To handle white/black colors - (hsbValues[0] == 0 && hsbValues[1] == 0) - representing hue and saturation of zero obtained for black, white or exactly grey (red=green=color) conditions > To handle grayish colors - hsbValues[1] <= satGrayScale where satGrayScale <= 0.10 . For any given hue and brightness, a saturation of less than or equal to 10% represents grayish tint colors. > (The second case was added to accommodate grayish focus ring color returned by system when Accent color = Graphite. The returned color is not exactly gray but grayish (r=135, g=135, b=140)). > To accommodate a more generic case of grayish colors, the satGrayScale has a threshold or buffer of 0.10 or 10%. > > Used the following resources to test out different grayish colors and optimal saturation offsets used in `deriveLighterFocusRing()`. > > - [RapidTables](https://www.rapidtables.com/convert/color/rgb-to-hsl.html) > - [Colorizer](http://colorizer.org/). > - [Chart Link](https://codepen.io/HunorMarton/details/eWvewo) > > A test case is added to compare the RGB difference between the original focus ring color & selection background and the new focus ring color & selection background. > > PS: The native L&F (Mac OS) and Swing L&F for JTable cell tabbing differs (on native tables the cell background turns white on focus with a cell focus ring). Since the background for Swing tables can be set by users and also overridden by subclassing `DefaultTableCellRenderer`, and to adhere to current implementation of Swing, the white cell background changes are not incorporated. Only the Focus Ring/ Cell Highlighter is made more prominent. Harshitha Onkar has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 14 additional commits since the last revision: - Merge branch 'master' into focusRing_7124282 - chnaged variable name - added new color to CSystemColors.m - CELL_HIGHLIGHT_COLOR - Merge branch 'master' into focusRing_7124282 - added new type property and changed method name - Merge branch 'master' into focusRing_7124282 - added more generic condition for edge case and formatted line lengths - Merge branch 'openjdk:master' into focusRing_7124282 - on-the-fly focus ring color changes added - updated deriveContrastFocusRing method - ... and 4 more: https://git.openjdk.java.net/jdk/compare/37279529...e82a1ca0 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7768/files - new: https://git.openjdk.java.net/jdk/pull/7768/files/a1c17b7a..e82a1ca0 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7768&range=12 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7768&range=11-12 Stats: 34367 lines in 1328 files changed: 23140 ins; 5225 del; 6002 mod Patch: https://git.openjdk.java.net/jdk/pull/7768.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7768/head:pull/7768 PR: https://git.openjdk.java.net/jdk/pull/7768 From achung at openjdk.java.net Wed Apr 27 04:37:45 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Wed, 27 Apr 2022 04:37:45 GMT Subject: Integrated: 8198622: java/awt/Focus/TypeAhead/TestFocusFreeze.java fails on mac In-Reply-To: <8guUkZCRSqeoI9P6-bxBTJjWgQuw_nQbLcfuUeUv3MA=.0fffd884-dff4-4bdc-a522-be7cf921a72c@github.com> References: <8guUkZCRSqeoI9P6-bxBTJjWgQuw_nQbLcfuUeUv3MA=.0fffd884-dff4-4bdc-a522-be7cf921a72c@github.com> Message-ID: On Thu, 14 Apr 2022 21:12:07 GMT, Alisen Chung wrote: > test passes, so removing from problem list This pull request has now been integrated. Changeset: cc89f1bc Author: Alisen Chung Committer: Phil Race URL: https://git.openjdk.java.net/jdk/commit/cc89f1bc618c6199030bd7cd1df050a175e13b4b Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod 8198622: java/awt/Focus/TypeAhead/TestFocusFreeze.java fails on mac 6447537: EnqueueWithDialogTest & TestFocusFreeze fail Reviewed-by: jdv ------------- PR: https://git.openjdk.java.net/jdk/pull/8254 From prr at openjdk.java.net Wed Apr 27 04:39:43 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 27 Apr 2022 04:39:43 GMT Subject: RFR: 8285149: Using HashMap.newHashMap to replace new HashMap(int) [v4] In-Reply-To: References: Message-ID: On Sat, 23 Apr 2022 14:34:58 GMT, XenoAmess wrote: >> These are the changes that too many to be reviewed in 8186958, thus split some of them out. > > XenoAmess has updated the pull request incrementally with two additional commits since the last revision: > > - maintains compatibility with jdk1.4 for TextTests > - fix missed space after '=' I'm getting a bit tired of seeing these JDK wide changes with lots of files touched. Delete all changes in desktop from this PR and re-submit them as a separate PR. Also do not change J2DBench. We deliberately avoid using new API so that we can take it and run it on very old JDK versions to help track regressions. ------------- PR: https://git.openjdk.java.net/jdk/pull/8301 From jdv at openjdk.java.net Wed Apr 27 04:49:41 2022 From: jdv at openjdk.java.net (Jayathirth D V) Date: Wed, 27 Apr 2022 04:49:41 GMT Subject: RFR: 8208565: [TEST_BUG] javax\swing\PopupFactory\6276087\NonOpaquePopupMenuTest.java throws NPE In-Reply-To: References: Message-ID: <9BUZD6ZFkDUkMSIKxFXvaMeE4rrBr5pKhzij-kf382U=.99158d34-13be-48d5-8c13-91cc8e02f68d@github.com> On Mon, 18 Apr 2022 07:11:45 GMT, Prasanta Sadhukhan wrote: > Test was failing in the past owing to NPE while accessing JMenu probably owing to fact the test did not wait for UI to be visible before starting the test, so added a delay after the frame is made visible. Also, added disposal of frame. > Also, it seems JDK-8213535 fix might be having a positive impact on this test. > > Several iterations of this test in all platforms have passed (link in JBS). We should link JDK-8065099 also in this PR. As we are de-problemlisting that bug also. ------------- PR: https://git.openjdk.java.net/jdk/pull/8282 From duke at openjdk.java.net Wed Apr 27 05:18:43 2022 From: duke at openjdk.java.net (XenoAmess) Date: Wed, 27 Apr 2022 05:18:43 GMT Subject: RFR: 8285149: Using HashMap.newHashMap to replace new HashMap(int) [v4] In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 04:36:37 GMT, Phil Race wrote: > I'm getting a bit tired of seeing these JDK wide changes with lots of files touched. @prrace I'm also a bit tired of seeing so many amazing mis-use in existed codes in jdk. In some place I even see somebody creates a HashMap with factor = 10. I felt my eyes widen and likes seeing a new world or something, then I suddenly notice that he the writer might not have the ability to use HashMap, but use it just as HashTable. Nevermind. > Delete all changes in desktop from this PR and re-submit them as a separate PR. > > Also do not change J2DBench. We deliberately avoid using new API so that we can take it and run it on very old JDK versions to help track regressions. Will do 10+ hours later when I off work. ------------- PR: https://git.openjdk.java.net/jdk/pull/8301 From jdv at openjdk.java.net Wed Apr 27 05:19:41 2022 From: jdv at openjdk.java.net (Jayathirth D V) Date: Wed, 27 Apr 2022 05:19:41 GMT Subject: RFR: 8208565: [TEST_BUG] javax\swing\PopupFactory\6276087\NonOpaquePopupMenuTest.java throws NPE In-Reply-To: References: Message-ID: On Mon, 18 Apr 2022 07:11:45 GMT, Prasanta Sadhukhan wrote: > Test was failing in the past owing to NPE while accessing JMenu probably owing to fact the test did not wait for UI to be visible before starting the test, so added a delay after the frame is made visible. Also, added disposal of frame. > Also, it seems JDK-8213535 fix might be having a positive impact on this test. > > Several iterations of this test in all platforms have passed (link in JBS). Marked as reviewed by jdv (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8282 From psadhukhan at openjdk.java.net Wed Apr 27 06:48:49 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 27 Apr 2022 06:48:49 GMT Subject: RFR: 7124282: [macosx] Can't see table cell highlighter when the highlight border is the same color as the cell. [v13] In-Reply-To: <14wuJKRV_wzf0QtTpOODhGOghNcbGpHqN3daYz_wDJU=.90c0cc59-d36b-4ab9-ac1e-13c2bf965a1b@github.com> References: <14wuJKRV_wzf0QtTpOODhGOghNcbGpHqN3daYz_wDJU=.90c0cc59-d36b-4ab9-ac1e-13c2bf965a1b@github.com> Message-ID: On Wed, 27 Apr 2022 04:36:27 GMT, Harshitha Onkar wrote: >> Previously while tabbing through the JTable cell, the cell highlighter/focus ring was not visible against the selection background. >> >> Changes are made to Aqua LAF to derive a lighter focus ring color by changing saturation and setting brightness component to 100% of original focus ring color so that it is visible while tabbing through `JTable` cells. A new method is added for this purpose which takes in `focusRingColor`, does adjustment to saturation and brightness and returns a new focus ring color. There are edge cases where the HSB transformation does not yield the right focus ring color, for these cases a default color is returned. >> >> **Edge Cases** >> ![image](https://user-images.githubusercontent.com/95945681/161360456-3929acf1-282b-4c2b-95d1-1d5707c1e238.png) >> >> The edge case condition consists of two parts ? >> To handle white/black colors - (hsbValues[0] == 0 && hsbValues[1] == 0) - representing hue and saturation of zero obtained for black, white or exactly grey (red=green=color) conditions >> To handle grayish colors - hsbValues[1] <= satGrayScale where satGrayScale <= 0.10 . For any given hue and brightness, a saturation of less than or equal to 10% represents grayish tint colors. >> (The second case was added to accommodate grayish focus ring color returned by system when Accent color = Graphite. The returned color is not exactly gray but grayish (r=135, g=135, b=140)). >> To accommodate a more generic case of grayish colors, the satGrayScale has a threshold or buffer of 0.10 or 10%. >> >> Used the following resources to test out different grayish colors and optimal saturation offsets used in `deriveLighterFocusRing()`. >> >> - [RapidTables](https://www.rapidtables.com/convert/color/rgb-to-hsl.html) >> - [Colorizer](http://colorizer.org/). >> - [Chart Link](https://codepen.io/HunorMarton/details/eWvewo) >> >> A test case is added to compare the RGB difference between the original focus ring color & selection background and the new focus ring color & selection background. >> >> PS: The native L&F (Mac OS) and Swing L&F for JTable cell tabbing differs (on native tables the cell background turns white on focus with a cell focus ring). Since the background for Swing tables can be set by users and also overridden by subclassing `DefaultTableCellRenderer`, and to adhere to current implementation of Swing, the white cell background changes are not incorporated. Only the Focus Ring/ Cell Highlighter is made more prominent. > > Harshitha Onkar has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 14 additional commits since the last revision: > > - Merge branch 'master' into focusRing_7124282 > - chnaged variable name > - added new color to CSystemColors.m - CELL_HIGHLIGHT_COLOR > - Merge branch 'master' into focusRing_7124282 > - added new type property and changed method name > - Merge branch 'master' into focusRing_7124282 > - added more generic condition for edge case and formatted line lengths > - Merge branch 'openjdk:master' into focusRing_7124282 > - on-the-fly focus ring color changes added > - updated deriveContrastFocusRing method > - ... and 4 more: https://git.openjdk.java.net/jdk/compare/1475f0f5...e82a1ca0 Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7768 From serb at openjdk.java.net Wed Apr 27 07:11:37 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 27 Apr 2022 07:11:37 GMT Subject: RFR: 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java In-Reply-To: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> References: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> Message-ID: On Wed, 27 Apr 2022 00:06:41 GMT, lawrence.andrews wrote: > 1) Fixed Parser error by removing yesno from @run main/manual=yesno > 2) Used PassFaileJFrame to show the test instruction to the user instead of printing the test instruction on the console or jtreg log file. > 3) If printer is not configured then mark the test as passed. > > @shurymury > @aivanov-jdk The question about this and other tests is, should the test pass if the printer is not installed? I guess the printer is one of the pre-requirements for such tests and it should be configured properly. ------------- PR: https://git.openjdk.java.net/jdk/pull/8412 From serb at openjdk.java.net Wed Apr 27 07:14:44 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 27 Apr 2022 07:14:44 GMT Subject: RFR: 8284888 : [macos] javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java failed with "NimbusLookAndFeel] : ERROR: icon and imageIcon not same." In-Reply-To: <1OYwEG8b8QLK1qYmQ3DIAL6XwKN-Le4-1ceI2-hX2u4=.6df0b3d6-c07e-46a6-8ecb-99ac2b65e075@github.com> References: <1OYwEG8b8QLK1qYmQ3DIAL6XwKN-Le4-1ceI2-hX2u4=.6df0b3d6-c07e-46a6-8ecb-99ac2b65e075@github.com> Message-ID: On Tue, 26 Apr 2022 03:49:02 GMT, Prasanta Sadhukhan wrote: > The bug is made public. The images looks alike visually. I could not find anything wrong with rendering or robot which otherwise could have caused issue in other systems and platforms but it's only failing in this CI system (but color profile setting is ok). As per [JDK-8266247](https://bugs.openjdk.java.net/browse/JDK-8266247) which also happens in same mc, some faulty video memory is doubted. Also, it's not happening everytime but intermittently so seeing all this, I have just relaxed color check a bit I am not sure that the color profile or something like that can be the root cause, because the test does not check an exact RGB of the color, instead, it renders the image twice and then compares, so it is strange that the results are different. ------------- PR: https://git.openjdk.java.net/jdk/pull/8380 From serb at openjdk.java.net Wed Apr 27 07:18:41 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 27 Apr 2022 07:18:41 GMT Subject: RFR: 8285305: Create an automated test for JDK-4495286 In-Reply-To: References: Message-ID: <5PGrwTbHa9J4OrhF_QE7YQOAuykcDOadl7PmH5ID5Hs=.24df96e1-5d43-4b83-a1b7-42169cb85e44@github.com> On Thu, 21 Apr 2022 10:51:18 GMT, Srinivas Mandalika wrote: > Create an automated test for [JDK-4495286](https://bugs.openjdk.java.net/browse/JDK-4495286) > > AccessibleJTable.setAccessibleSelction should select rows/cols when cell selection. > When cell selection is not enabled, there is no way, using > accessibility, to select rows or columns. It seems logical that selecting a cell > using accessibility should have the same effect as clicking on a cell with the > mouse. That is, if row or column selection is enabled, then selecting a cell > should instead cause the row or column to be selected. > The proposed test verifies that the above behavior is fixed. > > This review is for migrating tests from a closed test suite to open. > > Testing: > The test ran successfully on Mach5 with multiple runs (40) on windows-x64, linux-x64 and macos-x64. test/jdk/javax/accessibility/4495286/AccessibleJTableSelectionTest.java line 8: > 6: * under the terms of the GNU General Public License version 2 only, as > 7: > 8: * published by the Free Software Foundation. typo ------------- PR: https://git.openjdk.java.net/jdk/pull/8333 From psadhukhan at openjdk.java.net Wed Apr 27 07:21:42 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 27 Apr 2022 07:21:42 GMT Subject: Integrated: 8208565: [TEST_BUG] javax\swing\PopupFactory\6276087\NonOpaquePopupMenuTest.java throws NPE In-Reply-To: References: Message-ID: <8TOrBbbl98DKxw5ndjPeafW2dbaNydsWqjAW9sLdHWc=.a29e7acf-988e-4ebc-96fa-18186cd5ca97@github.com> On Mon, 18 Apr 2022 07:11:45 GMT, Prasanta Sadhukhan wrote: > Test was failing in the past owing to NPE while accessing JMenu probably owing to fact the test did not wait for UI to be visible before starting the test, so added a delay after the frame is made visible. Also, added disposal of frame. > Also, it seems JDK-8213535 fix might be having a positive impact on this test. > > Several iterations of this test in all platforms have passed (link in JBS). This pull request has now been integrated. Changeset: 72f82dd7 Author: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/72f82dd723bf1c048d140238154580db434706e2 Stats: 84 lines in 2 files changed: 27 ins; 30 del; 27 mod 8208565: [TEST_BUG] javax\swing\PopupFactory\6276087\NonOpaquePopupMenuTest.java throws NPE 8065099: [macos] javax/swing/PopupFactory/6276087/NonOpaquePopupMenuTest.java fails: no background shine through Reviewed-by: jdv ------------- PR: https://git.openjdk.java.net/jdk/pull/8282 From goetz at openjdk.java.net Wed Apr 27 07:22:46 2022 From: goetz at openjdk.java.net (Goetz Lindenmaier) Date: Wed, 27 Apr 2022 07:22:46 GMT Subject: RFR: 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java In-Reply-To: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> References: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> Message-ID: On Wed, 27 Apr 2022 00:06:41 GMT, lawrence.andrews wrote: > 1) Fixed Parser error by removing yesno from @run main/manual=yesno > 2) Used PassFaileJFrame to show the test instruction to the user instead of printing the test instruction on the console or jtreg log file. > 3) If printer is not configured then mark the test as passed. > > @shurymury > @aivanov-jdk Hi, if this needs a printer, you might want to add @key printer? Best regards, Goetz ------------- PR: https://git.openjdk.java.net/jdk/pull/8412 From serb at openjdk.java.net Wed Apr 27 07:33:42 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 27 Apr 2022 07:33:42 GMT Subject: RFR: 6829250: Reg test: java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java fails in Windows In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 05:10:23 GMT, Alexander Zuev wrote: > Only check that insets of the fully expanded undecorated window is not bigger than device insets. They can be smaller, it is a normal situation. I as far as I remember the same behavior was on old windows and jdk7 or even [jdk6](https://stackoverflow.com/questions/7403584/does-jframe-setextendedstatemaximized-both-work-with-undecorated-frames), the root cause is that awt does not support the "MAXIMIZED_BOTH"/etc states for the undecorated frames, we should implement it similar to this https://bugs.openjdk.java.net/browse/JDK-8176359 ------------- PR: https://git.openjdk.java.net/jdk/pull/8314 From serb at openjdk.java.net Wed Apr 27 07:37:02 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 27 Apr 2022 07:37:02 GMT Subject: RFR: 8274597: Some of the dnd tests time out and fail intermittently [v2] In-Reply-To: <-M3RkI7ibFy3E3pyMdIyr-7-WWbZQXFo_4no53mvgDY=.761ad3d4-ff6c-4453-a328-173492e14616@github.com> References: <-M3RkI7ibFy3E3pyMdIyr-7-WWbZQXFo_4no53mvgDY=.761ad3d4-ff6c-4453-a328-173492e14616@github.com> Message-ID: On Wed, 20 Apr 2022 13:28:17 GMT, Manukumar V S wrote: >> These dnd tests fails with a time out intermittently in some machines(mostly Windows 11) which creates frequent noise in CI. >> 1. java/awt/dnd/AcceptDropMultipleTimes/AcceptDropMultipleTimes.java >> 2. java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java >> 3. java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java >> >> Issue : >> These tests are using the Util.drag() method and there was no robot.delay() added between different mouse actions in this method. This could potentially make tests using this method unstable. >> >> Fix: >> Adding a small auto delay of 100ms to fix this. >> >> Testing: >> 1. All the three tests are run 15 times per platform. >> 2. All the tests in java/awt/dnd package run 5 times per platform >> 3. All the three tests are run 5 times specifically on Windows 11 platform. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Added blank line at end of file Why do these tests timeout? is it possible that we can get a deadlock there? ------------- PR: https://git.openjdk.java.net/jdk/pull/8316 From psadhukhan at openjdk.java.net Wed Apr 27 07:38:39 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 27 Apr 2022 07:38:39 GMT Subject: RFR: 8284888 : [macos] javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java failed with "NimbusLookAndFeel] : ERROR: icon and imageIcon not same." In-Reply-To: References: <1OYwEG8b8QLK1qYmQ3DIAL6XwKN-Le4-1ceI2-hX2u4=.6df0b3d6-c07e-46a6-8ecb-99ac2b65e075@github.com> Message-ID: On Wed, 27 Apr 2022 07:11:28 GMT, Sergey Bylokhov wrote: > > The bug is made public. The images looks alike visually. I could not find anything wrong with rendering or robot which otherwise could have caused issue in other systems and platforms but it's only failing in this CI system (but color profile setting is ok). As per [JDK-8266247](https://bugs.openjdk.java.net/browse/JDK-8266247) which also happens in same mc, some faulty video memory is doubted. Also, it's not happening everytime but intermittently so seeing all this, I have just relaxed color check a bit > > I am not sure that the color profile or something like that can be the root cause, because the test does not check an exact RGB of the color, instead, it renders the image twice and then compares, so it is strange that the results are different. Not sure I understand. It does not render same image twice but it renders an `ImageIcon `and an `Icon `and compare the bufferedimage of those 2 so I guess it alright to not have exact color check ` if (red1 != red2 || green1 != green2 || blue1 != blue2) {` and rely on color tolerance which we have in many tests involving bufferedimages.. ------------- PR: https://git.openjdk.java.net/jdk/pull/8380 From serb at openjdk.java.net Wed Apr 27 07:39:43 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 27 Apr 2022 07:39:43 GMT Subject: RFR: 8284077: Create an automated test for JDK-4170173 [v2] In-Reply-To: References: <8iul_waSMDD6G1oVVmwPtW89ihAc6YoMFrTR1-XFmmw=.7802104e-60cb-4b90-9ef5-cc479d3f5a78@github.com> Message-ID: On Tue, 12 Apr 2022 06:09:35 GMT, Srinivas Mandalika wrote: >> Create an automated test for [JDK-4170173](https://bugs.openjdk.java.net/browse/JDK-4170173) >> >> Issue >> JTextComponent.AccessibleJTextComponent.getAfterIndex(int part, int index) works incorrectly, when 'part' parameter is AccessibleText.WORD. >> It returns a space (" ") instead of the correct word. >> >> The test verifies the fix for this behavior by checking the getAfterIndex for AccessibleText.CHARACTER,AccessibleText.WORD,AccessibleText.SENTENCE for the components JTextField, JTextArea, JEditorPane. >> >> While working on this test case there was a related bug relevant to this [JDK-4170174](https://bugs.openjdk.java.net/browse/JDK-4170174) >> This is marked as duplicate, addressess a similar issue. >> It indicates that JTextComponent.AccessibleJTextComponent.getBeforeIndex(int part, int index) works incorrectly, when part parameter is AccessibleText.WORD. >> It returns a space (" ") instead of correct word. >> >> Hence an additional test was added for this, for verifying the behavior of getBeforeIndex. >> AccessibleText.CHARACTER,AccessibleText.WORD,AccessibleText.SENTENCE for the components JTextField, JTextArea, JEditorPane. >> >> The two tests have multiple distinct assertions. For this reason, as well as for maintainability, the two were not clubbed into a single test. >> However, the two tests are still similar in the functional flow of the code and the functionality they are testing as well - hence they have been clubbed into a single review. >> This review is for migrating tests from a closed test suite to open. >> >> Testing: >> The tests ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > Review Comments Fixed: Simplied test Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8138 From serb at openjdk.java.net Wed Apr 27 07:42:44 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 27 Apr 2022 07:42:44 GMT Subject: RFR: 8283624: Create an automated regression test for RFE-4390885 [v3] In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 07:14:33 GMT, Manukumar V S wrote: >> Write a regression test for [JDK-4390885](https://bugs.openjdk.java.net/browse/JDK-4390885) Enhancement Request. >> >> Issue: >> Please add the ability to set the location of a JFileChooser. This might be a >> bug, but JFileChooser.setLocation() has no effect when >> JFileChooser.showXXXXDialog() is called. This is becoming very important as the >> popularity of multiple monitors is increasing. These dialogs show up on the >> wrong monitor which is really annoying. Also due to bug #4189244 I am unable to >> avoid painting problems by positioning the dialog away from the menu item that >> initiated it. >> >> Fix: >> Now it's possible to set the location of Dialog in JFileChooser. >> >> Testing: >> 1. Tested in Mach5 10 times per platform(macos,linux,windows) and got all Pass. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Removed some duplicate code test/jdk/javax/swing/JFileChooser/JFileChooserSetLocationTest.java line 103: > 101: () -> pt.set(panel.getLocationOnScreen())); > 102: Point panel_loc = pt.get(); > 103: xIn = (panel_loc.x + panel.getSize().width) / 2; The getSize should be called on EDT as well. ------------- PR: https://git.openjdk.java.net/jdk/pull/7996 From serb at openjdk.java.net Wed Apr 27 07:44:46 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 27 Apr 2022 07:44:46 GMT Subject: RFR: JDK-8282933: Create a test for JDK-4529616 [v4] In-Reply-To: References: <3d_szd4R6oyDqof-g7sLsV_wkAzuEuma-aXiiUZ03Zw=.6579f560-f11e-4bea-a292-dfcee111a246@github.com> Message-ID: On Thu, 7 Apr 2022 07:02:18 GMT, Srinivas Mandalika wrote: >> JDK-8282933: Create a test for JDK-4529616 >> AccessibleJTableCell.isShowing() returns false when the cell is actually on >> the screen. >> The test validates the fix for the above issue by verifying that the isShowing call returns true when invoked via the accessiblity context. >> This review is for migrating tests from a closed test suite to open. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > 8282933: Whitespace issue fixed Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7783 From serb at openjdk.java.net Wed Apr 27 07:45:46 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Wed, 27 Apr 2022 07:45:46 GMT Subject: RFR: JDK-8282777: Create a Regression test for JDK-4515031 [v3] In-Reply-To: References: Message-ID: On Wed, 30 Mar 2022 10:05:22 GMT, Srinivas Mandalika wrote: >> Create a Regression test for [JDK-4515031](https://bugs.openjdk.java.net/browse/JDK-4515031) >> >> The issue indicates the need for a a getAccessibleDescription being implemented for the JFileChooser. >> The test added verifies the same. >> This review is for migrating tests from a closed test suite to open. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > Review Comments Fixed: Button on EDT, split long lines, volatile description string Please confirm that mach5 is green after this fix. ------------- PR: https://git.openjdk.java.net/jdk/pull/7738 From tnakamura at openjdk.java.net Wed Apr 27 07:49:46 2022 From: tnakamura at openjdk.java.net (Toshio Nakamura) Date: Wed, 27 Apr 2022 07:49:46 GMT Subject: RFR: 8285308: Win: Japanese logical fonts are drawn with wrong size [v2] In-Reply-To: References: Message-ID: On Tue, 26 Apr 2022 16:50:24 GMT, Phil Race wrote: >> Toshio Nakamura has updated the pull request incrementally with one additional commit since the last revision: >> >> Moved the fix to WFontConfiguration > > Hmm. I'm not sure I'm seeing what you see in the native app. > There the Latin font is larger than the JDK case, and the Japanese font is smaller than the JDK case, > and they end up about the same size as each other. > Also you have to remember if you select "8 pt" in a windows native app, that (at 100% scale) is at 96dpi, not 72dpi. > So that's 96/72 times the size of the Java 8 pt font. 8 * 96 / 72 will round up to 11 pixels in native, not the 8 pixels in Java. > > Also JDK - in theory - controls the exact fonts that are used even in a TextField. > > I'd like to see this resolved but I'm still not feeling like I have a sufficient understanding. @prrace Sorry for your confusion. Please allow me to explain with 30-point case. That's too small Japanese characters than alphabets. (With 8-point case, the native application clipped upper side, but I couldn't find the reason.) Java code: `t.setFont(new Font(Font.SERIF, Font.PLAIN, 30));` Native code: `CreateFont(-30, 0, 0, 0, 0, 0, 0, 0, ANSI_CHARSET, 0, 0, 0, 0, _TEXT("Times New Roman"));` These codes displayed the exact same glyphs. Screen shot was attached in JBS. > Also JDK - in theory - controls the exact fonts that are used even in a TextField. Well, I think TextField sets only one font (HFONT) via `AwtTextComponent::SetFont(AwtFont* font)`. `spyxx` command recorded only that WM_SETFONT event. So, we need to pick up a proper font from fontconfig file. Now, unexpected encoding was set and unexpected font was picked up. Expected native call: `CreateFont(-30, 0, 0, 0, 0, 0, 0, 0, SHIFTJIS_CHARSET, 0, 0, 0, 0, _TEXT("MS Mincho"));` ------------- PR: https://git.openjdk.java.net/jdk/pull/8329 From smandalika at openjdk.java.net Wed Apr 27 08:02:20 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 27 Apr 2022 08:02:20 GMT Subject: RFR: 8285693: Create an automated test for JDK-4702199 Message-ID: reate an automated test for [JDK-4702199](https://bugs.openjdk.java.net/browse/JDK-4702199) In order for spatial Braille to work and screen reader "review mode", we need bounding rectangle information for all text on the screen, and also the ability to get text substrings. StarOffice 6.1, Netscape and GNOME accessibility also require this new interface for describing text in their applications. This new interface is required for accessibility to StarOffice 6.1, Netscape and GNOME applications as required by Section 508 The solution is to define a new interface and related two helper classes. AccessibleExtendedText, AccessibleTextSequence. AccessibleAttributeSequence The test validates the public fields of the above classes. This review is for migrating tests from a closed test suite to open. Testing: The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. ------------- Commit messages: - 8285693: Create an automated test for JDK-4702199 Changes: https://git.openjdk.java.net/jdk/pull/8416/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8416&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285693 Stats: 96 lines in 1 file changed: 96 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8416.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8416/head:pull/8416 PR: https://git.openjdk.java.net/jdk/pull/8416 From smandalika at openjdk.java.net Wed Apr 27 08:02:43 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 27 Apr 2022 08:02:43 GMT Subject: RFR: 8284077: Create an automated test for JDK-4170173 [v2] In-Reply-To: References: <8iul_waSMDD6G1oVVmwPtW89ihAc6YoMFrTR1-XFmmw=.7802104e-60cb-4b90-9ef5-cc479d3f5a78@github.com> Message-ID: On Wed, 27 Apr 2022 07:36:24 GMT, Sergey Bylokhov wrote: >> Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: >> >> Review Comments Fixed: Simplied test > > Marked as reviewed by serb (Reviewer). @mrserb Can you please sponsor this PR? ------------- PR: https://git.openjdk.java.net/jdk/pull/8138 From smandalika at openjdk.java.net Wed Apr 27 08:02:46 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 27 Apr 2022 08:02:46 GMT Subject: RFR: JDK-8282933: Create a test for JDK-4529616 [v4] In-Reply-To: References: <3d_szd4R6oyDqof-g7sLsV_wkAzuEuma-aXiiUZ03Zw=.6579f560-f11e-4bea-a292-dfcee111a246@github.com> Message-ID: On Wed, 27 Apr 2022 07:41:21 GMT, Sergey Bylokhov wrote: >> Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: >> >> 8282933: Whitespace issue fixed > > Marked as reviewed by serb (Reviewer). @mrserb Can you please sponsor this PR? ------------- PR: https://git.openjdk.java.net/jdk/pull/7783 From smandalika at openjdk.java.net Wed Apr 27 08:08:32 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 27 Apr 2022 08:08:32 GMT Subject: RFR: 8285305: Create an automated test for JDK-4495286 [v2] In-Reply-To: References: Message-ID: > Create an automated test for [JDK-4495286](https://bugs.openjdk.java.net/browse/JDK-4495286) > > AccessibleJTable.setAccessibleSelction should select rows/cols when cell selection. > When cell selection is not enabled, there is no way, using > accessibility, to select rows or columns. It seems logical that selecting a cell > using accessibility should have the same effect as clicking on a cell with the > mouse. That is, if row or column selection is enabled, then selecting a cell > should instead cause the row or column to be selected. > The proposed test verifies that the above behavior is fixed. > > This review is for migrating tests from a closed test suite to open. > > Testing: > The test ran successfully on Mach5 with multiple runs (40) on windows-x64, linux-x64 and macos-x64. Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: Review comments fixed: Typo in Copyright Header ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8333/files - new: https://git.openjdk.java.net/jdk/pull/8333/files/3c76b2af..98c96eb4 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8333&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8333&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8333.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8333/head:pull/8333 PR: https://git.openjdk.java.net/jdk/pull/8333 From smandalika at openjdk.java.net Wed Apr 27 08:12:43 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 27 Apr 2022 08:12:43 GMT Subject: RFR: JDK-8282777: Create a Regression test for JDK-4515031 [v3] In-Reply-To: References: Message-ID: On Wed, 30 Mar 2022 10:05:22 GMT, Srinivas Mandalika wrote: >> Create a Regression test for [JDK-4515031](https://bugs.openjdk.java.net/browse/JDK-4515031) >> >> The issue indicates the need for a a getAccessibleDescription being implemented for the JFileChooser. >> The test added verifies the same. >> This review is for migrating tests from a closed test suite to open. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > Review Comments Fixed: Button on EDT, split long lines, volatile description string Testing: The tests ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. ------------- PR: https://git.openjdk.java.net/jdk/pull/7738 From smandalika at openjdk.java.net Wed Apr 27 08:49:36 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 27 Apr 2022 08:49:36 GMT Subject: RFR: 8285305: Create an automated test for JDK-4495286 [v2] In-Reply-To: <5PGrwTbHa9J4OrhF_QE7YQOAuykcDOadl7PmH5ID5Hs=.24df96e1-5d43-4b83-a1b7-42169cb85e44@github.com> References: <5PGrwTbHa9J4OrhF_QE7YQOAuykcDOadl7PmH5ID5Hs=.24df96e1-5d43-4b83-a1b7-42169cb85e44@github.com> Message-ID: On Wed, 27 Apr 2022 07:13:24 GMT, Sergey Bylokhov wrote: >> Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: >> >> Review comments fixed: Typo in Copyright Header > > test/jdk/javax/accessibility/4495286/AccessibleJTableSelectionTest.java line 8: > >> 6: * under the terms of the GNU General Public License version 2 only, as >> 7: >> 8: * published by the Free Software Foundation. > > typo Fixed. ------------- PR: https://git.openjdk.java.net/jdk/pull/8333 From mvs at openjdk.java.net Wed Apr 27 10:17:16 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Wed, 27 Apr 2022 10:17:16 GMT Subject: RFR: 8283624: Create an automated regression test for RFE-4390885 [v4] In-Reply-To: References: Message-ID: > Write a regression test for [JDK-4390885](https://bugs.openjdk.java.net/browse/JDK-4390885) Enhancement Request. > > Issue: > Please add the ability to set the location of a JFileChooser. This might be a > bug, but JFileChooser.setLocation() has no effect when > JFileChooser.showXXXXDialog() is called. This is becoming very important as the > popularity of multiple monitors is increasing. These dialogs show up on the > wrong monitor which is really annoying. Also due to bug #4189244 I am unable to > avoid painting problems by positioning the dialog away from the menu item that > initiated it. > > Fix: > Now it's possible to set the location of Dialog in JFileChooser. > > Testing: > 1. Tested in Mach5 10 times per platform(macos,linux,windows) and got all Pass. Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Review comment fixed: Accessed panel.getSize() in EDT ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7996/files - new: https://git.openjdk.java.net/jdk/pull/7996/files/22e4eebc..54c4a6aa Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7996&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7996&range=02-03 Stats: 10 lines in 1 file changed: 5 ins; 0 del; 5 mod Patch: https://git.openjdk.java.net/jdk/pull/7996.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7996/head:pull/7996 PR: https://git.openjdk.java.net/jdk/pull/7996 From mvs at openjdk.java.net Wed Apr 27 10:17:18 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Wed, 27 Apr 2022 10:17:18 GMT Subject: RFR: 8283624: Create an automated regression test for RFE-4390885 [v3] In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 07:38:42 GMT, Sergey Bylokhov wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Removed some duplicate code > > test/jdk/javax/swing/JFileChooser/JFileChooserSetLocationTest.java line 103: > >> 101: () -> pt.set(panel.getLocationOnScreen())); >> 102: Point panel_loc = pt.get(); >> 103: xIn = (panel_loc.x + panel.getSize().width) / 2; > > The getSize should be called on EDT as well. Changed. ------------- PR: https://git.openjdk.java.net/jdk/pull/7996 From dfuchs at openjdk.java.net Wed Apr 27 10:59:43 2022 From: dfuchs at openjdk.java.net (Daniel Fuchs) Date: Wed, 27 Apr 2022 10:59:43 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces In-Reply-To: References: Message-ID: On Tue, 26 Apr 2022 22:24:26 GMT, Joe Darcy wrote: > To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. > > To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. > > Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). > > I'll update copyright years before pushing. Hi Joe, just two suggestions about the javax.management changes. Otherwise looks good! src/java.management/share/classes/javax/management/openmbean/ArrayType.java line 96: > 94: * > 95: * @param the Java type that instances described by this type must > 96: * have. Instead of "instances" - would it be more correct to say "array elements"? src/java.management/share/classes/javax/management/openmbean/SimpleType.java line 60: > 58: * @param the Java type that instances described by this type must > 59: * have. > 60: * I would suggest to say "that values described by this type"... ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From mvs at openjdk.java.net Wed Apr 27 11:03:41 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Wed, 27 Apr 2022 11:03:41 GMT Subject: RFR: 8274597: Some of the dnd tests time out and fail intermittently [v2] In-Reply-To: References: <-M3RkI7ibFy3E3pyMdIyr-7-WWbZQXFo_4no53mvgDY=.761ad3d4-ff6c-4453-a328-173492e14616@github.com> Message-ID: On Wed, 27 Apr 2022 07:33:31 GMT, Sergey Bylokhov wrote: > Why do these tests timeout? is it possible that we can get a deadlock there? This doesn't seem to be a deadlock. When there is no sufficient delay after the mouse release(dragged mouse pointer release to drop the content), the frame is getting disposed even before the drop() method gets called. So it waits for the drop() method which will never happen as the frame has been already disposed. Instead of the fix suggested here, this can be also fixed by just increasing the robot delay after mouse release to at least 100ms. ------------- PR: https://git.openjdk.java.net/jdk/pull/8316 From prappo at openjdk.java.net Wed Apr 27 11:13:27 2022 From: prappo at openjdk.java.net (Pavel Rappo) Date: Wed, 27 Apr 2022 11:13:27 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces In-Reply-To: References: Message-ID: On Tue, 26 Apr 2022 22:24:26 GMT, Joe Darcy wrote: > To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. > > To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. > > Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). > > I'll update copyright years before pushing. I note that many years ago you filed JDK-6327933, which I'm currently looking at. If implemented, many of the issues from this PR will be addressed automatically, including those in `java.util.concurrent`. ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From mvs at openjdk.java.net Wed Apr 27 11:39:14 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Wed, 27 Apr 2022 11:39:14 GMT Subject: RFR: 8285698: Create a test to check the focus stealing of JPopupMenu from JComboBox Message-ID: This test verifies that showing a JPopupMenu shouldn't steal the focus out of current focused component.. This fix moves an unstable closed test to open but updated to be more comprehensive in testing multiple Look and Feels and with some stabilisation improvements. The closed test had some dependencies with some proprietary libraries which are all removed here. Testing: Tested using mach5 10 times per platform and got all Pass. ------------- Commit messages: - 8285698: Create a test to check the focus stealing of JPopupMenu from JComboBox Changes: https://git.openjdk.java.net/jdk/pull/8426/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8426&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285698 Stats: 183 lines in 1 file changed: 183 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8426.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8426/head:pull/8426 PR: https://git.openjdk.java.net/jdk/pull/8426 From psadhukhan at openjdk.java.net Wed Apr 27 12:26:44 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Wed, 27 Apr 2022 12:26:44 GMT Subject: RFR: 8285617 : Fix java/awt/print/PrinterJob/ImagePrinting/PrintARGBImage.java manual test In-Reply-To: References: Message-ID: On Tue, 26 Apr 2022 01:44:45 GMT, lawrence.andrews wrote: > 1) Removed yesno since test was failing with parser error due to @run main/manual=yesno > 2) User can't decide whether it as pass or fail after looking into the printout so add the PassFailJFrame support > > @shurymury > @aivanov-jdk Marked as reviewed by psadhukhan (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8395 From duke at openjdk.java.net Wed Apr 27 12:26:44 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Wed, 27 Apr 2022 12:26:44 GMT Subject: Integrated: 8285617 : Fix java/awt/print/PrinterJob/ImagePrinting/PrintARGBImage.java manual test In-Reply-To: References: Message-ID: On Tue, 26 Apr 2022 01:44:45 GMT, lawrence.andrews wrote: > 1) Removed yesno since test was failing with parser error due to @run main/manual=yesno > 2) User can't decide whether it as pass or fail after looking into the printout so add the PassFailJFrame support > > @shurymury > @aivanov-jdk This pull request has now been integrated. Changeset: e7c3b9de Author: lawrence.andrews Committer: Prasanta Sadhukhan URL: https://git.openjdk.java.net/jdk/commit/e7c3b9de649d4b28ba16844e042afcf3c89323e5 Stats: 49 lines in 1 file changed: 26 ins; 7 del; 16 mod 8285617: Fix java/awt/print/PrinterJob/ImagePrinting/PrintARGBImage.java manual test Reviewed-by: prr, psadhukhan ------------- PR: https://git.openjdk.java.net/jdk/pull/8395 From mbaesken at openjdk.java.net Wed Apr 27 15:05:16 2022 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Wed, 27 Apr 2022 15:05:16 GMT Subject: RFR: JDK-8285730: unify _WIN32_WINNT settings Message-ID: Currently we set _WIN32_WINNT at various places in the codebase; this is used to target a minimum Windows version we want to support. See also for more detailled information : https://docs.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers?redirectedfrom=MSDN#setting-winver-or-_win32_winnt Macros for Conditional Declarations "Certain functions that depend on a particular version of Windows are declared using conditional code. This enables you to use the compiler to detect whether your application uses functions that are not supported on its target version(s) of Windows." However currently we have quite a lot of differing settings of _WIN32_WINNT in the codebase ; setting _WIN32_WINNT to 0x0601 (Windows 7) where possible would make sense because we have this setting already at java_props_md.c (so targeting older Windows versions at other places is most likely not useful). ------------- Commit messages: - JDK-8285730 Changes: https://git.openjdk.java.net/jdk/pull/8428/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8428&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285730 Stats: 14 lines in 7 files changed: 1 ins; 0 del; 13 mod Patch: https://git.openjdk.java.net/jdk/pull/8428.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8428/head:pull/8428 PR: https://git.openjdk.java.net/jdk/pull/8428 From alanb at openjdk.java.net Wed Apr 27 15:14:43 2022 From: alanb at openjdk.java.net (Alan Bateman) Date: Wed, 27 Apr 2022 15:14:43 GMT Subject: RFR: JDK-8285730: unify _WIN32_WINNT settings In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 14:57:41 GMT, Matthias Baesken wrote: > Currently we set _WIN32_WINNT at various places in the codebase; this is used to target a minimum Windows version we want to support. See also for more detailled information : > https://docs.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers?redirectedfrom=MSDN#setting-winver-or-_win32_winnt > Macros for Conditional Declarations > "Certain functions that depend on a particular version of Windows are declared using conditional code. This enables you to use the compiler to detect whether your application uses functions that are not supported on its target version(s) of Windows." > > However currently we have quite a lot of differing settings of _WIN32_WINNT in the codebase ; setting _WIN32_WINNT to 0x0601 (Windows 7) where possible would make sense because we have this setting already at java_props_md.c (so targeting older Windows versions at other places is most likely not useful). src/java.base/windows/native/libnio/ch/wepoll.c line 159: > 157: > 158: #undef _WIN32_WINNT > 159: #define _WIN32_WINNT 0x0601 This is 3rd party code and would prefer not change it if possible. ------------- PR: https://git.openjdk.java.net/jdk/pull/8428 From smandalika at openjdk.java.net Wed Apr 27 15:28:53 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 27 Apr 2022 15:28:53 GMT Subject: RFR: JDK-8282778: Create a regression test for JDK-4699544 [v4] In-Reply-To: References: Message-ID: On Tue, 12 Apr 2022 09:05:56 GMT, Srinivas Mandalika wrote: >> Create a regression test for JDK-4699544 >> >> The subclass of javax.swing.JRootPane (AccessibleJRootPane) that implements the accessibility interface javax.accessibility.AccessibleComponent is derived from java.awt.AccessibleAWTComponent, which returns null for getAccessibleAt() because a component does not necessarily have childs. >> >> The root pane always has a content pane child, so getAccessibleAt() should be overwritten by AccessibleJRootPane appropriately. >> The test added verifies the same. >> This review is for migrating tests from a closed test suite to open. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > Review Comments Fixed: removed redundant class variables The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. ------------- PR: https://git.openjdk.java.net/jdk/pull/7739 From smandalika at openjdk.java.net Wed Apr 27 15:28:53 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 27 Apr 2022 15:28:53 GMT Subject: RFR: JDK-8282777: Create a Regression test for JDK-4515031 [v3] In-Reply-To: References: Message-ID: On Wed, 30 Mar 2022 10:05:22 GMT, Srinivas Mandalika wrote: >> Create a Regression test for [JDK-4515031](https://bugs.openjdk.java.net/browse/JDK-4515031) >> >> The issue indicates the need for a a getAccessibleDescription being implemented for the JFileChooser. >> The test added verifies the same. >> This review is for migrating tests from a closed test suite to open. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > Review Comments Fixed: Button on EDT, split long lines, volatile description string Yes. The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. ------------- PR: https://git.openjdk.java.net/jdk/pull/7738 From smandalika at openjdk.java.net Wed Apr 27 15:32:42 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 27 Apr 2022 15:32:42 GMT Subject: RFR: JDK-8282933: Create a test for JDK-4529616 [v4] In-Reply-To: References: <3d_szd4R6oyDqof-g7sLsV_wkAzuEuma-aXiiUZ03Zw=.6579f560-f11e-4bea-a292-dfcee111a246@github.com> Message-ID: On Thu, 7 Apr 2022 07:02:18 GMT, Srinivas Mandalika wrote: >> JDK-8282933: Create a test for JDK-4529616 >> AccessibleJTableCell.isShowing() returns false when the cell is actually on >> the screen. >> The test validates the fix for the above issue by verifying that the isShowing call returns true when invoked via the accessiblity context. >> This review is for migrating tests from a closed test suite to open. > > Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: > > 8282933: Whitespace issue fixed The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. ------------- PR: https://git.openjdk.java.net/jdk/pull/7783 From smandalika at openjdk.java.net Wed Apr 27 15:32:45 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 27 Apr 2022 15:32:45 GMT Subject: RFR: 8282857: Create a regression test for JDK-4702690 [v3] In-Reply-To: <1MCuz4h2_IMc9oR2q-DP_O5xoiS_7j1cQ8DTHaQxDlU=.a5b07c51-39fa-4c39-aa2d-74643c22cf0f@github.com> References: <1MCuz4h2_IMc9oR2q-DP_O5xoiS_7j1cQ8DTHaQxDlU=.a5b07c51-39fa-4c39-aa2d-74643c22cf0f@github.com> Message-ID: <1XA-7n40a5bQcXiVjcsRm74Djff-vCXZ6-vI5rl7M_0=.22bbb88b-8eab-4934-bcb7-4e581c069660@github.com> On Wed, 6 Apr 2022 07:02:25 GMT, Srinivas Mandalika wrote: >> Create a regression test for [JDK-4702690](https://bugs.openjdk.java.net/browse/JDK-4702690) >> >> In many cases in Swing it is possible to easily programatically determine that a JScrollBar (or two) is scrolling some JPanel (the cannonical case is a JScrollPane). >> In these cases, when accessibility support is instantiated (e.g. the AccessibleJScrollBar is created), a Controller_For and Controled_By relation should be instantiated between the AccessibleJScrollBar and the AccessibleJPanel that the JScrollBar and JPanel are associated with. >> >> This allows various assistive technologies, especially voice-recognition technologies, to better interact with scrolling items. >> >> The test put up validates that the target object for these properties(CONTROLLED_BY, CONTROLLED_FOR) are set appropriately for JScrollPane and JScrollBar. >> This review is for migrating tests from a closed test suite to open. > > Srinivas Mandalika has updated the pull request incrementally with two additional commits since the last revision: > > - Review Comments Fixed: Swing Components on EDT, 80 chars lines > - Review Comments Fixed: Swing Components on EDT, 80 chars lines The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. ------------- PR: https://git.openjdk.java.net/jdk/pull/7753 From kizune at openjdk.java.net Wed Apr 27 15:44:42 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Wed, 27 Apr 2022 15:44:42 GMT Subject: RFR: 8282526: Default icon is not painted properly [v3] In-Reply-To: References: <7zYHFtn9L54eIDP49ZZtZA_kDPWwhwWTo1Zzy82gyYc=.21baf5bc-9604-4242-92d7-65bfb68cf9a0@github.com> <9YGqKP4x5N0miiskVwMoF201g7ng3JjTnJF5ctGkD5w=.9b763d6a-469d-49b0-83cd-79cc46cdfecd@github.com> Message-ID: On Wed, 27 Apr 2022 00:00:19 GMT, Sergey Bylokhov wrote: > We don't need to push change down to the pipeline, we should push it up to the place where we paint this ImageIcon, eventually where we call ImageIcon.paintIcon() Why? As i shown in the test case the problem affects any ImageIcon based on the MultiResolutionImage. I'm not trying to solve the singular issue that in the Windows LaF - i am trying to eliminate the reason this problem can show up. > Then why, as described in the JBS, it worked before? Did we request different image, or size, or did we skip scaling? Because before that change we were using different binary API to retrieve icons. This API only allows gathering 8x8 and 16x16 icons. The new API can be used for requesting icons of any size but for some files it ignores the requested size and only returns 32x32 icon. In this case we creating the multi resolution image with that icon inside and allow icon painting routine do the scaling. As i shown in my test for this bug the scaling works poorly and here i'm trying to enhance it. Can it be done in WinLAF? Yes, absolutely, but it will not solve the more generic issue. ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From kizune at openjdk.java.net Wed Apr 27 16:40:41 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Wed, 27 Apr 2022 16:40:41 GMT Subject: RFR: 6829250: Reg test: java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java fails in Windows In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 07:30:40 GMT, Sergey Bylokhov wrote: > I as far as I remember the same behavior was on old windows and jdk7 or even [jdk6](https://stackoverflow.com/questions/7403584/does-jframe-setextendedstatemaximized-both-work-with-undecorated-frames), the root cause is that awt does not support the "MAXIMIZED_BOTH" The MAXIMIZED_BOTH for undecorated frames works, however, for undecorated frames it allows window to overlap the taskbar so the window occupies the entirety of the screen. I do not think it is a bug. ------------- PR: https://git.openjdk.java.net/jdk/pull/8314 From prr at openjdk.java.net Wed Apr 27 17:52:48 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 27 Apr 2022 17:52:48 GMT Subject: RFR: 8284672: Collapse identical catch branches in java.desktop In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 06:50:15 GMT, Andrey Turbanov wrote: > Let's take advantage of Java 7 language feature - "Catching Multiple Exception Types". > It simplifies code. Reduces duplication. > Found by IntelliJ IDEA inspection Identical 'catch' branches in 'try' statement Marked as reviewed by prr (Reviewer). src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/Metacity.java line 610: > 608: } > 609: } catch (MalformedURLException ex) { > 610: // OK to just ignore. We'll use a fallback theme. subclass of IOException I suppose src/java.desktop/share/classes/com/sun/media/sound/DLSSoundbankReader.java line 50: > 48: try { > 49: return new DLSSoundbank(url); > 50: } catch (IOException e) { So how can this method throw the declared IOException ? Hmm I suppose the API super-class declares it is src/java.desktop/share/classes/com/sun/media/sound/SF2SoundbankReader.java line 50: > 48: try { > 49: return new SF2Soundbank(url); > 50: } catch (IOException e) { same here ------------- PR: https://git.openjdk.java.net/jdk/pull/8154 From prr at openjdk.java.net Wed Apr 27 17:56:51 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 27 Apr 2022 17:56:51 GMT Subject: RFR: JDK-8285730: unify _WIN32_WINNT settings In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 14:57:41 GMT, Matthias Baesken wrote: > Currently we set _WIN32_WINNT at various places in the codebase; this is used to target a minimum Windows version we want to support. See also for more detailled information : > https://docs.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers?redirectedfrom=MSDN#setting-winver-or-_win32_winnt > Macros for Conditional Declarations > "Certain functions that depend on a particular version of Windows are declared using conditional code. This enables you to use the compiler to detect whether your application uses functions that are not supported on its target version(s) of Windows." > > However currently we have quite a lot of differing settings of _WIN32_WINNT in the codebase ; setting _WIN32_WINNT to 0x0601 (Windows 7) where possible would make sense because we have this setting already at java_props_md.c (so targeting older Windows versions at other places is most likely not useful). This is OK by me, but I wonder if the build folks might want to think about this and whether it should be centralised somehow since it seems odd to mandate different versions of windows in different places. ------------- PR: https://git.openjdk.java.net/jdk/pull/8428 From prr at openjdk.java.net Wed Apr 27 18:02:44 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 27 Apr 2022 18:02:44 GMT Subject: RFR: 8284956: Potential leak awtImageData/color_data when initializes X11GraphicsEnvironment In-Reply-To: <3POzEJ3BfvLSZncFAN7pluxsSz9_UB_wyeCMV53X-CQ=.e24bef4e-3638-4338-bd3e-3d341e21428a@github.com> References: <3POzEJ3BfvLSZncFAN7pluxsSz9_UB_wyeCMV53X-CQ=.e24bef4e-3638-4338-bd3e-3d341e21428a@github.com> Message-ID: On Wed, 20 Apr 2022 13:48:19 GMT, Zhengyu Gu wrote: > During initializing native data of `X11GraphicsEnvironment`, a single `AwtGraphicsConfigData` is used/reused, not only failed cases, but also succeeded cases. So `AwtGraphicsConfigData` internal states need to be cleanup properly to avoid memory leaks. > > Test: > - [x] jdk_awt Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8317 From prr at openjdk.java.net Wed Apr 27 18:05:48 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 27 Apr 2022 18:05:48 GMT Subject: RFR: 8284680: sun.font.FontConfigManager.getFontConfig() leaks charset In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 18:05:09 GMT, Zhengyu Gu wrote: > Please review this small patch that releases temporary charsets to avoid memory leak. > > Test: > > - [x] jdk_2d Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8187 From prr at openjdk.java.net Wed Apr 27 18:08:55 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 27 Apr 2022 18:08:55 GMT Subject: RFR: 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java In-Reply-To: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> References: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> Message-ID: <-oFYub4AXIGvGCGaoILSPxKmftgTjR2Cb2_oCfJFbxk=.504a9287-f8e0-458a-af7d-674625ee5236@github.com> On Wed, 27 Apr 2022 00:06:41 GMT, lawrence.andrews wrote: > 1) Fixed Parser error by removing yesno from @run main/manual=yesno > 2) Used PassFaileJFrame to show the test instruction to the user instead of printing the test instruction on the console or jtreg log file. > 3) If printer is not configured then mark the test as passed. > > @shurymury > @aivanov-jdk Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8412 From prr at openjdk.java.net Wed Apr 27 18:14:45 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 27 Apr 2022 18:14:45 GMT Subject: RFR: 8274597: Some of the dnd tests time out and fail intermittently [v2] In-Reply-To: <-M3RkI7ibFy3E3pyMdIyr-7-WWbZQXFo_4no53mvgDY=.761ad3d4-ff6c-4453-a328-173492e14616@github.com> References: <-M3RkI7ibFy3E3pyMdIyr-7-WWbZQXFo_4no53mvgDY=.761ad3d4-ff6c-4453-a328-173492e14616@github.com> Message-ID: On Wed, 20 Apr 2022 13:28:17 GMT, Manukumar V S wrote: >> These dnd tests fails with a time out intermittently in some machines(mostly Windows 11) which creates frequent noise in CI. >> 1. java/awt/dnd/AcceptDropMultipleTimes/AcceptDropMultipleTimes.java >> 2. java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java >> 3. java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java >> >> Issue : >> These tests are using the Util.drag() method and there was no robot.delay() added between different mouse actions in this method. This could potentially make tests using this method unstable. >> >> Fix: >> Adding a small auto delay of 100ms to fix this. >> >> Testing: >> 1. All the three tests are run 15 times per platform. >> 2. All the tests in java/awt/dnd package run 5 times per platform >> 3. All the three tests are run 5 times specifically on Windows 11 platform. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Added blank line at end of file test/jdk/java/awt/regtesthelpers/Util.java line 325: > 323: robot.setAutoDelay(100); > 324: autoDelaySet = true; > 325: } If this is the right place to fix it - in the Util class - then you can just call delay(100) in the places you need it - no need to set and then unset auto-delay. Changing Util you will need to re-validate all tests that use this utility method. Based on the explanation you gave ~mrserb I wonder if the test should also be waiting for the drop before disposing, not just throwing an arbitrary wait into the mix. ------------- PR: https://git.openjdk.java.net/jdk/pull/8316 From smandalika at openjdk.java.net Wed Apr 27 18:18:49 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 27 Apr 2022 18:18:49 GMT Subject: Integrated: JDK-8282933: Create a test for JDK-4529616 In-Reply-To: <3d_szd4R6oyDqof-g7sLsV_wkAzuEuma-aXiiUZ03Zw=.6579f560-f11e-4bea-a292-dfcee111a246@github.com> References: <3d_szd4R6oyDqof-g7sLsV_wkAzuEuma-aXiiUZ03Zw=.6579f560-f11e-4bea-a292-dfcee111a246@github.com> Message-ID: <4hrd0HoaJLJrdrcMrJiX2N1XkQJrfo1umA1k78klCR4=.5afe3288-1c2b-440f-a16c-c2f84a505b1e@github.com> On Fri, 11 Mar 2022 06:30:04 GMT, Srinivas Mandalika wrote: > JDK-8282933: Create a test for JDK-4529616 > AccessibleJTableCell.isShowing() returns false when the cell is actually on > the screen. > The test validates the fix for the above issue by verifying that the isShowing call returns true when invoked via the accessiblity context. > This review is for migrating tests from a closed test suite to open. This pull request has now been integrated. Changeset: a0b984a7 Author: Srinivas Mandalika Committer: Phil Race URL: https://git.openjdk.java.net/jdk/commit/a0b984a778c1f9a89fd3e1e474b5a5165a0841b0 Stats: 92 lines in 1 file changed: 92 ins; 0 del; 0 mod 8282933: Create a test for JDK-4529616 Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/7783 From prr at openjdk.java.net Wed Apr 27 18:19:30 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 27 Apr 2022 18:19:30 GMT Subject: RFR: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux [v5] In-Reply-To: References: Message-ID: On Fri, 8 Apr 2022 06:49:09 GMT, Maxim Kartashev wrote: >> These crashes were not reproducible, so the fix is based on a hypothesis that there are two possible reasons for them: >> 1. `makeDefaultConfig()` returning `NULL`. >> 2. A race condition when the number of screens changes. >> The race scenario: `X11GraphisDevice.makeDefaultConfiguration()` is called on EDT so the call can race with `X11GraphisDevice.invalidate()` that re-sets the screen number of the device; the latter is invoked on the `AWT-XAWT` thread from `X11GraphicsEnvironment.rebuildDevices()`. So by the time `makeDefaultConfiguration()` makes a native call with the device's current screen number, the `x11Screens` array maintained by the native code could have become shorter. And the native methods like `Java_sun_awt_X11GraphicsDevice_getConfigColormap()` assume that the number passed to them is always current and valid. The AWT lock only protects against the changes during the native methods invocation and does not protect against them being called with an outdated screen number. With a larger screen number, those methods read past the end of the `x11Screens` array. >> >> The fix for (1) is to die gracefully instead of crashing in an attempt to de-reference a `NULL` pointer, which might happen upon returning from `makeDefaultConfig()` in `getAllConfigs()`. >> >> The fix for (2) is to eliminate the race by protecting `X11GraphisDevice.screen` with the AWT lock such that it doesn't change when the native methods working with it are active. >> >> We've been shipping JetBrains Runtime with this fix for a few months now and there were no crash reports with those specific patterns against the versions with the fix. > > Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision: > > Restored the original code in X11GraphicsDevice.java that got auto-formatted Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From smandalika at openjdk.java.net Wed Apr 27 18:19:56 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Wed, 27 Apr 2022 18:19:56 GMT Subject: Integrated: 8284077: Create an automated test for JDK-4170173 In-Reply-To: <8iul_waSMDD6G1oVVmwPtW89ihAc6YoMFrTR1-XFmmw=.7802104e-60cb-4b90-9ef5-cc479d3f5a78@github.com> References: <8iul_waSMDD6G1oVVmwPtW89ihAc6YoMFrTR1-XFmmw=.7802104e-60cb-4b90-9ef5-cc479d3f5a78@github.com> Message-ID: On Thu, 7 Apr 2022 07:40:18 GMT, Srinivas Mandalika wrote: > Create an automated test for [JDK-4170173](https://bugs.openjdk.java.net/browse/JDK-4170173) > > Issue > JTextComponent.AccessibleJTextComponent.getAfterIndex(int part, int index) works incorrectly, when 'part' parameter is AccessibleText.WORD. > It returns a space (" ") instead of the correct word. > > The test verifies the fix for this behavior by checking the getAfterIndex for AccessibleText.CHARACTER,AccessibleText.WORD,AccessibleText.SENTENCE for the components JTextField, JTextArea, JEditorPane. > > While working on this test case there was a related bug relevant to this [JDK-4170174](https://bugs.openjdk.java.net/browse/JDK-4170174) > This is marked as duplicate, addressess a similar issue. > It indicates that JTextComponent.AccessibleJTextComponent.getBeforeIndex(int part, int index) works incorrectly, when part parameter is AccessibleText.WORD. > It returns a space (" ") instead of correct word. > > Hence an additional test was added for this, for verifying the behavior of getBeforeIndex. > AccessibleText.CHARACTER,AccessibleText.WORD,AccessibleText.SENTENCE for the components JTextField, JTextArea, JEditorPane. > > The two tests have multiple distinct assertions. For this reason, as well as for maintainability, the two were not clubbed into a single test. > However, the two tests are still similar in the functional flow of the code and the functionality they are testing as well - hence they have been clubbed into a single review. > This review is for migrating tests from a closed test suite to open. > > Testing: > The tests ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. This pull request has now been integrated. Changeset: 6db2e16b Author: Srinivas Mandalika Committer: Phil Race URL: https://git.openjdk.java.net/jdk/commit/6db2e16b948ccb78839285051e136b8a023b2f7b Stats: 251 lines in 2 files changed: 251 ins; 0 del; 0 mod 8284077: Create an automated test for JDK-4170173 Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8138 From prr at openjdk.java.net Wed Apr 27 18:22:56 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 27 Apr 2022 18:22:56 GMT Subject: RFR: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box [v12] In-Reply-To: References: Message-ID: On Fri, 4 Mar 2022 22:38:33 GMT, Jeremy 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 >> >> 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. > > I don't suppose any new client-lib members would be willing to set up a CSR for this PR? > > No worries if not. I just wanted to double-check before this PR gets auto-closed. > > (I'm under the impression I can't initiate a CSR and there's nothing else I can do here; if I'm wrong please let me know.) This is waiting for @mickleness to type "/integrate", so I can follow it up with "/sponsor" I don't think it can get pushed unless the fixer does that /integrate. ------------- PR: https://git.openjdk.java.net/jdk/pull/6227 From duke at openjdk.java.net Wed Apr 27 18:23:41 2022 From: duke at openjdk.java.net (Maxim Kartashev) Date: Wed, 27 Apr 2022 18:23:41 GMT Subject: Integrated: 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux In-Reply-To: References: Message-ID: On Fri, 21 Jan 2022 17:02:38 GMT, Maxim Kartashev wrote: > These crashes were not reproducible, so the fix is based on a hypothesis that there are two possible reasons for them: > 1. `makeDefaultConfig()` returning `NULL`. > 2. A race condition when the number of screens changes. > The race scenario: `X11GraphisDevice.makeDefaultConfiguration()` is called on EDT so the call can race with `X11GraphisDevice.invalidate()` that re-sets the screen number of the device; the latter is invoked on the `AWT-XAWT` thread from `X11GraphicsEnvironment.rebuildDevices()`. So by the time `makeDefaultConfiguration()` makes a native call with the device's current screen number, the `x11Screens` array maintained by the native code could have become shorter. And the native methods like `Java_sun_awt_X11GraphicsDevice_getConfigColormap()` assume that the number passed to them is always current and valid. The AWT lock only protects against the changes during the native methods invocation and does not protect against them being called with an outdated screen number. With a larger screen number, those methods read past the end of the `x11Screens` array. > > The fix for (1) is to die gracefully instead of crashing in an attempt to de-reference a `NULL` pointer, which might happen upon returning from `makeDefaultConfig()` in `getAllConfigs()`. > > The fix for (2) is to eliminate the race by protecting `X11GraphisDevice.screen` with the AWT lock such that it doesn't change when the native methods working with it are active. > > We've been shipping JetBrains Runtime with this fix for a few months now and there were no crash reports with those specific patterns against the versions with the fix. This pull request has now been integrated. Changeset: 05dac5a2 Author: Maxim Kartashev Committer: Phil Race URL: https://git.openjdk.java.net/jdk/commit/05dac5a23ed2813b2f4f2e4f007ebb93b4ae23ef Stats: 79 lines in 3 files changed: 34 ins; 28 del; 17 mod 8280468: Crashes in getConfigColormap, getConfigVisualId, XVisualIDFromVisual on Linux Reviewed-by: serb, prr ------------- PR: https://git.openjdk.java.net/jdk/pull/7182 From duke at openjdk.java.net Wed Apr 27 18:31:54 2022 From: duke at openjdk.java.net (Jeremy) Date: Wed, 27 Apr 2022 18:31:54 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. Sorry, it's been a hectic month over here. ------------- PR: https://git.openjdk.java.net/jdk/pull/6227 From erikj at openjdk.java.net Wed Apr 27 18:45:50 2022 From: erikj at openjdk.java.net (Erik Joelsson) Date: Wed, 27 Apr 2022 18:45:50 GMT Subject: RFR: JDK-8285730: unify _WIN32_WINNT settings In-Reply-To: References: Message-ID: <5-HeJlcacDvbVk9KSvjZuq9oVSneaCrDOB7F7hn-dJY=.63974f0b-5f61-4141-85de-43fe83af0fc0@github.com> On Wed, 27 Apr 2022 14:57:41 GMT, Matthias Baesken wrote: > Currently we set _WIN32_WINNT at various places in the codebase; this is used to target a minimum Windows version we want to support. See also for more detailled information : > https://docs.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers?redirectedfrom=MSDN#setting-winver-or-_win32_winnt > Macros for Conditional Declarations > "Certain functions that depend on a particular version of Windows are declared using conditional code. This enables you to use the compiler to detect whether your application uses functions that are not supported on its target version(s) of Windows." > > However currently we have quite a lot of differing settings of _WIN32_WINNT in the codebase ; setting _WIN32_WINNT to 0x0601 (Windows 7) where possible would make sense because we have this setting already at java_props_md.c (so targeting older Windows versions at other places is most likely not useful). Requiring different windows versions in different parts of the product doesn't make much sense, but I think it's even worse trying to keep all these different locations in sync. At least most of these have a comment explaining why that particular Windows version is required there. Changing these values invalidates those comments. If we are to do something about this, then we need to define this macro in a central location, and verify the value in configure. Then we would provide it either on compile command lines, or in a globally included config.h. ------------- PR: https://git.openjdk.java.net/jdk/pull/8428 From duke at openjdk.java.net Wed Apr 27 18:45:59 2022 From: duke at openjdk.java.net (Jeremy) Date: Wed, 27 Apr 2022 18:45:59 GMT Subject: Integrated: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box In-Reply-To: References: Message-ID: On Wed, 3 Nov 2021 07:27:03 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. This pull request has now been integrated. Changeset: 8a16842b Author: jeremy Committer: Phil Race URL: https://git.openjdk.java.net/jdk/commit/8a16842b4e906b2eede0c01914f41010cabc51c2 Stats: 713 lines in 6 files changed: 594 ins; 114 del; 5 mod 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box Reviewed-by: prr ------------- PR: https://git.openjdk.java.net/jdk/pull/6227 From prr at openjdk.java.net Wed Apr 27 18:46:02 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 27 Apr 2022 18:46:02 GMT Subject: RFR: 8264666: Change implementation of safeAdd/safeMult in the LCMSImageLayout class [v2] In-Reply-To: References: <3iYQc9duUeEGRqm3146n4XhLQ_LY6YzXv-f-WgDu9sE=.a0a36297-4ce8-489c-9b50-43aede408e3b@github.com> Message-ID: On Fri, 22 Apr 2022 07:36:43 GMT, Sergey Bylokhov wrote: >> Description of the new version of the fix: >> While I have worked on this change and tried to consider the comments, I have found that the usages of the "safeAdd/safeMult" in the LCMSImageLayout class are incorrect. Both methods are based on the "Math" versions but throw a different exception. The problem is that its implementation may accept the negative values during intermediate calculation, see the old implementation of "[verify](https://github.com/openjdk/jdk/blob/139615b1815d4afd3593536d83fa8b25430f35e7/src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java#L343)" method: >> 1. We check the "offset" value: 0 <= offset < dataArrayLength >> 2. We do some intermediate calculations that "accept" negative values >> 3. We check the final "off" value: 0 <= offset < dataArrayLength >> >> I wondered is it possible to provide some data that using wrong/negative data at step2 may result in the correct check at step3. I spent some time and was able to reproduce the problem with the attached test case. Note that the test is a little bit cryptic since it is not possible to reproduce it by input image data. >> >> Note: I have removed all cleanup from the fix, to make it simpler. >> >> <======> >> Description of the old version of the fix: >> - The hand-crafted methods for addition and multiplication are replaced by the "Math" versions. >> - Cleanup: the usage of do/while(false) is removed > > 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 six additional commits since the last revision: > > - Initial version 8264666 > - Merge branch 'master' into LCMSImageLayout > - Revert "safeXX -> xxExact" > > This reverts commit a1876fa596a6831f036c04f45fa89c2caba47087. > - Revert "delete "do{...} while (false);"" > > This reverts commit a9e91601c355f96c82dd8b2b8564a3a3e7b96aef. > - delete "do{...} while (false);" > - safeXX -> xxExact Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/3333 From prr at openjdk.java.net Wed Apr 27 18:46:06 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 27 Apr 2022 18:46:06 GMT Subject: RFR: 8264666: Change implementation of safeAdd/safeMult in the LCMSImageLayout class [v2] In-Reply-To: References: <3iYQc9duUeEGRqm3146n4XhLQ_LY6YzXv-f-WgDu9sE=.a0a36297-4ce8-489c-9b50-43aede408e3b@github.com> Message-ID: On Sun, 4 Apr 2021 07:58:44 GMT, Sergey Bylokhov wrote: >> 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 six additional commits since the last revision: >> >> - Initial version 8264666 >> - Merge branch 'master' into LCMSImageLayout >> - Revert "safeXX -> xxExact" >> >> This reverts commit a1876fa596a6831f036c04f45fa89c2caba47087. >> - Revert "delete "do{...} while (false);"" >> >> This reverts commit a9e91601c355f96c82dd8b2b8564a3a3e7b96aef. >> - delete "do{...} while (false);" >> - safeXX -> xxExact > > src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java line 241: > >> 239: l.dataType = DT_INT; >> 240: >> 241: if (l.nextRowOffset == l.width * 4 * intRaster.getPixelStride()) { > > Any idea why the "do/while(false)" was used here? I can only guess it was just style .. ------------- PR: https://git.openjdk.java.net/jdk/pull/3333 From duke at openjdk.java.net Wed Apr 27 18:52:46 2022 From: duke at openjdk.java.net (DamonGuy) Date: Wed, 27 Apr 2022 18:52:46 GMT Subject: RFR: JDK-8282772: JButton text set as HTML content has unwanted padding [v2] In-Reply-To: References: Message-ID: > The insets for buttons were incorrect for L&Fs except for Aqua when the text is set to HTML. This was fixed in Aqua by adding a conditional to check for the BasicHTML property key in the button component. This same logic can be used to fix Metal & Motif L&Fs in BasicButtonUI, but Nimbus is not fixed by this. Nimbus gets its default values from a skin.laf file, and when the defaults here are set to have left & right insets to 0 for ButtonUI, the issue is fixed. I also tested for non-HTML text after the changes, and the changes do not affect normal text. > > The HtmlButtonImageTest has been changed to cycle through all L&Fs available on a device. DamonGuy has updated the pull request incrementally with one additional commit since the last revision: Changed approach to fix. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8407/files - new: https://git.openjdk.java.net/jdk/pull/8407/files/50001b33..05bd9a42 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8407&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8407&range=00-01 Stats: 32 lines in 2 files changed: 20 ins; 3 del; 9 mod Patch: https://git.openjdk.java.net/jdk/pull/8407.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8407/head:pull/8407 PR: https://git.openjdk.java.net/jdk/pull/8407 From duke at openjdk.java.net Wed Apr 27 18:52:46 2022 From: duke at openjdk.java.net (DamonGuy) Date: Wed, 27 Apr 2022 18:52:46 GMT Subject: RFR: JDK-8282772: JButton text set as HTML content has unwanted padding [v2] In-Reply-To: References: Message-ID: On Tue, 26 Apr 2022 20:15:20 GMT, Phil Race wrote: >> DamonGuy has updated the pull request incrementally with one additional commit since the last revision: >> >> Changed approach to fix. > > src/java.desktop/share/classes/javax/swing/plaf/nimbus/skin.laf line 271: > >> (failed to retrieve contents of file, check the PR for context) >> I also tested for non-HTML text after the changes, and the changes do not affect normal text. > > And this is true for this Nimbus case too ? Whereas your code update in BasicButtonUI is checking for HTML, I don't see how it could *not* change normal text in the Nimbus case. I thought the same thing. In the test, I forced the L&F to nimbus only and tested with the left and right insets set to 0 and 14. The text appears normally and identically for both cases (HTML text and non-HTML text). I also tried changing the size of the button from 37x37 to 100x100 and 200x200. The appearance was the same for all cases. However, I just tried using different text from the tests before and I do get cases where text gets snipped to "..." when the new insets wouldn't. So, you're right that normal text is affected. I just used text that wasn't long enough in testing. The reason I went this route for the fix was because in NimbusStyle, the insets are retrieved but the property key but the button component for BasicHTML is not set yet and returns null. So, I can't use this method to set the insets to 0 since the property key has not been set in the stack yet. I finally found the applicable class of where to make the edits yesterday. I just made the changes similar to the other L&Fs. ------------- PR: https://git.openjdk.java.net/jdk/pull/8407 From prr at openjdk.java.net Wed Apr 27 19:01:34 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 27 Apr 2022 19:01:34 GMT Subject: RFR: 8269806: Emoji rendering on Linux [v3] In-Reply-To: References: Message-ID: On Wed, 30 Mar 2022 17:08:37 GMT, Nikita Gubarkov wrote: >> It was implemented in JetBrains Runtime a year ago and was ported & refactored for this PR >> It includes: >> - Bitmap glyph loading via Freetype >> - Manual scaling & transformation of bitmap glyphs with nearest-neighbor or bilinear-mipmap style algorithms depending on the text antialiasing hint >> - Storing BGRA glyphs in glyph cache & rendering them as plain images, as currently used XRender text drawing functions doesn't support colored glyphs >> - Small fixes in related code like null-checks which could cause NPE & comment typos > > Nikita Gubarkov has updated the pull request incrementally with one additional commit since the last revision: > > 8269806: Fix emoji rendering with -Dsun.java2d.xrender=false and AA=OFF So any ideas ? You might also try what happens if you try a font size of 100 .. IIRC when it is > 80 then we switch to outlines, and here that might mean the glyphs suddenly vanish. And we do this because we don't want to cache massive glyphs. So you may need to special case that too - if you aren't already. ------------- PR: https://git.openjdk.java.net/jdk/pull/4798 From achung at openjdk.java.net Wed Apr 27 19:56:15 2022 From: achung at openjdk.java.net (Alisen Chung) Date: Wed, 27 Apr 2022 19:56:15 GMT Subject: RFR: 8284613: invalid use of @serial tag Message-ID: Removed serial tag in method documentation ------------- Commit messages: - removed serial tag in methods that were causing warnings Changes: https://git.openjdk.java.net/jdk/pull/8432/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8432&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284613 Stats: 12 lines in 12 files changed: 0 ins; 2 del; 10 mod Patch: https://git.openjdk.java.net/jdk/pull/8432.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8432/head:pull/8432 PR: https://git.openjdk.java.net/jdk/pull/8432 From prr at openjdk.java.net Wed Apr 27 20:04:46 2022 From: prr at openjdk.java.net (Phil Race) Date: Wed, 27 Apr 2022 20:04:46 GMT Subject: RFR: 8276266: Clean up incorrect client-libs ProblemList.txt entries [v2] In-Reply-To: References: <-gLIqdVcPOaZgxCVSkMNQ6FzygLGTk7O710l-Mwc4zc=.8b8a3124-9d44-4893-af45-89c22d49b589@github.com> Message-ID: <4-K_9Mwg1qdQrrMSTvG5VnTJrNKrKoZWRThb7K1JsEs=.9df69fce-3a88-4b67-ae25-a1fad92fd91f@github.com> On Tue, 2 Nov 2021 01:29:37 GMT, Phil Race wrote: >> We have a few stale entries in the Problem list. >> We need to remap some tests to still open bugs >> 7100044 -> 6849371 >> 8203047 -> 8072110 >> 8233703 -> 8238436 >> 8273618 -> 8273617 >> >> We need to remove these FIXED bugs >> java/awt/Choice/ChoiceKeyEventReaction/ChoiceKeyEventReaction.java 7185258 macosx-all >> >> java/awt/GridLayout/LayoutExtraGaps/LayoutExtraGaps.java 8000171 windows-all >> (actually closed as a dup of 8196100 which is fixed) >> >> And this RESOLVED / not reproducible. >> java/awt/SplashScreen/MultiResolutionSplash/MultiResolutionSplashTest.java 8061235 macosx-all >> >> I've verified that the removed ones do pass in the CI test system so we should be OK unless they are very intermittent or environment specific > > Phil Race has updated the pull request incrementally with one additional commit since the last revision: > > 8276266: Clean up incorrect client-libs ProblemList.txt entries @prsadhuk - still looking for a response from you. ------------- PR: https://git.openjdk.java.net/jdk/pull/6203 From duke at openjdk.java.net Wed Apr 27 21:05:33 2022 From: duke at openjdk.java.net (Dan Lutker) Date: Wed, 27 Apr 2022 21:05:33 GMT Subject: RFR: 7131823: Loading some animated GIFs fails with =?UTF-8?B?QXJyYXlJbmRleE91dE9mQm91bmRzReKApg==?= [v2] In-Reply-To: References: Message-ID: > ?xception: Index 4096 out of bounds for length 4096 > > Adapted from https://github.com/openjdk/jfx/commit/7b7050c46299c0e6771ae02fbb5ceaf22104d3e4 > > # Testing done > Build locally on linux and ran jdk_imageio tests. Dan Lutker 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: 7131823: Loading some animated GIFs fails with ArrayIndexOutOfBoundsException: Index 4096 out of bounds for length 4096 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8371/files - new: https://git.openjdk.java.net/jdk/pull/8371/files/de0d6875..dac34ed4 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8371&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8371&range=00-01 Stats: 11304 lines in 231 files changed: 8598 ins; 938 del; 1768 mod Patch: https://git.openjdk.java.net/jdk/pull/8371.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8371/head:pull/8371 PR: https://git.openjdk.java.net/jdk/pull/8371 From kizune at openjdk.java.net Wed Apr 27 21:50:46 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Wed, 27 Apr 2022 21:50:46 GMT Subject: RFR: 7131823: Loading some animated GIFs fails with =?UTF-8?B?QXJyYXlJbmRleE91dE9mQm91bmRzReKApg==?= [v2] In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 21:05:33 GMT, Dan Lutker wrote: >> ?xception: Index 4096 out of bounds for length 4096 >> >> Adapted from https://github.com/openjdk/jfx/commit/7b7050c46299c0e6771ae02fbb5ceaf22104d3e4 >> >> # Testing done >> Build locally on linux and ran jdk_imageio tests. > > Dan Lutker 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: > > 7131823: Loading some animated GIFs fails with ArrayIndexOutOfBoundsException: Index 4096 out of bounds for length 4096 Code looks good but PR needs to be updated so title matches the one from the JBS. ------------- Marked as reviewed by kizune (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8371 From duke at openjdk.java.net Wed Apr 27 21:53:46 2022 From: duke at openjdk.java.net (Dan Lutker) Date: Wed, 27 Apr 2022 21:53:46 GMT Subject: RFR: 7131823: Loading some animated GIFs fails with =?UTF-8?B?QXJyYXlJbmRleE91dE9mQm91bmRzReKApg==?= [v2] In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 21:47:07 GMT, Alexander Zuev wrote: > Code looks good but PR needs to be updated so title matches the one from the JBS. I was thinking about changing the title of the bug since "bug in GIFImageReader" isn't very descriptive. ------------- PR: https://git.openjdk.java.net/jdk/pull/8371 From duke at openjdk.java.net Wed Apr 27 22:10:43 2022 From: duke at openjdk.java.net (Dan Lutker) Date: Wed, 27 Apr 2022 22:10:43 GMT Subject: RFR: 7131823: bug in GIFImageReader [v3] In-Reply-To: References: Message-ID: > ?xception: Index 4096 out of bounds for length 4096 > > Adapted from https://github.com/openjdk/jfx/commit/7b7050c46299c0e6771ae02fbb5ceaf22104d3e4 > > # Testing done > Build locally on linux and ran jdk_imageio tests. Dan Lutker 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: 7131823: bug in GIFImageReader ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8371/files - new: https://git.openjdk.java.net/jdk/pull/8371/files/dac34ed4..beba00de Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8371&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8371&range=01-02 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8371.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8371/head:pull/8371 PR: https://git.openjdk.java.net/jdk/pull/8371 From lbourges at openjdk.java.net Wed Apr 27 22:17:52 2022 From: lbourges at openjdk.java.net (Laurent =?UTF-8?B?Qm91cmfDqHM=?=) Date: Wed, 27 Apr 2022 22:17:52 GMT Subject: RFR: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box [v12] In-Reply-To: References: Message-ID: <3F9aRrvTaPbcUUfpsAjnzyE9X-fpfh2NBpB39VD-MPw=.fb439b94-720e-411b-8779-036f08a9af2f@github.com> 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. Congratulations! ------------- PR: https://git.openjdk.java.net/jdk/pull/6227 From dholmes at openjdk.java.net Wed Apr 27 22:25:42 2022 From: dholmes at openjdk.java.net (David Holmes) Date: Wed, 27 Apr 2022 22:25:42 GMT Subject: RFR: JDK-8285730: unify _WIN32_WINNT settings In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 14:57:41 GMT, Matthias Baesken wrote: > Currently we set _WIN32_WINNT at various places in the codebase; this is used to target a minimum Windows version we want to support. See also for more detailled information : > https://docs.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers?redirectedfrom=MSDN#setting-winver-or-_win32_winnt > Macros for Conditional Declarations > "Certain functions that depend on a particular version of Windows are declared using conditional code. This enables you to use the compiler to detect whether your application uses functions that are not supported on its target version(s) of Windows." > > However currently we have quite a lot of differing settings of _WIN32_WINNT in the codebase ; setting _WIN32_WINNT to 0x0601 (Windows 7) where possible would make sense because we have this setting already at java_props_md.c (so targeting older Windows versions at other places is most likely not useful). There is obviously a lot of history here and different parts of the codebase had hit different minimum OS version requirements at different times. While at one time we would have had to cater for building on systems with and without a given API those days are long gone for the code being touched here (AFAICS). As Erik states we should be able to set a minimum _WIN32_WINNT_ value needed to build all the codebase and simply have that checked and set at configure time. The code itself would not need to define _WIN32_WINNT. ------------- PR: https://git.openjdk.java.net/jdk/pull/8428 From duke at openjdk.java.net Wed Apr 27 22:45:28 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Wed, 27 Apr 2022 22:45:28 GMT Subject: RFR: 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java [v2] In-Reply-To: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> References: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> Message-ID: > 1) Fixed Parser error by removing yesno from @run main/manual=yesno > 2) Used PassFaileJFrame to show the test instruction to the user instead of printing the test instruction on the console or jtreg log file. > 3) If printer is not configured then mark the test as passed. > > @shurymury > @aivanov-jdk lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Added @key printer since this test needs printer ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8412/files - new: https://git.openjdk.java.net/jdk/pull/8412/files/8ec07eb3..c178312a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8412&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8412&range=00-01 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8412.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8412/head:pull/8412 PR: https://git.openjdk.java.net/jdk/pull/8412 From darcy at openjdk.java.net Wed Apr 27 23:10:43 2022 From: darcy at openjdk.java.net (Joe Darcy) Date: Wed, 27 Apr 2022 23:10:43 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 01:39:27 GMT, Stuart Marks wrote: >> To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. >> >> To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. >> >> Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). >> >> I'll update copyright years before pushing. > > src/java.base/share/classes/java/util/AbstractMap.java line 601: > >> 599: * {@code Map.entrySet().toArray}. >> 600: * >> 601: * @param the type of keys maintained > > Please update to match java.util.Map, which says "the type of keys maintained by this map" I said "keys maintained", omitting "by this map" to finesse the question of if the SimpleEntry class *is* a map, or is used to implement a map, etc. I can change it to include "by this map" if the map/entry distinction is okay to be blurred. > src/java.base/share/classes/java/util/Dictionary.java line 44: > >> 42: * @param the type of keys >> 43: * @param the type of mapped values >> 44: * > > Urgh. This class is obsolete, but it was retrofitted to implement Map and was subsequently generified, so I'd update these to match java.util.Map. The javadoc of Dictionary states "The Dictionary class [...] maps keys to values." which was my guide for the wording, but I don't mind changing it. ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From darcy at openjdk.java.net Wed Apr 27 23:15:42 2022 From: darcy at openjdk.java.net (Joe Darcy) Date: Wed, 27 Apr 2022 23:15:42 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 10:54:00 GMT, Daniel Fuchs wrote: >> To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. >> >> To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. >> >> Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). >> >> I'll update copyright years before pushing. > > src/java.management/share/classes/javax/management/openmbean/ArrayType.java line 96: > >> 94: * >> 95: * @param the Java type that instances described by this type must >> 96: * have. > > Instead of "instances" - would it be more correct to say "array elements"? Will change to "the Java component type that arrays described by ArrayType must have" ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From darcy at openjdk.java.net Wed Apr 27 23:21:40 2022 From: darcy at openjdk.java.net (Joe Darcy) Date: Wed, 27 Apr 2022 23:21:40 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v2] In-Reply-To: References: Message-ID: > To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. > > To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. > > Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). > > I'll update copyright years before pushing. Joe Darcy 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: - Respond to review feedback. - Merge branch 'master' into JDK-8285676 - JDK-8285676: Add missing @param tags for type parameters on classes and interfaces ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8410/files - new: https://git.openjdk.java.net/jdk/pull/8410/files/fe47dd2f..e0ac5dcb Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8410&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8410&range=00-01 Stats: 5958 lines in 128 files changed: 4827 ins; 485 del; 646 mod Patch: https://git.openjdk.java.net/jdk/pull/8410.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8410/head:pull/8410 PR: https://git.openjdk.java.net/jdk/pull/8410 From darcy at openjdk.java.net Wed Apr 27 23:21:52 2022 From: darcy at openjdk.java.net (Joe Darcy) Date: Wed, 27 Apr 2022 23:21:52 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v2] In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 10:55:22 GMT, Daniel Fuchs wrote: >> Joe Darcy 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: >> >> - Respond to review feedback. >> - Merge branch 'master' into JDK-8285676 >> - JDK-8285676: Add missing @param tags for type parameters on classes and interfaces > > src/java.management/share/classes/javax/management/openmbean/SimpleType.java line 60: > >> (failed to retrieve contents of file, check the PR for context) > I would suggest to say "that values described by this type"... Will change to "the Java type that values described by this SimpleType must have." ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From smarks at openjdk.java.net Wed Apr 27 23:31:55 2022 From: smarks at openjdk.java.net (Stuart Marks) Date: Wed, 27 Apr 2022 23:31:55 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v2] In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 23:04:47 GMT, Joe Darcy wrote: >> src/java.base/share/classes/java/util/AbstractMap.java line 601: >> >>> 599: * {@code Map.entrySet().toArray}. >>> 600: * >>> 601: * @param the type of keys maintained >> >> Please update to match java.util.Map, which says "the type of keys maintained by this map" > > I said "keys maintained", omitting "by this map" to finesse the question of if the SimpleEntry class *is* a map, or is used to implement a map, etc. I can change it to include "by this map" if the map/entry distinction is okay to be blurred. Whoops, sorry, this is `SimpleEntry`, which is _not_ a `Map`. In this case I'd follow `Map.Entry` which says "the type of the key" and "the type of the map". >> src/java.base/share/classes/java/util/Dictionary.java line 44: >> >>> 42: * @param the type of keys >>> 43: * @param the type of mapped values >>> 44: * >> >> Urgh. This class is obsolete, but it was retrofitted to implement Map and was subsequently generified, so I'd update these to match java.util.Map. > > The javadoc of Dictionary states "The Dictionary class [...] maps keys to values." which was my guide for the wording, but I don't mind changing it. My bad, `Dictionary` was not retrofitted to implement `Map` but it gained `K` and `V` type parameters to align with `Map`. No need to change this; it doesn't really matter. ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From darcy at openjdk.java.net Thu Apr 28 01:34:19 2022 From: darcy at openjdk.java.net (Joe Darcy) Date: Thu, 28 Apr 2022 01:34:19 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v3] In-Reply-To: References: Message-ID: > To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. > > To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. > > Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). > > I'll update copyright years before pushing. Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: Respond to more review feedback. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8410/files - new: https://git.openjdk.java.net/jdk/pull/8410/files/e0ac5dcb..db4919a9 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8410&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8410&range=01-02 Stats: 4 lines in 1 file changed: 0 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/8410.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8410/head:pull/8410 PR: https://git.openjdk.java.net/jdk/pull/8410 From prr at openjdk.java.net Thu Apr 28 01:34:19 2022 From: prr at openjdk.java.net (Phil Race) Date: Thu, 28 Apr 2022 01:34:19 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v3] In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 01:31:13 GMT, Joe Darcy wrote: >> To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. >> >> To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. >> >> Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). >> >> I'll update copyright years before pushing. > > Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: > > Respond to more review feedback. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From darcy at openjdk.java.net Thu Apr 28 01:34:19 2022 From: darcy at openjdk.java.net (Joe Darcy) Date: Thu, 28 Apr 2022 01:34:19 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v3] In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 23:24:57 GMT, Stuart Marks wrote: >> I said "keys maintained", omitting "by this map" to finesse the question of if the SimpleEntry class *is* a map, or is used to implement a map, etc. I can change it to include "by this map" if the map/entry distinction is okay to be blurred. > > Whoops, sorry, this is `SimpleEntry`, which is _not_ a `Map`. In this case I'd follow `Map.Entry` which says "the type of the key" and "the type of the map". Will change to the Map.Entry wording "the type of key" and "the type of the value", respectively. ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From psadhukhan at openjdk.java.net Thu Apr 28 03:47:37 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 28 Apr 2022 03:47:37 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 don't know. This was done by @prsadhuk - Prasanta can you explain that ? I am not sure on this now...Seems like it might have been a mistake seeing it now..probably I was trying to close as dup with some other JBS but inadvertently mentioned the wrong one.. ------------- PR: https://git.openjdk.java.net/jdk/pull/6203 From mbaesken at openjdk.java.net Thu Apr 28 07:16:38 2022 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Thu, 28 Apr 2022 07:16:38 GMT Subject: RFR: JDK-8285730: unify _WIN32_WINNT settings In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 15:10:51 GMT, Alan Bateman wrote: >> Currently we set _WIN32_WINNT at various places in the codebase; this is used to target a minimum Windows version we want to support. See also for more detailled information : >> https://docs.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers?redirectedfrom=MSDN#setting-winver-or-_win32_winnt >> Macros for Conditional Declarations >> "Certain functions that depend on a particular version of Windows are declared using conditional code. This enables you to use the compiler to detect whether your application uses functions that are not supported on its target version(s) of Windows." >> >> However currently we have quite a lot of differing settings of _WIN32_WINNT in the codebase ; setting _WIN32_WINNT to 0x0601 (Windows 7) where possible would make sense because we have this setting already at java_props_md.c (so targeting older Windows versions at other places is most likely not useful). > > src/java.base/windows/native/libnio/ch/wepoll.c line 159: > >> 157: >> 158: #undef _WIN32_WINNT >> 159: #define _WIN32_WINNT 0x0601 > > This is 3rd party code and would prefer not change it if possible. Hi Alan, I agree (thats why I did not change the define in harfbuzz, but I missed that wepoll.c is 3rd party code as well). ------------- PR: https://git.openjdk.java.net/jdk/pull/8428 From mbaesken at openjdk.java.net Thu Apr 28 07:19:42 2022 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Thu, 28 Apr 2022 07:19:42 GMT Subject: RFR: JDK-8285730: unify _WIN32_WINNT settings In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 14:57:41 GMT, Matthias Baesken wrote: > Currently we set _WIN32_WINNT at various places in the codebase; this is used to target a minimum Windows version we want to support. See also for more detailled information : > https://docs.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers?redirectedfrom=MSDN#setting-winver-or-_win32_winnt > Macros for Conditional Declarations > "Certain functions that depend on a particular version of Windows are declared using conditional code. This enables you to use the compiler to detect whether your application uses functions that are not supported on its target version(s) of Windows." > > However currently we have quite a lot of differing settings of _WIN32_WINNT in the codebase ; setting _WIN32_WINNT to 0x0601 (Windows 7) where possible would make sense because we have this setting already at java_props_md.c (so targeting older Windows versions at other places is most likely not useful). Hi Erik/David/Phil, we already have a good central place where we set the definition of WIN32_LEAN_AND_MEAN autoconf/flags-cflags.m4:460: ALWAYS_DEFINES_JDK="-DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE \ autoconf/flags-cflags.m4:462: ALWAYS_DEFINES_JVM="-DNOMINMAX -DWIN32_LEAN_AND_MEAN" should we add there the _WIN32_WINNT=0x0601 define (and remove the differing defines instead at the other places) ? (defines of _WIN32_WINNT in 3rd party code would stay like wepoll.c and harfbuzz). ------------- PR: https://git.openjdk.java.net/jdk/pull/8428 From dfuchs at openjdk.java.net Thu Apr 28 08:03:43 2022 From: dfuchs at openjdk.java.net (Daniel Fuchs) Date: Thu, 28 Apr 2022 08:03:43 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v3] In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 01:34:19 GMT, Joe Darcy wrote: >> To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. >> >> To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. >> >> Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). >> >> I'll update copyright years before pushing. > > Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: > > Respond to more review feedback. Thanks for the updates Joe. Your new wording looks good to me. ------------- Marked as reviewed by dfuchs (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8410 From alanb at openjdk.java.net Thu Apr 28 08:14:25 2022 From: alanb at openjdk.java.net (Alan Bateman) Date: Thu, 28 Apr 2022 08:14:25 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v3] In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 01:34:19 GMT, Joe Darcy wrote: >> To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. >> >> To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. >> >> Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). >> >> I'll update copyright years before pushing. > > Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: > > Respond to more review feedback. src/java.base/share/classes/java/nio/file/SecureDirectoryStream.java line 55: > 53: * against the original path of the directory (irrespective of if the > 54: * directory is moved since it was opened). > 55: * @param the type of path It may not be a path. The type parameter is specified in the super interfaces, can you copy that down instead? src/java.base/share/classes/java/nio/file/WatchEvent.java line 51: > 49: /** > 50: * An event kind, for the purposes of identification. > 51: * @param the type of the context value This is okay but the it differs slightly to the type parameters specified further up. I think the issue here is that it was just wasn't copied down to WatchEvent.Kind. ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From duke at openjdk.java.net Thu Apr 28 09:19:19 2022 From: duke at openjdk.java.net (DamonGuy) Date: Thu, 28 Apr 2022 09:19:19 GMT Subject: RFR: 8254759: [TEST_BUG] [macosx] javax/swing/JInternalFrame/4202966/IntFrameCoord.html fails Message-ID: Closed repo test fix from the test sprint. This test was approved in the closed repo and has been converted to an open repo test. This test checks if the coordinates are still correct after changing focuses between different JInternalFrames. The test is now automated instead of manual like the previous, closed version. This needs to be a headful test to allow robot to click on the different frames and to check coordinates. The issue was that in MacOS, the button wouldn't appear at a normal size. To fix this, the bounds have been increased to allow the button to be fully visible with the designated frame sizes on all L&Fs. ------------- Commit messages: - Moved test from closed repo to open repo. Changes: https://git.openjdk.java.net/jdk/pull/8444/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8444&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8254759 Stats: 145 lines in 1 file changed: 145 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8444.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8444/head:pull/8444 PR: https://git.openjdk.java.net/jdk/pull/8444 From psadhukhan at openjdk.java.net Thu Apr 28 12:06:08 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 28 Apr 2022 12:06:08 GMT Subject: RFR: 8213531: Test javax/swing/border/TestTitledBorderLeak.java fails Message-ID: Test was failing in linux citing `java.lang.RuntimeException: Expected Total TitledBorder to be freed : 10 Freed 9 ` As per the fix done in JDK-8204963 http://hg.openjdk.java.net/jdk/jdk/rev/cd7d2f9154fd there was no platform specific code done for the fix and logs in `TitledBorder.installPropertyChangeListeners` shows it was called 10 times for the test but `CleanerFactory.cleaner().register` action was only called 9 times in linux causing it to fail. Modified the test to not show the frame which cause the problem to go away and also it can still be used as 8204963 regression test as it still fails without the fix and pass with it. Modified test has passed in all platforms for several iterations. Also removed the deprecated `System.runFinalization` ------------- Commit messages: - 8213531: Test javax/swing/border/TestTitledBorderLeak.java fails Changes: https://git.openjdk.java.net/jdk/pull/8450/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8450&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8213531 Stats: 8 lines in 2 files changed: 0 ins; 5 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/8450.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8450/head:pull/8450 PR: https://git.openjdk.java.net/jdk/pull/8450 From erikj at openjdk.java.net Thu Apr 28 12:36:42 2022 From: erikj at openjdk.java.net (Erik Joelsson) Date: Thu, 28 Apr 2022 12:36:42 GMT Subject: RFR: JDK-8285730: unify _WIN32_WINNT settings In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 07:16:30 GMT, Matthias Baesken wrote: > Hi Erik/David/Phil, we already have a good central place where we set the definition of WIN32_LEAN_AND_MEAN > > autoconf/flags-cflags.m4:460: ALWAYS_DEFINES_JDK="-DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE autoconf/flags-cflags.m4:462: ALWAYS_DEFINES_JVM="-DNOMINMAX -DWIN32_LEAN_AND_MEAN" > > should we add there the _WIN32_WINNT=0x0601 define (and remove the differing defines instead at the other places) ? (defines of _WIN32_WINNT in 3rd party code would stay like wepoll.c and harfbuzz). Seems reasonable to me at least. ------------- PR: https://git.openjdk.java.net/jdk/pull/8428 From shade at openjdk.java.net Thu Apr 28 13:10:41 2022 From: shade at openjdk.java.net (Aleksey Shipilev) Date: Thu, 28 Apr 2022 13:10:41 GMT Subject: RFR: 8284956: Potential leak awtImageData/color_data when initializes X11GraphicsEnvironment In-Reply-To: <3POzEJ3BfvLSZncFAN7pluxsSz9_UB_wyeCMV53X-CQ=.e24bef4e-3638-4338-bd3e-3d341e21428a@github.com> References: <3POzEJ3BfvLSZncFAN7pluxsSz9_UB_wyeCMV53X-CQ=.e24bef4e-3638-4338-bd3e-3d341e21428a@github.com> Message-ID: On Wed, 20 Apr 2022 13:48:19 GMT, Zhengyu Gu wrote: > During initializing native data of `X11GraphicsEnvironment`, a single `AwtGraphicsConfigData` is used/reused, not only failed cases, but also succeeded cases. So `AwtGraphicsConfigData` internal states need to be cleanup properly to avoid memory leaks. > > Test: > - [x] jdk_awt What about `_ColorData::img_grays`, `_ColorData::awt_Colors`, `_ColorData::img_oda_*`? ------------- PR: https://git.openjdk.java.net/jdk/pull/8317 From andrew at openjdk.java.net Thu Apr 28 13:17:38 2022 From: andrew at openjdk.java.net (Andrew John Hughes) Date: Thu, 28 Apr 2022 13:17:38 GMT Subject: RFR: 8284956: Potential leak awtImageData/color_data when initializes X11GraphicsEnvironment In-Reply-To: <3POzEJ3BfvLSZncFAN7pluxsSz9_UB_wyeCMV53X-CQ=.e24bef4e-3638-4338-bd3e-3d341e21428a@github.com> References: <3POzEJ3BfvLSZncFAN7pluxsSz9_UB_wyeCMV53X-CQ=.e24bef4e-3638-4338-bd3e-3d341e21428a@github.com> Message-ID: On Wed, 20 Apr 2022 13:48:19 GMT, Zhengyu Gu wrote: > During initializing native data of `X11GraphicsEnvironment`, a single `AwtGraphicsConfigData` is used/reused, not only failed cases, but also succeeded cases. So `AwtGraphicsConfigData` internal states need to be cleanup properly to avoid memory leaks. > > Test: > - [x] jdk_awt I see `calloc` calls also for `img_grays` and `awt_Colors`. Is there a reason these aren't freed too? ------------- PR: https://git.openjdk.java.net/jdk/pull/8317 From psadhukhan at openjdk.java.net Thu Apr 28 13:34:31 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 28 Apr 2022 13:34:31 GMT Subject: RFR: 8213531: Test javax/swing/border/TestTitledBorderLeak.java fails [v2] In-Reply-To: References: Message-ID: <7f6imhO_fmNXVejmC3boQyV0uNjoHOJCiVzetcCOHpY=.b2d95eab-e3f7-45db-83ad-92e91e3a5585@github.com> > Test was failing in linux citing `java.lang.RuntimeException: Expected Total TitledBorder to be freed : 10 Freed 9 ` > As per the fix done in JDK-8204963 http://hg.openjdk.java.net/jdk/jdk/rev/cd7d2f9154fd > there was no platform specific code done for the fix and logs in `TitledBorder.installPropertyChangeListeners` shows it was called 10 times for the test but `CleanerFactory.cleaner().register` action was only called 9 times in linux causing it to fail. > > Modified the test to not show the frame which cause the problem to go away and also it can still be used as 8204963 regression test as it still fails without the fix and pass with it. Modified test has passed in all platforms for several iterations. > > Also removed the deprecated `System.runFinalization` Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: Test fix ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8450/files - new: https://git.openjdk.java.net/jdk/pull/8450/files/ea2c3e11..8bf50cca Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8450&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8450&range=00-01 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8450.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8450/head:pull/8450 PR: https://git.openjdk.java.net/jdk/pull/8450 From andrew at openjdk.java.net Thu Apr 28 14:23:49 2022 From: andrew at openjdk.java.net (Andrew John Hughes) Date: Thu, 28 Apr 2022 14:23:49 GMT Subject: RFR: 8284680: sun.font.FontConfigManager.getFontConfig() leaks charset In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 18:05:09 GMT, Zhengyu Gu wrote: > Please review this small patch that releases temporary charsets to avoid memory leak. > > Test: > > - [x] jdk_2d Ok, let me see if I follow this correctly. The main logic to call `FcCharSetDestroy` is within two loops. The outermost loop declares `unionCharset`. The inner loop declares `charset`. On each of the iterations of the inner loop, `charset` is newly defined and obtains a character set via `FcPatternGetString`. This character set is not a copy and doesn't need to be freed. I thus assume the need to free comes from the return value of `FcCharSetUnion`. On each iteration of the inner loop, this is used to add more characters to the character set pointed to by `unionCharset`. On iteration 0, `unionCharset` is NULL so it is assigned `charset`, which is the character set for `fontset->fonts[0]`. On iteration 1, `unionCharset` is now the charset for `fontset->fonts[0]`. `charset` will be redefined and set to the character set for `fontset->fonts[1]`. I see a problem on this iteration. `currentUnionSet` will be set to the character set for `fontset->fonts[0]` and `unionCharset` will then be allocated a new character set consisting of the union of the characters in the sets for `fontset->fonts[0]` (in `currentUnionSet`) and `fontset->fonts[1]` (in `charset`). How will `currentUnionSet` ever be equal to `charset` in this case? Unless I'm missing something, the second iteration is going to wrongly attempt to free the character set allocated in the first iteration. For subsequent iterations, the free is fine, because it is indeed releasing the previous union. A possible solution would be to introduce another variable e.g. `previousUnion` which is only set after the first union is created. The problem with using unionCharset is it is set to `charset` on the first iteration. So something like: unionCharset = (* FcCharSetUnion)(unionCharset, charset); if (previousUnion != NULL) { (*FcCharSetDestroy)(previousUnion); } previousUnion = unionCharset; ------------- PR: https://git.openjdk.java.net/jdk/pull/8187 From zgu at openjdk.java.net Thu Apr 28 14:58:28 2022 From: zgu at openjdk.java.net (Zhengyu Gu) Date: Thu, 28 Apr 2022 14:58:28 GMT Subject: RFR: 8284956: Potential leak awtImageData/color_data when initializes X11GraphicsEnvironment [v2] In-Reply-To: <3POzEJ3BfvLSZncFAN7pluxsSz9_UB_wyeCMV53X-CQ=.e24bef4e-3638-4338-bd3e-3d341e21428a@github.com> References: <3POzEJ3BfvLSZncFAN7pluxsSz9_UB_wyeCMV53X-CQ=.e24bef4e-3638-4338-bd3e-3d341e21428a@github.com> Message-ID: > During initializing native data of `X11GraphicsEnvironment`, a single `AwtGraphicsConfigData` is used/reused, not only failed cases, but also succeeded cases. So `AwtGraphicsConfigData` internal states need to be cleanup properly to avoid memory leaks. > > Test: > - [x] jdk_awt Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision: Aleksey and Andrew's comments ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8317/files - new: https://git.openjdk.java.net/jdk/pull/8317/files/e6838cf0..64a74f3e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8317&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8317&range=00-01 Stats: 6 lines in 1 file changed: 6 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8317.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8317/head:pull/8317 PR: https://git.openjdk.java.net/jdk/pull/8317 From duke at openjdk.java.net Thu Apr 28 15:26:10 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Thu, 28 Apr 2022 15:26:10 GMT Subject: RFR: JDK-8255439: System Tray icons get corrupted when windows scaling changes Message-ID: In Windows when desktop scaling was changed the tray icons was distorted/blurred a bit each time scaling changes. With the proposed fix, the tray icon scales according to on-the-fly DPI scale settings. A test case has been added which adds a MRI icon to system tray, to observe the icon scaling when DPI is changed. Since the scale cannot be programmatically changed (for dynamic on-the-fly scale changes), I have used a manual test case to test this scenario. When DPI changes usually two messages are sent by windows - - [WM_DPICHANGED](https://docs.microsoft.com/en-us/windows/win32/hidpi/wm-dpichanged) - [WMPOSCHANGING](https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-windowposchanging) I'm triggering an update on tray icons on receiving WMPOSCHANGING msg through the Tray icon's Window Procedure. Triggering an update on WM_DPICHANGED was still causing the icons to be distorted, hence WMPOSCHANGING is being used as the message to trigger the update. ------------- Commit messages: - removed whitespaces error due to CRLF - removed whitespace error - added manual to test case - trayicon changes Changes: https://git.openjdk.java.net/jdk/pull/8441/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8441&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8255439 Stats: 177 lines in 5 files changed: 172 ins; 1 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/8441.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8441/head:pull/8441 PR: https://git.openjdk.java.net/jdk/pull/8441 From psadhukhan at openjdk.java.net Thu Apr 28 16:23:44 2022 From: psadhukhan at openjdk.java.net (Prasanta Sadhukhan) Date: Thu, 28 Apr 2022 16:23:44 GMT Subject: RFR: 8285094: Test java/awt/Frame/InvisibleOwner/InvisibleOwner.java failing on Linux [v2] In-Reply-To: <1FY4ypDIGUN3Hkz3R8hN6zyJonmrErTzUlU50bijZtw=.7ea435d2-6268-4454-9c58-e98fca7c8c20@github.com> References: <1FY4ypDIGUN3Hkz3R8hN6zyJonmrErTzUlU50bijZtw=.7ea435d2-6268-4454-9c58-e98fca7c8c20@github.com> Message-ID: <1Z-oRLSABy8uXBUc3CXHj8Cbk8RRw5n6dzmdxTEVdjU=.0095b70a-b669-4119-8315-f917ed7b829e@github.com> On Thu, 21 Apr 2022 15:23:31 GMT, Phil Race wrote: >> As discussed in https://bugs.openjdk.java.net/browse/JDK-8285094 it seems that the test >> java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java destabilises the Xserver. >> This causes java/awt/Frame/InvisibleOwner/InvisibleOwner.java to fail and even before that >> other tests which do pass are not visibly behaving as expected. >> >> I didn't find any Xserver logs of "bad stuff" happening so it just seems like the Xserver was >> having trouble keeping up and JDK was behaving correctly as it could despite the Xserver sending >> lots of requests to repaint. >> >> Just the "sleep" at the end of GetGraphicsStressTest.java seems to be enough but I'd already >> reworked InvisibleOwner.java and I'd like to think it is a bit better than before. > > Phil Race has updated the pull request incrementally with one additional commit since the last revision: > > 8285094 Marked as reviewed by psadhukhan (Reviewer). test/jdk/java/awt/Frame/InvisibleOwner/InvisibleOwner.java line 159: > 157: robot.mouseMove(C_X, C_Y); > 158: robot.mousePress(InputEvent.BUTTON1_MASK); > 159: robot.mouseRelease(InputEvent.BUTTON1_MASK); In other places,we have modified to use BUTTON1_DOWN_MASK, maybe we can do here too. ------------- PR: https://git.openjdk.java.net/jdk/pull/8312 From duke at openjdk.java.net Thu Apr 28 16:36:39 2022 From: duke at openjdk.java.net (XenoAmess) Date: Thu, 28 Apr 2022 16:36:39 GMT Subject: RFR: 8285149: Using HashMap.newHashMap to replace new HashMap(int) [v4] In-Reply-To: References: Message-ID: <4K3rhX2RGM_yaCKKJALcP7EplXS2pJXM8zYGNGEg-6Y=.c03f7730-b26a-459a-8d60-ea8ab9149603@github.com> On Wed, 27 Apr 2022 05:11:54 GMT, XenoAmess wrote: > Also do not change J2DBench. We deliberately avoid using new API so that we can take it and run it on very old JDK versions to help track regressions. For J2DBench, I don't see any changes that not complicated with older jdk version for now. please recheck. thanks. ------------- PR: https://git.openjdk.java.net/jdk/pull/8301 From darcy at openjdk.java.net Thu Apr 28 16:47:38 2022 From: darcy at openjdk.java.net (Joe Darcy) Date: Thu, 28 Apr 2022 16:47:38 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v3] In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 08:08:37 GMT, Alan Bateman wrote: >> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: >> >> Respond to more review feedback. > > src/java.base/share/classes/java/nio/file/SecureDirectoryStream.java line 55: > >> 53: * against the original path of the directory (irrespective of if the >> 54: * directory is moved since it was opened). >> 55: * @param the type of path > > It may not be a path. The type parameter is specified in the super interfaces, can you copy that down instead? Will change in the next push. ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From duke at openjdk.java.net Thu Apr 28 16:56:38 2022 From: duke at openjdk.java.net (XenoAmess) Date: Thu, 28 Apr 2022 16:56:38 GMT Subject: RFR: 8285149: Using HashMap.newHashMap to replace new HashMap(int) [v5] In-Reply-To: References: Message-ID: > These are the changes that too many to be reviewed in 8186958, thus split some of them out. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: revert changes to java.desktop as prrace said ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8301/files - new: https://git.openjdk.java.net/jdk/pull/8301/files/684d1528..c9cfb50a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8301&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8301&range=03-04 Stats: 56 lines in 30 files changed: 8 ins; 0 del; 48 mod Patch: https://git.openjdk.java.net/jdk/pull/8301.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8301/head:pull/8301 PR: https://git.openjdk.java.net/jdk/pull/8301 From darcy at openjdk.java.net Thu Apr 28 16:58:40 2022 From: darcy at openjdk.java.net (Joe Darcy) Date: Thu, 28 Apr 2022 16:58:40 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v4] In-Reply-To: References: Message-ID: > To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. > > To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. > > Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). > > I'll update copyright years before pushing. Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: Respond to more review feedback. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8410/files - new: https://git.openjdk.java.net/jdk/pull/8410/files/db4919a9..aaa8f828 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8410&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8410&range=02-03 Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8410.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8410/head:pull/8410 PR: https://git.openjdk.java.net/jdk/pull/8410 From darcy at openjdk.java.net Thu Apr 28 16:58:40 2022 From: darcy at openjdk.java.net (Joe Darcy) Date: Thu, 28 Apr 2022 16:58:40 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v3] In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 08:10:38 GMT, Alan Bateman wrote: >> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: >> >> Respond to more review feedback. > > src/java.base/share/classes/java/nio/file/WatchEvent.java line 51: > >> 49: /** >> 50: * An event kind, for the purposes of identification. >> 51: * @param the type of the context value > > This is okay but the it differs slightly to the type parameters specified further up. I think the issue here is that it was just wasn't copied down to WatchEvent.Kind. Okay -- I'll for the T type parameter of the Kind interface I'll reuse the wording of the T type parameter of the enclosing WatchEvent interface. (The type variable on Kind could be renamed to show that the two type parameters are distinct.) ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From alanb at openjdk.java.net Thu Apr 28 17:30:50 2022 From: alanb at openjdk.java.net (Alan Bateman) Date: Thu, 28 Apr 2022 17:30:50 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v4] In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 16:58:40 GMT, Joe Darcy wrote: >> To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. >> >> To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. >> >> Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). >> >> I'll update copyright years before pushing. > > Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: > > Respond to more review feedback. Marked as reviewed by alanb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From weijun at openjdk.java.net Thu Apr 28 17:43:43 2022 From: weijun at openjdk.java.net (Weijun Wang) Date: Thu, 28 Apr 2022 17:43:43 GMT Subject: RFR: 8285149: Using HashMap.newHashMap to replace new HashMap(int) [v5] In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 16:56:38 GMT, XenoAmess wrote: >> These are the changes that too many to be reviewed in 8186958, thus split some of them out. > > XenoAmess has updated the pull request incrementally with one additional commit since the last revision: > > revert changes to java.desktop as prrace said src/java.base/share/classes/sun/security/rsa/SunRsaSignEntries.java line 58: > 56: // start populating content using the specified provider > 57: // common attribute map > 58: HashMap attrs = HashMap.newHashMap(3); Looks like 1 is enough. ------------- PR: https://git.openjdk.java.net/jdk/pull/8301 From mchung at openjdk.java.net Thu Apr 28 17:49:48 2022 From: mchung at openjdk.java.net (Mandy Chung) Date: Thu, 28 Apr 2022 17:49:48 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v4] In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 16:58:40 GMT, Joe Darcy wrote: >> To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. >> >> To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. >> >> Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). >> >> I'll update copyright years before pushing. > > Joe Darcy has updated the pull request incrementally with one additional commit since the last revision: > > Respond to more review feedback. Marked as reviewed by mchung (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From darcy at openjdk.java.net Thu Apr 28 18:05:39 2022 From: darcy at openjdk.java.net (Joe Darcy) Date: Thu, 28 Apr 2022 18:05:39 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v5] In-Reply-To: References: Message-ID: <6vk2LFoiOweHKGiEQxkUjpj9opax4Tj2W0twvjt_BKY=.12784626-14d8-4f2a-9df7-7b7c2c843e6b@github.com> > To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. > > To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. > > Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). > > I'll update copyright years before pushing. Joe Darcy 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: - Update copyright years. - Merge branch 'master' into JDK-8285676 - Respond to more review feedback. - Respond to more review feedback. - Respond to review feedback. - Merge branch 'master' into JDK-8285676 - JDK-8285676: Add missing @param tags for type parameters on classes and interfaces ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8410/files - new: https://git.openjdk.java.net/jdk/pull/8410/files/aaa8f828..cb1fe1c2 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8410&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8410&range=03-04 Stats: 687 lines in 59 files changed: 610 ins; 8 del; 69 mod Patch: https://git.openjdk.java.net/jdk/pull/8410.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8410/head:pull/8410 PR: https://git.openjdk.java.net/jdk/pull/8410 From darcy at openjdk.java.net Thu Apr 28 18:05:40 2022 From: darcy at openjdk.java.net (Joe Darcy) Date: Thu, 28 Apr 2022 18:05:40 GMT Subject: Integrated: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces In-Reply-To: References: Message-ID: On Tue, 26 Apr 2022 22:24:26 GMT, Joe Darcy wrote: > To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. > > To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. > > Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). > > I'll update copyright years before pushing. This pull request has now been integrated. Changeset: bba456a8 Author: Joe Darcy URL: https://git.openjdk.java.net/jdk/commit/bba456a8dbf9027e4b015567c17a79fc7441aa08 Stats: 102 lines in 40 files changed: 76 ins; 0 del; 26 mod 8285676: Add missing @param tags for type parameters on classes and interfaces Reviewed-by: wetmore, smarks, dfuchs, prr, alanb, mchung ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From duke at openjdk.java.net Thu Apr 28 18:07:36 2022 From: duke at openjdk.java.net (XenoAmess) Date: Thu, 28 Apr 2022 18:07:36 GMT Subject: RFR: 8285149: Using HashMap.newHashMap to replace new HashMap(int) [v6] In-Reply-To: References: Message-ID: > These are the changes that too many to be reviewed in 8186958, thus split some of them out. XenoAmess has updated the pull request incrementally with one additional commit since the last revision: change from 3 to 1 according to wangweij ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8301/files - new: https://git.openjdk.java.net/jdk/pull/8301/files/c9cfb50a..1b4bac0f Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8301&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8301&range=04-05 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8301.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8301/head:pull/8301 PR: https://git.openjdk.java.net/jdk/pull/8301 From duke at openjdk.java.net Thu Apr 28 18:07:37 2022 From: duke at openjdk.java.net (XenoAmess) Date: Thu, 28 Apr 2022 18:07:37 GMT Subject: RFR: 8285149: Using HashMap.newHashMap to replace new HashMap(int) [v5] In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 17:36:41 GMT, Weijun Wang wrote: > Looks like 1 is enough. @wangweij done. ------------- PR: https://git.openjdk.java.net/jdk/pull/8301 From zgu at openjdk.java.net Thu Apr 28 18:25:59 2022 From: zgu at openjdk.java.net (Zhengyu Gu) Date: Thu, 28 Apr 2022 18:25:59 GMT Subject: RFR: 8284956: Potential leak awtImageData/color_data when initializes X11GraphicsEnvironment [v2] In-Reply-To: References: <3POzEJ3BfvLSZncFAN7pluxsSz9_UB_wyeCMV53X-CQ=.e24bef4e-3638-4338-bd3e-3d341e21428a@github.com> Message-ID: On Thu, 28 Apr 2022 13:14:07 GMT, Andrew John Hughes wrote: >> Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision: >> >> Aleksey and Andrew's comments > > I see `calloc` calls also for `img_grays` and `awt_Colors`. Is there a reason these aren't freed too? @gnu-andrew @shipilev Nice catch, fixed. Thanks ------------- PR: https://git.openjdk.java.net/jdk/pull/8317 From aturbanov at openjdk.java.net Thu Apr 28 18:27:59 2022 From: aturbanov at openjdk.java.net (Andrey Turbanov) Date: Thu, 28 Apr 2022 18:27:59 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v5] In-Reply-To: <6vk2LFoiOweHKGiEQxkUjpj9opax4Tj2W0twvjt_BKY=.12784626-14d8-4f2a-9df7-7b7c2c843e6b@github.com> References: <6vk2LFoiOweHKGiEQxkUjpj9opax4Tj2W0twvjt_BKY=.12784626-14d8-4f2a-9df7-7b7c2c843e6b@github.com> Message-ID: On Thu, 28 Apr 2022 18:05:39 GMT, Joe Darcy wrote: >> To enable more complete doclint checking (courtesy @jonathan-gibbons), please review this PR to add type-level @param tags where they are missing. >> >> To the maintainers of java.util.concurrent, those changes could be separated out in another bug if that would ease maintenance of that code. >> >> Making these library fixes is a blocker for correcting and expanding the doclint checks (JDK-8285496). >> >> I'll update copyright years before pushing. > > Joe Darcy 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: > > - Update copyright years. > - Merge branch 'master' into JDK-8285676 > - Respond to more review feedback. > - Respond to more review feedback. > - Respond to review feedback. > - Merge branch 'master' into JDK-8285676 > - JDK-8285676: Add missing @param tags for type parameters on classes and interfaces src/java.base/share/classes/java/lang/ref/PhantomReference.java line 48: > 46: * The {@link #refersTo(Object) refersTo} method can be used to test > 47: * whether some object is the referent of a phantom reference. > 48: * @param the type of the referent Shouldn't there be a space after `@param` ? ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From zgu at openjdk.java.net Thu Apr 28 18:31:49 2022 From: zgu at openjdk.java.net (Zhengyu Gu) Date: Thu, 28 Apr 2022 18:31:49 GMT Subject: RFR: 8284956: Potential leak awtImageData/color_data when initializes X11GraphicsEnvironment [v2] In-Reply-To: References: <3POzEJ3BfvLSZncFAN7pluxsSz9_UB_wyeCMV53X-CQ=.e24bef4e-3638-4338-bd3e-3d341e21428a@github.com> Message-ID: On Thu, 28 Apr 2022 13:07:22 GMT, Aleksey Shipilev wrote: > What about `_ColorData::img_grays`, `_ColorData::awt_Colors`, `_ColorData::img_oda_*`? `_ColorData::img_oda_*` are not malloc'd awt_data->color_data->img_oda_red = &(std_img_oda_red[0][0]); awt_data->color_data->img_oda_green = &(std_img_oda_green[0][0]); awt_data->color_data->img_oda_blue = &(std_img_oda_blue[0][0]); and `std_img_oda_*` are defined as JNIEXPORT extern sgn_ordered_dither_array std_img_oda_red; JNIEXPORT extern sgn_ordered_dither_array std_img_oda_green; JNIEXPORT extern sgn_ordered_dither_array std_img_oda_blue; ------------- PR: https://git.openjdk.java.net/jdk/pull/8317 From mchung at openjdk.java.net Thu Apr 28 19:08:52 2022 From: mchung at openjdk.java.net (Mandy Chung) Date: Thu, 28 Apr 2022 19:08:52 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v5] In-Reply-To: References: <6vk2LFoiOweHKGiEQxkUjpj9opax4Tj2W0twvjt_BKY=.12784626-14d8-4f2a-9df7-7b7c2c843e6b@github.com> Message-ID: <-4fsP7Oz2b5SHJR3uPUb7dPXo8cVPj0lXNnCDAKgWGA=.7ab1337e-2e75-4dc9-85d8-fb9734ea598c@github.com> On Thu, 28 Apr 2022 18:24:33 GMT, Andrey Turbanov wrote: >> Joe Darcy 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: >> >> - Update copyright years. >> - Merge branch 'master' into JDK-8285676 >> - Respond to more review feedback. >> - Respond to more review feedback. >> - Respond to review feedback. >> - Merge branch 'master' into JDK-8285676 >> - JDK-8285676: Add missing @param tags for type parameters on classes and interfaces > > src/java.base/share/classes/java/lang/ref/PhantomReference.java line 48: > >> 46: * The {@link #refersTo(Object) refersTo} method can be used to test >> 47: * whether some object is the referent of a phantom reference. >> 48: * @param the type of the referent > > Shouldn't there be a space after `@param` ? Good catch. Sorry I missed it. This occurs in all `java/lang/ref` files. ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From prr at openjdk.java.net Thu Apr 28 19:50:32 2022 From: prr at openjdk.java.net (Phil Race) Date: Thu, 28 Apr 2022 19:50:32 GMT Subject: RFR: 8285686: Upgrade to FreeType 2.12.0 Message-ID: This upgrades the JDK from using freetype 2.10.4 to 2.12.0 Automated tests pass, manual testing looks fine. --with-freetype=bundled was used to make sure it is OK on Linux builds. ------------- Commit messages: - 8285686 Changes: https://git.openjdk.java.net/jdk/pull/8456/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8456&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285686 Stats: 10933 lines in 293 files changed: 6807 ins; 2146 del; 1980 mod Patch: https://git.openjdk.java.net/jdk/pull/8456.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8456/head:pull/8456 PR: https://git.openjdk.java.net/jdk/pull/8456 From zgu at openjdk.java.net Thu Apr 28 20:16:45 2022 From: zgu at openjdk.java.net (Zhengyu Gu) Date: Thu, 28 Apr 2022 20:16:45 GMT Subject: RFR: 8284680: sun.font.FontConfigManager.getFontConfig() leaks charset In-Reply-To: References: Message-ID: On Mon, 11 Apr 2022 18:05:09 GMT, Zhengyu Gu wrote: > Please review this small patch that releases temporary charsets to avoid memory leak. > > Test: > > - [x] jdk_2d > Hmmm, you are right. Phil probably pointed out the same problem, but I misunderstood it. What's odd is that, I tested (made sure that `FcCharSetDestroy` indeed called), it did not crash and `valgrind` showed the leak site disappeared. With your suggested fix, I think we still leak last `unionCharset`. BTW, the API documentation is really unhelpful, Sigh! ------------- PR: https://git.openjdk.java.net/jdk/pull/8187 From aivanov at openjdk.java.net Thu Apr 28 21:29:23 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Thu, 28 Apr 2022 21:29:23 GMT Subject: RFR: 8285306: Fix typos in java.desktop In-Reply-To: <5gAPAoRiIJr6BEko1UEaMd3QeUte-snqvfc9eNU2Jgk=.a6d39dcd-0d89-4444-a890-a6c53f41245b@github.com> References: <5gAPAoRiIJr6BEko1UEaMd3QeUte-snqvfc9eNU2Jgk=.a6d39dcd-0d89-4444-a890-a6c53f41245b@github.com> Message-ID: <1x04_BXzoS9x2Uh3iaA-wo08JPGM6xUli_YbFbyOkFY=.248133c8-2be5-4a68-89bc-9b6f62e33fb9@github.com> On Thu, 21 Apr 2022 08:35:36 GMT, Magnus Ihse Bursie wrote: > I ran `codespell` on the `src/java.desktop` directory, and accepted those changes where it indeed discovered real typos. > > I ignored typos in public methods and variables. Maybe they can be fixed later on without much fanfare, if they are in internal classes. Typos in exposed APIs are likely here to stay. > > I will update copyright years using a script before pushing (otherwise like every second change would be a copyright update, making reviewing much harder). > > The long term goal here is to make tooling support for running `codespell`. The trouble with automating this is of course all false positives. But before even trying to solve that issue, all true positives must be fixed. Hence this PR. Nearly 500 files are too many. Smaller chunks would be easier to review. Some of the native code files could come from upstream libraries. src/java.desktop/macosx/classes/com/apple/laf/AquaButtonUI.java line 535: > 533: > 534: static class AquaHierarchyButtonListener implements HierarchyListener { > 535: // Every time a hierarchy is change we need to check if the button if moved on or from Suggestion: // Every time a hierarchy is changed we need to check if the button is moved on or from Maybe even ?_the_ hierarchy?. And probably ?_the_ toolbar? on the next line. src/java.desktop/macosx/classes/sun/lwawt/macosx/CEmbeddedFrame.java line 126: > 124: // see bug 8010925 > 125: // we can't put this to handleWindowFocusEvent because > 126: // it won't be invoced if focus is moved to a html element Suggestion: // it won't be invoked if focus is moved to an html element src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m line 552: > 550: } > 551: > 552: // Orders window's children based on the current focus state Suggestion: // Orders window children based on the current focus state I believe possessive is not necessary here, it's not used with inanimate objects usually. src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m line 688: > 686: } > 687: > 688: // Hides/shows window's children during iconify/de-iconify operation Suggestion: // Hides/shows window children during iconify/de-iconify operation src/java.desktop/macosx/native/libawt_lwawt/awt/CTextPipe.m line 320: > 318: acquiring transform arrays from JNI, filling buffers, or striking glyphs. All resources or memory > 319: acquired at a given stage, must be released in that stage. Any error that occurs (like a failed malloc) > 320: is to be handled in the stage it occurs in, and is to return immediately after freeing it's resources. Suggestion: is to be handled in the stage it occurs in, and is to return immediately after freeing its resources. src/java.desktop/macosx/native/libawt_lwawt/awt/QuartzSurfaceData.m line 96: > 94: // The colors passed have low randomness. That means we need to scramble the bits of the color > 95: // to produce a good hash key. After some analysis, it looks like Thomas's Wang integer hashing algorithm > 96: // seems a nice trade off between performance and effectiveness. Suggestion: // seems a nice trade-off between performance and effectiveness. src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLGraphicsConfig.m line 63: > 61: jboolean metalSupported = JNI_FALSE; > 62: > 63: // It is guaranteed that metal supported GPU is available macOS 10.14 onwards It sounds as if something is missing before ?macOS?? Suggestion: // It is guaranteed that metal supported GPU is available since macOS 10.14 src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLVertexCache.m line 248: > 246: // we can give destination subtexturing properly but we can't > 247: // subtexture from system memory glyph we have. So in such > 248: // cases we are creating separate tile and scan the source Suggestion: // cases we are creating a separate tile and scan the source src/java.desktop/macosx/native/libawt_lwawt/java2d/metal/MTLVertexCache.m line 250: > 248: // cases we are creating separate tile and scan the source > 249: // stride into destination using memcpy. In case of OpenGL we > 250: // can update source pointers, in case of D3D we ar doing memcpy. Suggestion: // can update source pointers, in case of D3D we are doing memcpy. src/java.desktop/share/classes/javax/swing/ActionPropertyChangeListener.java line 49: > 47: *

            > 48: * WARNING WARNING WARNING WARNING WARNING WARNING:
            > 49: * Do NOT create an anonymous inner class that extends this! If you do Suggestion: * Do NOT create an anonymous inner class that extends this! If you do, A comma will separate the condition from the result. src/java.desktop/share/classes/javax/swing/BoxLayout.java line 503: > 501: * The relative axis values, PAGE_AXIS and LINE_AXIS are converted > 502: * to their absolute counterpart given the target's ComponentOrientation > 503: * value. The absolute axes, X_AXIS and Y_AXIS are returned unmodified. Shall we put a comma after LINE_AXIS and Y_AXIS and ?are?? src/java.desktop/share/classes/javax/swing/DefaultRowSorter.java line 1038: > 1036: if (!sorted || viewToModel.length == 0 || > 1037: (lastRow - firstRow) > viewToModel.length / 10) { > 1038: // We either weren't sorted, or to much changed, sort it all or Suggestion: // We either weren't sorted, or too much changed, sort it all or src/java.desktop/share/classes/javax/swing/GroupLayout.java line 1654: > 1652: /** > 1653: * Used to compute how the two values representing two springs > 1654: * will be combined. For example, a group that laid things out Suggestion: * will be combined. For example, a group that laid out things Not sure which one is correct. Usually the particle in a phrasal verb follows the verb is the object is a noun. src/java.desktop/share/classes/javax/swing/JCheckBox.java line 248: > 246: > 247: /** > 248: * The icon for checkboxs comes from the look and feel, Suggestion: * The icon for checkboxes comes from the look and feel, src/java.desktop/share/classes/javax/swing/JLayeredPane.java line 532: > 530: if(curLayer == layer) { > 531: layerCount++; > 532: /// Short circuit the counting when we have them all Suggestion: /// Short-circuit the counting when we have them all src/java.desktop/share/classes/javax/swing/JLayeredPane.java line 558: > 556: if(curLayer == layer) { > 557: results[layerCount++] = getComponent(i); > 558: /// Short circuit the counting when we have them all Suggestion: /// Short-circuit the counting when we have them all src/java.desktop/share/classes/javax/swing/JMenu.java line 201: > 199: * Overridden to do nothing. We want JMenu to be focusable, but > 200: * JMenuItem doesn't want to be, thus we override this > 201: * do nothing. We don't invoke setFocusable(true) after Suggestion: * to do nothing. We don't invoke setFocusable(true) after src/java.desktop/share/classes/javax/swing/JPopupMenu.java line 335: > 333: > 334: /** > 335: * Returns an point which has been adjusted to take into account of the Suggestion: * Returns an point which has been adjusted to take into account the src/java.desktop/share/classes/javax/swing/JSpinner.java line 675: > 673: // active vs those of the JFormattedTextField. As such we > 674: // put disabled actions in the JFormattedTextField's actionmap. > 675: // A binding to a disabled action is treated as a nonexistent Suggestion: // A binding to a disabled action is treated as a non-existent The word is spelt with a hyphen in all the preceding cases (in this code review). src/java.desktop/share/classes/javax/swing/SwingWorker.java line 262: > 260: > 261: /** > 262: * handler for {@code process} method. Suggestion: * Handler for {@code process} method. To be consistent in starting from a capital letter, even though it's a private field. src/java.desktop/share/classes/javax/swing/plaf/metal/MetalRootPaneUI.java line 316: > 314: uninstallLayout(root); > 315: // We have to revalidate/repaint root if the style is JRootPane.NONE > 316: // only. When we needs to call revalidate/repaint with other styles Suggestion: // only. When we need to call revalidate/repaint with other styles src/java.desktop/share/classes/javax/swing/plaf/metal/MetalTheme.java line 68: > 66: public abstract class MetalTheme { > 67: > 68: // Constants identifying the various Fonts that are Theme can support Suggestion: // Constants identifying the various Fonts that a Theme can support src/java.desktop/share/classes/javax/swing/plaf/nimbus/AbstractRegionPainter.java line 332: > 330: return laf.getDerivedColor(key, hOffset, sOffset, bOffset, aOffset, true); > 331: } else { > 332: // can not give a right answer as painter should not be used outside Suggestion: // cannot give the right answer as painter should not be used outside The sentence suggests there's only _one_ right answer, therefore the definite article. src/java.desktop/share/classes/javax/swing/plaf/nimbus/SynthPainterImpl.java line 126: > 124: Component c = ctx.getComponent(); > 125: boolean ltr = c.getComponentOrientation().isLeftToRight(); > 126: // Don't RTL flip JSpliders as they handle it internally Suggestion: // Don't RTL flip JSliders as they handle it internally src/java.desktop/share/classes/javax/swing/plaf/synth/doc-files/synthFileFormat.html line 876: > 874: used for all directions. > 875:

            path
            > 876:
            Path to the image. Path to the image. If SynthLookAndFeel.load is Suggestion:
            Path to the image. If SynthLookAndFeel.load is I believe the duplicate sentence can be dropped. src/java.desktop/share/classes/javax/swing/plaf/synth/doc-files/synthFileFormat.html line 877: > 875:
            path
            > 876:
            Path to the image. Path to the image. If SynthLookAndFeel.load is > 877: passed a Class this will use the Class method getResource (with with the Suggestion: passed a Class this will use the Class method getResource (with the src/java.desktop/share/classes/javax/swing/text/WrappedPlainView.java line 661: > 659: * This class tries to be lightweight by carrying little > 660: * state of it's own and sharing the state of the outer class > 661: * with it's sibblings. Suggestion: * state of its own and sharing the state of the outer class * with its siblings. src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1779: > 1777: *

            > 1778: * The CSS parser uses the parseCssValue method to convert > 1779: * a string to whatever format is appropriate a given key Suggestion: * a string to whatever format is appropriate for a given key src/java.desktop/share/classes/javax/swing/text/html/CSS.java line 1781: > 1779: * a string to whatever format is appropriate a given key > 1780: * (i.e. these converters are stored in a map using the > 1781: * CSS.Attribute as a key and the CssValue as the value). Suggestion: * CSS.Attribute as the key and the CssValue as the value). src/java.desktop/share/classes/javax/swing/text/html/parser/TagStack.java line 39: > 37: * When a start tag is encountered an element is pushed onto > 38: * the stack, when an end tag is encountered an element is popped > 39: * of the stack. Suggestion: * off the stack. src/java.desktop/share/classes/javax/swing/tree/FixedHeightLayoutCache.java line 645: > 643: > 644: /** > 645: * Ensures that all the path components in path are expanded, accept Suggestion: * Ensures that all the path components in path are expanded, except src/java.desktop/share/classes/sun/awt/image/ImagingLib.java line 68: > 66: > 67: /** > 68: * Returned value indicates whether the library initialization was Suggestion: * Returned value indicates whether the library initialization src/java.desktop/share/classes/sun/awt/image/ImagingLib.java line 71: > 69: * succeeded. > 70: * > 71: * There could be number of reasons to failure: Suggestion: * There could be a number of reasons for failure: src/java.desktop/share/classes/sun/swing/SwingUtilities2.java line 1782: > 1780: /** > 1781: * Returns an integer from the defaults table. If {@code key} does > 1782: * not map to a valid {@code Integer}, or can not be converted from Suggestion: * not map to a valid {@code Integer}, or cannot be converted from src/java.desktop/share/classes/sun/swing/SwingUtilities2.java line 1795: > 1793: * Returns an integer from the defaults table that is appropriate > 1794: * for the given locale. If {@code key} does not map to a valid > 1795: * {@code Integer}, or can not be converted from a {@code String} Suggestion: * {@code Integer}, or cannot be converted from a {@code String} And two more below. src/java.desktop/share/classes/sun/swing/text/TextComponentPrintable.java line 772: > 770: /* > 771: * we do not store the same value as previous. in our > 772: * documents it is often for consequent positions to have Looks this actually means _consecutive_ positions? src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java line 485: > 483: /** > 484: * returns item which mapped coordinates contain > 485: * specified point, null of none. Suggestion: * the specified point, null if none. src/java.desktop/unix/classes/sun/awt/X11/XBaseMenuWindow.java line 944: > 942: * This function needs to be overridden since > 943: * XBaseMenuWindow has no corresponding component > 944: * so events can not be processed using standard means Suggestion: * so events cannot be processed using standard means src/java.desktop/windows/classes/sun/awt/windows/WPrinterJob.java line 390: > 388: /* Implement DisposerTarget. Weak references to an Object can delay > 389: * its storage reclamation marginally. > 390: * It won't make the native resources be release any more quickly, but Suggestion: * It won't make the native resources be released any more quickly, but src/java.desktop/windows/native/libawt/windows/awt_Label.h line 62: > 60: /* > 61: * if WM_PAINT was receiving when we can not paint > 62: * then setup m_needPaint end when can call this function Suggestion: * if WM_PAINT was received when we cannot paint * then setup m_needPaint and when can paint call this function src/java.desktop/windows/native/libawt/windows/awt_PrintDialog.cpp line 57: > 55: (LOWORD(wParam) == IDCANCEL)) > 56: { > 57: // If we receive on of these two notifications, the dialog Suggestion: // If we receive one of these two notifications, the dialog src/java.desktop/windows/native/libawt/windows/awt_PrintJob.cpp line 3173: > 3171: (LOWORD(wParam) == IDCANCEL)) > 3172: { > 3173: // If we receive on of these two notifications, the dialog Suggestion: // If we receive one of these two notifications, the dialog src/java.desktop/windows/native/libawt/windows/awt_Toolkit.cpp line 1085: > 1083: // Special awt message to call Imm APIs. > 1084: // ImmXXXX() API must be used in the main thread. > 1085: // In other thread these APIs does not work correctly even if Suggestion: // In other threads these APIs do not work correctly even if src/java.desktop/windows/native/libawt/windows/awt_Toolkit.cpp line 1087: > 1085: // In other thread these APIs does not work correctly even if > 1086: // it returns with no error. (This restriction is not documented) > 1087: // So we must use thse messages to call these APIs in main thread. Suggestion: // So we must use these messages to call these APIs in main thread. ------------- PR: https://git.openjdk.java.net/jdk/pull/8328 From mvs at openjdk.java.net Thu Apr 28 22:16:34 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Thu, 28 Apr 2022 22:16:34 GMT Subject: RFR: 8274597: Some of the dnd tests time out and fail intermittently [v3] In-Reply-To: References: Message-ID: > These dnd tests fails with a time out intermittently in some machines(mostly Windows 11) which creates frequent noise in CI. > 1. java/awt/dnd/AcceptDropMultipleTimes/AcceptDropMultipleTimes.java > 2. java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java > 3. java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java > 4. java/awt/dnd/MissingDragExitEventTest/MissingDragExitEventTest.java > > Issue : > This doesn't seem to be a deadlock. When there is no sufficient delay after the mouse release(dragged mouse pointer release to drop the content), the frame is getting disposed even before the drop() method gets called. So it waits for the drop() method which will never happen as the frame has been already disposed and the test times out after some time. > > Fix: > Waiting for the drop() method to get called before disposing the frame. > > Testing: > 1. All the four tests are run 10 times per platform and got all pass > 2. All the four tests are run 10 times on Windows 11 and got all pass Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Review comments fixed: Removed changes in Utils and made all the 4 tests waiting for drop() to get called, formatting changes, set the frame on top ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8316/files - new: https://git.openjdk.java.net/jdk/pull/8316/files/f008f89a..e0d63537 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8316&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8316&range=01-02 Stats: 115 lines in 5 files changed: 65 ins; 25 del; 25 mod Patch: https://git.openjdk.java.net/jdk/pull/8316.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8316/head:pull/8316 PR: https://git.openjdk.java.net/jdk/pull/8316 From mvs at openjdk.java.net Thu Apr 28 22:21:37 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Thu, 28 Apr 2022 22:21:37 GMT Subject: RFR: 8274597: Some of the dnd tests time out and fail intermittently [v4] In-Reply-To: References: Message-ID: <5d-F4QcZM_iIJcus08tRQjsDagQXd6Jar1_zMwFeB5M=.cb91b495-1863-4fe2-b3cd-a55b28cdcb9d@github.com> > These dnd tests fails with a time out intermittently in some machines(mostly Windows 11) which creates frequent noise in CI. > 1. java/awt/dnd/AcceptDropMultipleTimes/AcceptDropMultipleTimes.java > 2. java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java > 3. java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java > 4. java/awt/dnd/MissingDragExitEventTest/MissingDragExitEventTest.java > > Issue : > This doesn't seem to be a deadlock. When there is no sufficient delay after the mouse release(dragged mouse pointer release to drop the content), the frame is getting disposed even before the drop() method gets called. So it waits for the drop() method which will never happen as the frame has been already disposed and the test times out after some time. > > Fix: > Waiting for the drop() method to get called before disposing the frame. > > Testing: > 1. All the four tests are run 10 times per platform and got all pass > 2. All the four tests are run 10 times on Windows 11 and got all pass Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Removed extra blank line added to Util, no changes required in Util ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8316/files - new: https://git.openjdk.java.net/jdk/pull/8316/files/e0d63537..fae1d36a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8316&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8316&range=02-03 Stats: 1 line in 1 file changed: 0 ins; 1 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8316.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8316/head:pull/8316 PR: https://git.openjdk.java.net/jdk/pull/8316 From mvs at openjdk.java.net Thu Apr 28 22:21:38 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Thu, 28 Apr 2022 22:21:38 GMT Subject: RFR: 8274597: Some of the dnd tests time out and fail intermittently [v2] In-Reply-To: References: <-M3RkI7ibFy3E3pyMdIyr-7-WWbZQXFo_4no53mvgDY=.761ad3d4-ff6c-4453-a328-173492e14616@github.com> Message-ID: On Wed, 27 Apr 2022 18:11:39 GMT, Phil Race wrote: >> Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: >> >> Added blank line at end of file > > test/jdk/java/awt/regtesthelpers/Util.java line 325: > >> 323: robot.setAutoDelay(100); >> 324: autoDelaySet = true; >> 325: } > > If this is the right place to fix it - in the Util class - then you can just call delay(100) in the places you need it - no need to set and then unset auto-delay. > > Changing Util you will need to re-validate all tests that use this utility method. > > Based on the explanation you gave ~mrserb I wonder if the test should also be waiting for the drop before disposing, not just throwing an arbitrary wait into the mix. I have removed the changes done in Util.java and make the changes in all the 4 test files, so that the test will be waiting for the drop before disposing. ------------- PR: https://git.openjdk.java.net/jdk/pull/8316 From duke at openjdk.java.net Thu Apr 28 22:29:51 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Thu, 28 Apr 2022 22:29:51 GMT Subject: RFR: 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java [v3] In-Reply-To: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> References: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> Message-ID: > 1) Fixed Parser error by removing yesno from @run main/manual=yesno > 2) Used PassFaileJFrame to show the test instruction to the user instead of printing the test instruction on the console or jtreg log file. > 3) If printer is not configured then mark the test as passed. > > @shurymury > @aivanov-jdk lawrence.andrews 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 'openjdk:master' into JDK-8285687 - Added @key printer since this test needs printer - 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8412/files - new: https://git.openjdk.java.net/jdk/pull/8412/files/c178312a..4655a27a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8412&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8412&range=01-02 Stats: 6443 lines in 206 files changed: 5220 ins; 440 del; 783 mod Patch: https://git.openjdk.java.net/jdk/pull/8412.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8412/head:pull/8412 PR: https://git.openjdk.java.net/jdk/pull/8412 From serb at openjdk.java.net Thu Apr 28 22:36:45 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 28 Apr 2022 22:36:45 GMT Subject: RFR: 8285686: Upgrade to FreeType 2.12.0 In-Reply-To: References: Message-ID: <9Ejkq4elVwt_pTMvbRlyO624bK--ja-TxpZn2nE8d-o=.9027b194-74db-4c9b-8b1e-91eef412c7f2@github.com> On Thu, 28 Apr 2022 19:41:46 GMT, Phil Race wrote: > This upgrades the JDK from using freetype 2.10.4 to 2.12.0 > Automated tests pass, manual testing looks fine. > --with-freetype=bundled was used to make sure it is OK on Linux builds. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8456 From serb at openjdk.java.net Thu Apr 28 22:43:39 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 28 Apr 2022 22:43:39 GMT Subject: RFR: 8213531: Test javax/swing/border/TestTitledBorderLeak.java fails [v2] In-Reply-To: <7f6imhO_fmNXVejmC3boQyV0uNjoHOJCiVzetcCOHpY=.b2d95eab-e3f7-45db-83ad-92e91e3a5585@github.com> References: <7f6imhO_fmNXVejmC3boQyV0uNjoHOJCiVzetcCOHpY=.b2d95eab-e3f7-45db-83ad-92e91e3a5585@github.com> Message-ID: On Thu, 28 Apr 2022 13:34:31 GMT, Prasanta Sadhukhan wrote: >> Test was failing in linux citing `java.lang.RuntimeException: Expected Total TitledBorder to be freed : 10 Freed 9 ` >> As per the fix done in JDK-8204963 http://hg.openjdk.java.net/jdk/jdk/rev/cd7d2f9154fd >> there was no platform specific code done for the fix and logs in `TitledBorder.installPropertyChangeListeners` shows it was called 10 times for the test but `CleanerFactory.cleaner().register` action was only called 9 times in linux causing it to fail. >> >> Modified the test to not show the frame which cause the problem to go away and also it can still be used as 8204963 regression test as it still fails without the fix and pass with it. Modified test has passed in all platforms for several iterations. >> >> Also removed the deprecated `System.runFinalization` > > Prasanta Sadhukhan has updated the pull request incrementally with one additional commit since the last revision: > > Test fix > Modified the test to not show the frame which cause the problem to go away Does it mean that setVisible(true) cause some memory leak since it prevents the window to be disposed? ------------- PR: https://git.openjdk.java.net/jdk/pull/8450 From serb at openjdk.java.net Thu Apr 28 22:45:51 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 28 Apr 2022 22:45:51 GMT Subject: RFR: 8254759: [TEST_BUG] [macosx] javax/swing/JInternalFrame/4202966/IntFrameCoord.html fails In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 09:11:19 GMT, DamonGuy wrote: > Closed repo test fix from the test sprint. This test was approved in the closed repo and has been converted to an open repo test. > > This test checks if the coordinates are still correct after changing focuses between different JInternalFrames. The test is now automated instead of manual like the previous, closed version. This needs to be a headful test to allow robot to click on the different frames and to check coordinates. > > The issue was that in MacOS, the button wouldn't appear at a normal size. To fix this, the bounds have been increased to allow the button to be fully visible with the designated frame sizes on all L&Fs. Please confirm that the mach5 is green for the few iterations. ------------- PR: https://git.openjdk.java.net/jdk/pull/8444 From naoto at openjdk.java.net Thu Apr 28 23:14:42 2022 From: naoto at openjdk.java.net (Naoto Sato) Date: Thu, 28 Apr 2022 23:14:42 GMT Subject: RFR: 8285308: Win: Japanese logical fonts are drawn with wrong size [v2] In-Reply-To: References: Message-ID: On Mon, 25 Apr 2022 08:15:18 GMT, Toshio Nakamura wrote: >> Japanese logical fonts are drawn with wrong size since Java 18. >> It's triggered by JEP 400, UTF-8 by Default. `sun.awt.FontConfiguration` (and `sun.awt.windows.WFontConfiguration`) seems to expect the native encoding instead of the default encoding. This patch changes to use native encoding. >> >> Tested: jdk_desktop on Windows, Linux, and macOS > > Toshio Nakamura has updated the pull request incrementally with one additional commit since the last revision: > > Moved the fix to WFontConfiguration The following diff seems to choose the right font: --- a/src/java.desktop/windows/data/fontconfig/fontconfig.properties +++ b/src/java.desktop/windows/data/fontconfig/fontconfig.properties @@ -230,7 +230,7 @@ sequence.dialog.x-MS950-HKSCS-XP=alphabetic,chinese-ms950,ch inese-hkscs,dingbats sequence.dialoginput.x-MS950-HKSCS-XP=alphabetic,chinese-ms950,chinese-hkscs,di ngbats,symbol,chinese-ms950-extb sequence.allfonts.UTF-8.hi=alphabetic/1252,devanagari,dingbats,symbol -sequence.allfonts.UTF-8.ja=alphabetic,japanese,dingbats,symbol +sequence.allfonts.UTF-8.ja=japanese,alphabetic,dingbats,symbol sequence.allfonts.windows-1255=hebrew,alphabetic/1252,dingbats,symbol This diff intends to choose the `japanese` set before the `alphabetic` set, in case for `ja` locale in `UTF-8` file encoding. I am not saying this is the right fix, but could be a starting point. ------------- PR: https://git.openjdk.java.net/jdk/pull/8329 From serb at openjdk.java.net Thu Apr 28 23:20:43 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 28 Apr 2022 23:20:43 GMT Subject: RFR: 8284888 : [macos] javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java failed with "NimbusLookAndFeel] : ERROR: icon and imageIcon not same." In-Reply-To: References: <1OYwEG8b8QLK1qYmQ3DIAL6XwKN-Le4-1ceI2-hX2u4=.6df0b3d6-c07e-46a6-8ecb-99ac2b65e075@github.com> Message-ID: On Wed, 27 Apr 2022 07:35:44 GMT, Prasanta Sadhukhan wrote: > Not sure I understand. It does not render same image twice but it renders an `ImageIcon `and an `Icon `and compare the bufferedimage of those 2 so I guess it alright to not have exact color check ` if (red1 != red2 || green1 != green2 || blue1 != blue2) {` and rely on color tolerance which we have in many tests involving bufferedimages.. Sure these are not the same images, but still, we render images and get different results, on one specific system? If the robot is not a root cause then looks like the difference occurrs somewhere in the rendering pipeline? ------------- PR: https://git.openjdk.java.net/jdk/pull/8380 From serb at openjdk.java.net Thu Apr 28 23:23:44 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 28 Apr 2022 23:23:44 GMT Subject: RFR: 8274597: Some of the dnd tests time out and fail intermittently [v4] In-Reply-To: <5d-F4QcZM_iIJcus08tRQjsDagQXd6Jar1_zMwFeB5M=.cb91b495-1863-4fe2-b3cd-a55b28cdcb9d@github.com> References: <5d-F4QcZM_iIJcus08tRQjsDagQXd6Jar1_zMwFeB5M=.cb91b495-1863-4fe2-b3cd-a55b28cdcb9d@github.com> Message-ID: On Thu, 28 Apr 2022 22:21:37 GMT, Manukumar V S wrote: >> These dnd tests fails with a time out intermittently in some machines(mostly Windows 11) which creates frequent noise in CI. >> 1. java/awt/dnd/AcceptDropMultipleTimes/AcceptDropMultipleTimes.java >> 2. java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java >> 3. java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java >> 4. java/awt/dnd/MissingDragExitEventTest/MissingDragExitEventTest.java >> >> Issue : >> This doesn't seem to be a deadlock. When there is no sufficient delay after the mouse release(dragged mouse pointer release to drop the content), the frame is getting disposed even before the drop() method gets called. So it waits for the drop() method which will never happen as the frame has been already disposed and the test times out after some time. >> >> Fix: >> Waiting for the drop() method to get called before disposing the frame. >> >> Testing: >> 1. All the four tests are run 10 times per platform and got all pass >> 2. All the four tests are run 10 times on Windows 11 and got all pass > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Removed extra blank line added to Util, no changes required in Util Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8316 From serb at openjdk.java.net Thu Apr 28 23:29:49 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 28 Apr 2022 23:29:49 GMT Subject: RFR: 6829250: Reg test: java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java fails in Windows In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 16:37:29 GMT, Alexander Zuev wrote: > The MAXIMIZED_BOTH for undecorated frames works, however, for undecorated frames it allows window to overlap the taskbar so the window occupies the entirety of the screen. I do not think it is a bug. It is a bug, it prevents the creation of the custom window decorations which behave like the native ones since the maximization action does not work. We have a number of JBS bugs for that, this one, then 4737788, and others see "relates to/duplicates" ------------- PR: https://git.openjdk.java.net/jdk/pull/8314 From serb at openjdk.java.net Thu Apr 28 23:31:47 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 28 Apr 2022 23:31:47 GMT Subject: RFR: 8285094: Test java/awt/Frame/InvisibleOwner/InvisibleOwner.java failing on Linux [v2] In-Reply-To: <1FY4ypDIGUN3Hkz3R8hN6zyJonmrErTzUlU50bijZtw=.7ea435d2-6268-4454-9c58-e98fca7c8c20@github.com> References: <1FY4ypDIGUN3Hkz3R8hN6zyJonmrErTzUlU50bijZtw=.7ea435d2-6268-4454-9c58-e98fca7c8c20@github.com> Message-ID: On Thu, 21 Apr 2022 15:23:31 GMT, Phil Race wrote: >> As discussed in https://bugs.openjdk.java.net/browse/JDK-8285094 it seems that the test >> java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java destabilises the Xserver. >> This causes java/awt/Frame/InvisibleOwner/InvisibleOwner.java to fail and even before that >> other tests which do pass are not visibly behaving as expected. >> >> I didn't find any Xserver logs of "bad stuff" happening so it just seems like the Xserver was >> having trouble keeping up and JDK was behaving correctly as it could despite the Xserver sending >> lots of requests to repaint. >> >> Just the "sleep" at the end of GetGraphicsStressTest.java seems to be enough but I'd already >> reworked InvisibleOwner.java and I'd like to think it is a bit better than before. > > Phil Race has updated the pull request incrementally with one additional commit since the last revision: > > 8285094 Marked as reviewed by serb (Reviewer). test/jdk/java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java line 30: > 28: /** > 29: * @test > 30: * @bug 8235638 8235739 8285094 It is not necessary to add bugid here, since this list is useful to verify the old bugs if the test will be reworked later. ------------- PR: https://git.openjdk.java.net/jdk/pull/8312 From serb at openjdk.java.net Thu Apr 28 23:33:03 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Thu, 28 Apr 2022 23:33:03 GMT Subject: RFR: 8283624: Create an automated regression test for RFE-4390885 [v4] In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 10:17:16 GMT, Manukumar V S wrote: >> Write a regression test for [JDK-4390885](https://bugs.openjdk.java.net/browse/JDK-4390885) Enhancement Request. >> >> Issue: >> Please add the ability to set the location of a JFileChooser. This might be a >> bug, but JFileChooser.setLocation() has no effect when >> JFileChooser.showXXXXDialog() is called. This is becoming very important as the >> popularity of multiple monitors is increasing. These dialogs show up on the >> wrong monitor which is really annoying. Also due to bug #4189244 I am unable to >> avoid painting problems by positioning the dialog away from the menu item that >> initiated it. >> >> Fix: >> Now it's possible to set the location of Dialog in JFileChooser. >> >> Testing: >> 1. Tested in Mach5 10 times per platform(macos,linux,windows) and got all Pass. > > Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: > > Review comment fixed: Accessed panel.getSize() in EDT Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7996 From duke at openjdk.java.net Thu Apr 28 23:55:28 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Thu, 28 Apr 2022 23:55:28 GMT Subject: RFR: 8285612 : Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/ImagePrinting/ClippedImages.java [v3] In-Reply-To: References: Message-ID: > 1) Removed yesno to eliminate parserException > 2) Added code to fit into manual framework so that timeout, pass & fail is handled. > 3) Added code to mark the test as pass if printer service is not available > 4) Added code to handle pressing or clicking of 'Cancel' button. > > @shurymury > @aivanov-jdk lawrence.andrews has updated the pull request incrementally with one additional commit since the last revision: Added @key printer ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8391/files - new: https://git.openjdk.java.net/jdk/pull/8391/files/53aa04cb..eb44f668 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8391&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8391&range=01-02 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/8391.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8391/head:pull/8391 PR: https://git.openjdk.java.net/jdk/pull/8391 From prr at openjdk.java.net Fri Apr 29 00:10:33 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 29 Apr 2022 00:10:33 GMT Subject: RFR: 8285094: Test java/awt/Frame/InvisibleOwner/InvisibleOwner.java failing on Linux [v3] In-Reply-To: References: Message-ID: > As discussed in https://bugs.openjdk.java.net/browse/JDK-8285094 it seems that the test > java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java destabilises the Xserver. > This causes java/awt/Frame/InvisibleOwner/InvisibleOwner.java to fail and even before that > other tests which do pass are not visibly behaving as expected. > > I didn't find any Xserver logs of "bad stuff" happening so it just seems like the Xserver was > having trouble keeping up and JDK was behaving correctly as it could despite the Xserver sending > lots of requests to repaint. > > Just the "sleep" at the end of GetGraphicsStressTest.java seems to be enough but I'd already > reworked InvisibleOwner.java and I'd like to think it is a bit better than before. Phil Race has updated the pull request incrementally with one additional commit since the last revision: 8285094 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8312/files - new: https://git.openjdk.java.net/jdk/pull/8312/files/160b4eae..915e6aea Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8312&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8312&range=01-02 Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8312.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8312/head:pull/8312 PR: https://git.openjdk.java.net/jdk/pull/8312 From prr at openjdk.java.net Fri Apr 29 00:10:33 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 29 Apr 2022 00:10:33 GMT Subject: Integrated: 8285094: Test java/awt/Frame/InvisibleOwner/InvisibleOwner.java failing on Linux In-Reply-To: References: Message-ID: On Wed, 20 Apr 2022 04:13:09 GMT, Phil Race wrote: > As discussed in https://bugs.openjdk.java.net/browse/JDK-8285094 it seems that the test > java/awt/Frame/GetGraphicsStressTest/GetGraphicsStressTest.java destabilises the Xserver. > This causes java/awt/Frame/InvisibleOwner/InvisibleOwner.java to fail and even before that > other tests which do pass are not visibly behaving as expected. > > I didn't find any Xserver logs of "bad stuff" happening so it just seems like the Xserver was > having trouble keeping up and JDK was behaving correctly as it could despite the Xserver sending > lots of requests to repaint. > > Just the "sleep" at the end of GetGraphicsStressTest.java seems to be enough but I'd already > reworked InvisibleOwner.java and I'd like to think it is a bit better than before. This pull request has now been integrated. Changeset: 64d98ba1 Author: Phil Race URL: https://git.openjdk.java.net/jdk/commit/64d98ba1001a24b301e5d8bce247f556fdcd39b2 Stats: 137 lines in 2 files changed: 73 ins; 9 del; 55 mod 8285094: Test java/awt/Frame/InvisibleOwner/InvisibleOwner.java failing on Linux Reviewed-by: psadhukhan, serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8312 From prr at openjdk.java.net Fri Apr 29 00:16:44 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 29 Apr 2022 00:16:44 GMT Subject: RFR: 8285308: Win: Japanese logical fonts are drawn with wrong size [v2] In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 23:11:20 GMT, Naoto Sato wrote: > The following diff seems to choose the right font: > > ``` > --- a/src/java.desktop/windows/data/fontconfig/fontconfig.properties > +++ b/src/java.desktop/windows/data/fontconfig/fontconfig.properties > @@ -230,7 +230,7 @@ sequence.dialog.x-MS950-HKSCS-XP=alphabetic,chinese-ms950,ch > inese-hkscs,dingbats > sequence.dialoginput.x-MS950-HKSCS-XP=alphabetic,chinese-ms950,chinese-hkscs,di > ngbats,symbol,chinese-ms950-extb > > sequence.allfonts.UTF-8.hi=alphabetic/1252,devanagari,dingbats,symbol > -sequence.allfonts.UTF-8.ja=alphabetic,japanese,dingbats,symbol > +sequence.allfonts.UTF-8.ja=japanese,alphabetic,dingbats,symbol > > sequence.allfonts.windows-1255=hebrew,alphabetic/1252,dingbats,symbol > ``` > > This diff intends to choose the `japanese` set before the `alphabetic` set, in case for `ja` locale in `UTF-8` file encoding. I am not saying this is the right fix, but could be a starting point. I've been looking at that exact line since I think it is what we'd use in the new default locale and also thinking about the "allfonts" issue we've seen with Korean. And which font is "japanese" in this case ? Maybe we want to fill out the UTF8. based locales in this file now that is the default I suspect it is a lot safer to do what Toshio is doing but I just want to understand the mechanism. I didn't have all the JA fonts installed on my system and I've been trying but they don't seem to have appeared yet, so specifically I don't have MS Mincho, so there's not much I can test yet. It migh ------------- PR: https://git.openjdk.java.net/jdk/pull/8329 From serb at openjdk.java.net Fri Apr 29 00:26:44 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 29 Apr 2022 00:26:44 GMT Subject: RFR: 8282526: Default icon is not painted properly [v3] In-Reply-To: References: <7zYHFtn9L54eIDP49ZZtZA_kDPWwhwWTo1Zzy82gyYc=.21baf5bc-9604-4242-92d7-65bfb68cf9a0@github.com> <9YGqKP4x5N0miiskVwMoF201g7ng3JjTnJF5ctGkD5w=.9b763d6a-469d-49b0-83cd-79cc46cdfecd@github.com> Message-ID: On Wed, 27 Apr 2022 15:41:33 GMT, Alexander Zuev wrote: > Why? As i shown in the test case the problem affects any ImageIcon based on the MultiResolutionImage. I'm not trying to solve the singular issue that in the Windows LaF - i am trying to eliminate the reason this problem can show up. Default interpolation for all rendering in java2d is NN, if the user wants he may change it to any other modes. This is consistent for all types of images, and MultiResolutionImage is not any special. In this particular case the code where we call ImageIcon.paintIcon() may set different interpolation when some system property is set, similar to the [antialiasing](https://github.com/openjdk/jdk/blob/d5dacffaee5a3626e7c9994b5d24f9514926e40c/jdk/src/java.desktop/share/classes/sun/swing/SwingUtilities2.java#L480). But it is not so important since the root cause below. > Because before that change we were using different binary API to retrieve icons. This API only allows gathering 8x8 and 16x16 icons. The new API can be used for requesting icons of any size but for some files it ignores the requested size and only returns 32x32 icon. In this case we creating the multi resolution image with that icon inside and allow icon painting routine do the scaling. As i shown in my test for this bug the scaling works poorly and here i'm trying to enhance it. Can it be done in WinLAF? Yes, absolutely, but it will not solve the more generic issue. So this is the actual root cause of the problem: the change in behavior of the FileSystemView.getSystemIcon() caused by using a different API that ignores the passed size. Since the size 16x16 is the default size for getSystemIcon() it would be good to restore the old behavior(mix the new and old) and request the best resolution from the system. It will save some memory and provide the best performance. ------------- PR: https://git.openjdk.java.net/jdk/pull/7805 From serb at openjdk.java.net Fri Apr 29 00:39:53 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 29 Apr 2022 00:39:53 GMT Subject: RFR: JDK-8255439: System Tray icons get corrupted when windows scaling changes In-Reply-To: References: Message-ID: <3HBkT_7SmunSZ1cby1bQtYO_qZ_XQtQHV42fQsI7_vg=.b1043cdc-3e4c-45d6-be69-24b67c1b9e8b@github.com> On Thu, 28 Apr 2022 02:26:28 GMT, Harshitha Onkar wrote: > In Windows when desktop scaling was changed the tray icons was distorted/blurred a bit each time scaling changes. > > With the proposed fix, the tray icon scales according to on-the-fly DPI scale settings. A test case has been added which adds a MRI icon to system tray, to observe the icon scaling when DPI is changed. Since the scale cannot be programmatically changed (for dynamic on-the-fly scale changes), I have used a manual test case to test this scenario. > > When DPI changes usually two messages are sent by windows - > > - [WM_DPICHANGED](https://docs.microsoft.com/en-us/windows/win32/hidpi/wm-dpichanged) > - [WMPOSCHANGING](https://docs.microsoft.com/en-us/windows/win32/winmsg/wm-windowposchanging) > > I'm triggering an update on tray icons on receiving WMPOSCHANGING msg through the Tray icon's Window Procedure. Triggering an update on WM_DPICHANGED was still causing the icons to be distorted, hence WMPOSCHANGING is being used as the message to trigger the update. Did you have a chance to check why the WM_DPICHANGED does not work, any specific cases? It is used by checking the scale change for windows in AWT, and no issues were reported for that as far as I know. ------------- PR: https://git.openjdk.java.net/jdk/pull/8441 From serb at openjdk.java.net Fri Apr 29 00:42:08 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 29 Apr 2022 00:42:08 GMT Subject: RFR: 8285693: Create an automated test for JDK-4702199 In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 07:54:18 GMT, Srinivas Mandalika wrote: > reate an automated test for [JDK-4702199](https://bugs.openjdk.java.net/browse/JDK-4702199) > > In order for spatial Braille to work and screen reader "review mode", we need bounding rectangle information for all text on the screen, and also the ability to get text substrings. StarOffice 6.1, Netscape and GNOME accessibility also require this new interface for describing text in their applications. This new interface is required for accessibility to StarOffice 6.1, Netscape and GNOME applications as required by Section 508 > > The solution is to define a new interface and related two helper classes. > AccessibleExtendedText, > AccessibleTextSequence. > AccessibleAttributeSequence > > The test validates the public fields of the above classes. > This review is for migrating tests from a closed test suite to open. > > Testing: > The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. Marked as reviewed by serb (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8416 From serb at openjdk.java.net Fri Apr 29 00:42:44 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 29 Apr 2022 00:42:44 GMT Subject: RFR: 7131823: bug in GIFImageReader [v3] In-Reply-To: References: Message-ID: <2SCvR6NjjyvcUa3kzn65PoDVuYN6WITGWs80b1lSIWg=.7a23857d-4bb6-43a8-b934-d600ea66d359@github.com> On Wed, 27 Apr 2022 22:10:43 GMT, Dan Lutker wrote: >> ?xception: Index 4096 out of bounds for length 4096 >> >> Adapted from https://github.com/openjdk/jfx/commit/7b7050c46299c0e6771ae02fbb5ceaf22104d3e4 >> >> # Testing done >> Build locally on linux and ran jdk_imageio tests. > > Dan Lutker 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: > > 7131823: bug in GIFImageReader The updated code now uses NULL_CODE, so it covers both issues from the JBS. But does anybody have an idea what was the problem fixed by the "NULL_CODE", was and how hard to create a test for it? ------------- PR: https://git.openjdk.java.net/jdk/pull/8371 From serb at openjdk.java.net Fri Apr 29 00:43:57 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 29 Apr 2022 00:43:57 GMT Subject: RFR: 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java [v3] In-Reply-To: References: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> Message-ID: <8bNWtvXyvA_PP2JTHxp9q7GnO2MgRDmdA7rycRApC5U=.150a085a-0161-4cd4-9979-5818b485218f@github.com> On Thu, 28 Apr 2022 22:29:51 GMT, lawrence.andrews wrote: >> 1) Fixed Parser error by removing yesno from @run main/manual=yesno >> 2) Used PassFaileJFrame to show the test instruction to the user instead of printing the test instruction on the console or jtreg log file. >> 3) If printer is not configured then mark the test as passed. >> >> @shurymury >> @aivanov-jdk > > lawrence.andrews 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 'openjdk:master' into JDK-8285687 > - Added @key printer since this test needs printer > - 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java Since the test now uses the printer keyword I doubt that it should pass silently if the printer is not installed. ------------- PR: https://git.openjdk.java.net/jdk/pull/8412 From duke at openjdk.java.net Fri Apr 29 01:20:39 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Fri, 29 Apr 2022 01:20:39 GMT Subject: RFR: 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java [v3] In-Reply-To: <8bNWtvXyvA_PP2JTHxp9q7GnO2MgRDmdA7rycRApC5U=.150a085a-0161-4cd4-9979-5818b485218f@github.com> References: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> <8bNWtvXyvA_PP2JTHxp9q7GnO2MgRDmdA7rycRApC5U=.150a085a-0161-4cd4-9979-5818b485218f@github.com> Message-ID: On Fri, 29 Apr 2022 00:41:50 GMT, Sergey Bylokhov wrote: >> lawrence.andrews 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 'openjdk:master' into JDK-8285687 >> - Added @key printer since this test needs printer >> - 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java > > Since the test now uses the printer keyword I doubt that it should pass silently if the printer is not installed. @mrserb, run the test on Ubuntu 20.04 where printer is not configured and test passes as shown in the jtreg jtr file ----------messages:(5/203)---------- command: main PageRangesDlgTest reason: User specified action: run main/manual PageRangesDlgTest Mode: othervm Additional options from @modules: --add-modules java.desktop elapsed time (seconds): 0.233 ----------configuration:(3/40)---------- Boot Layer add modules: java.desktop ----------System.out:(1/59)---------- Printer not configured or available. Test cannot continue. ----------System.err:(1/15)---------- STATUS:Passed. ------------- PR: https://git.openjdk.java.net/jdk/pull/8412 From duke at openjdk.java.net Fri Apr 29 01:43:37 2022 From: duke at openjdk.java.net (Harshitha Onkar) Date: Fri, 29 Apr 2022 01:43:37 GMT Subject: RFR: JDK-8255439: System Tray icons get corrupted when windows scaling changes In-Reply-To: <3HBkT_7SmunSZ1cby1bQtYO_qZ_XQtQHV42fQsI7_vg=.b1043cdc-3e4c-45d6-be69-24b67c1b9e8b@github.com> References: <3HBkT_7SmunSZ1cby1bQtYO_qZ_XQtQHV42fQsI7_vg=.b1043cdc-3e4c-45d6-be69-24b67c1b9e8b@github.com> Message-ID: On Fri, 29 Apr 2022 00:36:15 GMT, Sergey Bylokhov wrote: > Did you have a chance to check why the WM_DPICHANGED does not work, any specific cases? It is used by checking the scale change for windows in AWT, and no issues were reported for that as far as I know. When DPI gets changed, many events are generated one after the other. By setting delays at various places in code I observed that, the timing of triggering tray icon update could have effects on how it is rendered. When DPI is changed, along with `WM_DPICHANGED` msg the tray icon window's procedure receives `WMPOSCHANGING` and if we trigger a tray icon update before this, the icon gets distorted. I believe the cause for distortion might be - adding an icon to the system tray while it is still changing its size and position (WMPOSCHANGING) due to DPI changes. By triggering the update after `WMPOSCHANGING`, the tray icon gets added when all the updates to the System Tray are completed. ------------- PR: https://git.openjdk.java.net/jdk/pull/8441 From mvs at openjdk.java.net Fri Apr 29 04:13:46 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 29 Apr 2022 04:13:46 GMT Subject: Integrated: 8283624: Create an automated regression test for RFE-4390885 In-Reply-To: References: Message-ID: On Mon, 28 Mar 2022 14:17:17 GMT, Manukumar V S wrote: > Write a regression test for [JDK-4390885](https://bugs.openjdk.java.net/browse/JDK-4390885) Enhancement Request. > > Issue: > Please add the ability to set the location of a JFileChooser. This might be a > bug, but JFileChooser.setLocation() has no effect when > JFileChooser.showXXXXDialog() is called. This is becoming very important as the > popularity of multiple monitors is increasing. These dialogs show up on the > wrong monitor which is really annoying. Also due to bug #4189244 I am unable to > avoid painting problems by positioning the dialog away from the menu item that > initiated it. > > Fix: > Now it's possible to set the location of Dialog in JFileChooser. > > Testing: > 1. Tested in Mach5 10 times per platform(macos,linux,windows) and got all Pass. This pull request has now been integrated. Changeset: 99388eff Author: Manukumar V S Committer: Abdul Kolarkunnu URL: https://git.openjdk.java.net/jdk/commit/99388eff8da2cb3dc0bb34f05e8784795edb790e Stats: 281 lines in 1 file changed: 281 ins; 0 del; 0 mod 8283624: Create an automated regression test for RFE-4390885 Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/7996 From dholmes at openjdk.java.net Fri Apr 29 05:12:30 2022 From: dholmes at openjdk.java.net (David Holmes) Date: Fri, 29 Apr 2022 05:12:30 GMT Subject: RFR: JDK-8285730: unify _WIN32_WINNT settings In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 14:57:41 GMT, Matthias Baesken wrote: > Currently we set _WIN32_WINNT at various places in the codebase; this is used to target a minimum Windows version we want to support. See also for more detailled information : > https://docs.microsoft.com/en-us/windows/win32/winprog/using-the-windows-headers?redirectedfrom=MSDN#setting-winver-or-_win32_winnt > Macros for Conditional Declarations > "Certain functions that depend on a particular version of Windows are declared using conditional code. This enables you to use the compiler to detect whether your application uses functions that are not supported on its target version(s) of Windows." > > However currently we have quite a lot of differing settings of _WIN32_WINNT in the codebase ; setting _WIN32_WINNT to 0x0601 (Windows 7) where possible would make sense because we have this setting already at java_props_md.c (so targeting older Windows versions at other places is most likely not useful). That only seems to be half of the issue though. If we are defining _WIN32_WINNT=0x0601 because the minimum required OS API support level is Windows 7, then don't we need a check that the build platform is also at least Windows 7? ------------- PR: https://git.openjdk.java.net/jdk/pull/8428 From serb at openjdk.java.net Fri Apr 29 05:57:39 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 29 Apr 2022 05:57:39 GMT Subject: Integrated: 8264666: Change implementation of safeAdd/safeMult 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: > Description of the new version of the fix: > While I have worked on this change and tried to consider the comments, I have found that the usages of the "safeAdd/safeMult" in the LCMSImageLayout class are incorrect. Both methods are based on the "Math" versions but throw a different exception. The problem is that its implementation may accept the negative values during intermediate calculation, see the old implementation of "[verify](https://github.com/openjdk/jdk/blob/139615b1815d4afd3593536d83fa8b25430f35e7/src/java.desktop/share/classes/sun/java2d/cmm/lcms/LCMSImageLayout.java#L343)" method: > 1. We check the "offset" value: 0 <= offset < dataArrayLength > 2. We do some intermediate calculations that "accept" negative values > 3. We check the final "off" value: 0 <= offset < dataArrayLength > > I wondered is it possible to provide some data that using wrong/negative data at step2 may result in the correct check at step3. I spent some time and was able to reproduce the problem with the attached test case. Note that the test is a little bit cryptic since it is not possible to reproduce it by input image data. > > Note: I have removed all cleanup from the fix, to make it simpler. > > <======> > Description of the old version of the fix: > - The hand-crafted methods for addition and multiplication are replaced by the "Math" versions. > - Cleanup: the usage of do/while(false) is removed This pull request has now been integrated. Changeset: 40f19c01 Author: Sergey Bylokhov URL: https://git.openjdk.java.net/jdk/commit/40f19c014fed37b09db409cb9507f68f5011f139 Stats: 195 lines in 2 files changed: 169 ins; 15 del; 11 mod 8264666: Change implementation of safeAdd/safeMult in the LCMSImageLayout class Reviewed-by: prr ------------- PR: https://git.openjdk.java.net/jdk/pull/3333 From serb at openjdk.java.net Fri Apr 29 06:01:32 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Fri, 29 Apr 2022 06:01:32 GMT Subject: RFR: 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java [v3] In-Reply-To: <8bNWtvXyvA_PP2JTHxp9q7GnO2MgRDmdA7rycRApC5U=.150a085a-0161-4cd4-9979-5818b485218f@github.com> References: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> <8bNWtvXyvA_PP2JTHxp9q7GnO2MgRDmdA7rycRApC5U=.150a085a-0161-4cd4-9979-5818b485218f@github.com> Message-ID: On Fri, 29 Apr 2022 00:41:50 GMT, Sergey Bylokhov wrote: >> lawrence.andrews 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 'openjdk:master' into JDK-8285687 >> - Added @key printer since this test needs printer >> - 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java > > Since the test now uses the printer keyword I doubt that it should pass silently if the printer is not installed. > @mrserb, run the test on Ubuntu 20.04 where printer is not configured and test passes as shown in the jtreg jtr file That's my point, why does the manual test for the printer silently pass if the printer is not installed. ------------- PR: https://git.openjdk.java.net/jdk/pull/8412 From jdv at openjdk.java.net Fri Apr 29 06:38:35 2022 From: jdv at openjdk.java.net (Jayathirth D V) Date: Fri, 29 Apr 2022 06:38:35 GMT Subject: RFR: 8285686: Upgrade to FreeType 2.12.0 In-Reply-To: References: Message-ID: <2tTvQER8Mr4l6KPHUTTPYl1BfzB3LfcbqbJD2TWT4-c=.6e5b24c7-c1c6-4627-885b-31d0a845bc78@github.com> On Thu, 28 Apr 2022 19:41:46 GMT, Phil Race wrote: > This upgrades the JDK from using freetype 2.10.4 to 2.12.0 > Automated tests pass, manual testing looks fine. > --with-freetype=bundled was used to make sure it is OK on Linux builds. Marked as reviewed by jdv (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8456 From mbaesken at openjdk.java.net Fri Apr 29 07:05:40 2022 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Fri, 29 Apr 2022 07:05:40 GMT Subject: RFR: JDK-8285730: unify _WIN32_WINNT settings In-Reply-To: References: Message-ID: On Fri, 29 Apr 2022 05:09:35 GMT, David Holmes wrote: > That only seems to be half of the issue though. If we are defining _WIN32_WINNT=0x0601 because the minimum required OS API support level is Windows 7, then don't we need a check that the build platform is also at least Windows 7? Hi David, on older OS than Windows 7 we wouldn't be able to build OJDK anyway currently. Our oldest VS we still support (see toolchain_microsoft.m4) is VS2017. VS2017 has the following system requirements https://docs.microsoft.com/en-us/visualstudio/releases/2017/vs2017-system-requirements-vs see supported OS , there the oldest supported OS is Windows Server 2012 R2 and Windows 7 SP1. So on older than Win7 we would not even have a compiler anymore that passes configure. ------------- PR: https://git.openjdk.java.net/jdk/pull/8428 From mvs at openjdk.java.net Fri Apr 29 08:23:12 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 29 Apr 2022 08:23:12 GMT Subject: RFR: 8274597: Some of the dnd tests time out and fail intermittently [v5] In-Reply-To: References: Message-ID: > These dnd tests fails with a time out intermittently in some machines(mostly Windows 11) which creates frequent noise in CI. > 1. java/awt/dnd/AcceptDropMultipleTimes/AcceptDropMultipleTimes.java > 2. java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java > 3. java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java > 4. java/awt/dnd/MissingDragExitEventTest/MissingDragExitEventTest.java > > Issue : > This doesn't seem to be a deadlock. When there is no sufficient delay after the mouse release(dragged mouse pointer release to drop the content), the frame is getting disposed even before the drop() method gets called. So it waits for the drop() method which will never happen as the frame has been already disposed and the test times out after some time. > > Fix: > Waiting for the drop() method to get called before disposing the frame. > > Testing: > 1. All the four tests are run 10 times per platform and got all pass > 2. All the four tests are run 10 times on Windows 11 and got all pass Manukumar V S has updated the pull request incrementally with one additional commit since the last revision: Some more stabilization: f.getLocationOnScreen() in EDT,frame made undecoratedand moved to center,added captureScreen when test fails ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8316/files - new: https://git.openjdk.java.net/jdk/pull/8316/files/fae1d36a..f55b4707 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8316&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8316&range=03-04 Stats: 67 lines in 2 files changed: 50 ins; 3 del; 14 mod Patch: https://git.openjdk.java.net/jdk/pull/8316.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8316/head:pull/8316 PR: https://git.openjdk.java.net/jdk/pull/8316 From prappo at openjdk.java.net Fri Apr 29 08:48:52 2022 From: prappo at openjdk.java.net (Pavel Rappo) Date: Fri, 29 Apr 2022 08:48:52 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v5] In-Reply-To: <-4fsP7Oz2b5SHJR3uPUb7dPXo8cVPj0lXNnCDAKgWGA=.7ab1337e-2e75-4dc9-85d8-fb9734ea598c@github.com> References: <6vk2LFoiOweHKGiEQxkUjpj9opax4Tj2W0twvjt_BKY=.12784626-14d8-4f2a-9df7-7b7c2c843e6b@github.com> <-4fsP7Oz2b5SHJR3uPUb7dPXo8cVPj0lXNnCDAKgWGA=.7ab1337e-2e75-4dc9-85d8-fb9734ea598c@github.com> Message-ID: On Thu, 28 Apr 2022 19:06:04 GMT, Mandy Chung wrote: >> src/java.base/share/classes/java/lang/ref/PhantomReference.java line 48: >> >>> 46: * The {@link #refersTo(Object) refersTo} method can be used to test >>> 47: * whether some object is the referent of a phantom reference. >>> 48: * @param the type of the referent >> >> Shouldn't there be a space after `@param` ? > > Good catch. Sorry I missed it. This occurs in all `java/lang/ref` files. > Shouldn't there be a space after `@param` ? > Good catch. Sorry I missed it. This occurs in all `java/lang/ref` files. I built the API documentation after this PR has been integrated and the result was okay. I saw this output in every such case: Type Parameters: T - the type of the referent javadoc is quite robust. However, for some IDEs such missing whitespace seems significant. Not only do they highlight the `@param` tag, but the type parameter information is missing from the rendered output. Although it's not critical, we should fix it; I have filed JDK-8285890. ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From prappo at openjdk.java.net Fri Apr 29 09:09:50 2022 From: prappo at openjdk.java.net (Pavel Rappo) Date: Fri, 29 Apr 2022 09:09:50 GMT Subject: RFR: JDK-8285676: Add missing @param tags for type parameters on classes and interfaces [v5] In-Reply-To: References: <6vk2LFoiOweHKGiEQxkUjpj9opax4Tj2W0twvjt_BKY=.12784626-14d8-4f2a-9df7-7b7c2c843e6b@github.com> <-4fsP7Oz2b5SHJR3uPUb7dPXo8cVPj0lXNnCDAKgWGA=.7ab1337e-2e75-4dc9-85d8-fb9734ea598c@github.com> Message-ID: On Fri, 29 Apr 2022 08:45:42 GMT, Pavel Rappo wrote: > Good catch. Sorry I missed it. This occurs in all `java/lang/ref` files. I've created a PR; feel free to review it at your convenience. ------------- PR: https://git.openjdk.java.net/jdk/pull/8410 From mvs at openjdk.java.net Fri Apr 29 10:37:43 2022 From: mvs at openjdk.java.net (Manukumar V S) Date: Fri, 29 Apr 2022 10:37:43 GMT Subject: Integrated: 8274597: Some of the dnd tests time out and fail intermittently In-Reply-To: References: Message-ID: <4jMQ1O6S4XJiMzgqYs4_O02HKXDj-fWU6DVrXxheWbM=.2e166c0d-5f26-4d49-9839-ac10593f00da@github.com> On Wed, 20 Apr 2022 13:03:48 GMT, Manukumar V S wrote: > These dnd tests fails with a time out intermittently in some machines(mostly Windows 11) which creates frequent noise in CI. > 1. java/awt/dnd/AcceptDropMultipleTimes/AcceptDropMultipleTimes.java > 2. java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java > 3. java/awt/dnd/DropTargetEnterExitTest/ExtraDragEnterTest.java > 4. java/awt/dnd/MissingDragExitEventTest/MissingDragExitEventTest.java > > Issue : > This doesn't seem to be a deadlock. When there is no sufficient delay after the mouse release(dragged mouse pointer release to drop the content), the frame is getting disposed even before the drop() method gets called. So it waits for the drop() method which will never happen as the frame has been already disposed and the test times out after some time. > > Fix: > Waiting for the drop() method to get called before disposing the frame. > > Testing: > 1. All the four tests are run 10 times per platform and got all pass > 2. All the four tests are run 10 times on Windows 11 and got all pass This pull request has now been integrated. Changeset: 669ac611 Author: Manukumar V S Committer: Abdul Kolarkunnu URL: https://git.openjdk.java.net/jdk/commit/669ac611b269bbda5c53d84173e5c9d0eb4ce919 Stats: 159 lines in 4 files changed: 107 ins; 12 del; 40 mod 8274597: Some of the dnd tests time out and fail intermittently 8028998: [TEST_BUG] [macosx] java/awt/dnd/DropTargetEnterExitTest/MissedDragExitTest.java failed Reviewed-by: serb ------------- PR: https://git.openjdk.java.net/jdk/pull/8316 From zgu at openjdk.java.net Fri Apr 29 12:43:41 2022 From: zgu at openjdk.java.net (Zhengyu Gu) Date: Fri, 29 Apr 2022 12:43:41 GMT Subject: RFR: 8284680: sun.font.FontConfigManager.getFontConfig() leaks charset [v2] In-Reply-To: References: Message-ID: <2fPQGLdkv7f9ThHEpS9RleMYUPHhBMK6GHGFJ0mnwbQ=.df2d6df8-6e4e-4ef4-93db-6e13bf369ea3@github.com> > Please review this small patch that releases temporary charsets to avoid memory leak. > > Test: > > - [x] jdk_2d Zhengyu Gu has updated the pull request incrementally with one additional commit since the last revision: Andrew's comment ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8187/files - new: https://git.openjdk.java.net/jdk/pull/8187/files/ce50c4e9..92ed6a78 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8187&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8187&range=00-01 Stats: 11 lines in 1 file changed: 7 ins; 1 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/8187.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8187/head:pull/8187 PR: https://git.openjdk.java.net/jdk/pull/8187 From smandalika at openjdk.java.net Fri Apr 29 14:11:41 2022 From: smandalika at openjdk.java.net (Srinivas Mandalika) Date: Fri, 29 Apr 2022 14:11:41 GMT Subject: RFR: 8285373: Create an automated test for JDK-4702233 [v2] In-Reply-To: References: Message-ID: > Create an automated test for [JDK-4702233](https://bugs.openjdk.java.net/browse/JDK-4702233) > > Several new AccessibleRole and AccessibleRelation constants are needed in those classes in the java.accessibility package. These new contants codify additions made in the GNOME, Netscape, and UNO (StarOffice) accessibility APIs. > StarOffice 6.1 and GNOME accessibility require new role, state and relation > constants in the javax.accessibility package. The existing constants are > inadequate for providing accessibility to StarOffice and GNOME applications > as required by Section 508. > > Solution > -------- > Define new constants in the javax.accessibility package. > AccessibleRelation > AccessibleRoles > AccessibleState > AccessibleAction > AccessibleContext > > The test validates the public fields of the above AccessibleConstants. > > This review is for migrating tests from a closed test suite to open. > > Testing: > The test ran successfully on Mach5 with multiple runs (30) on windows-x64, linux-x64 and macos-x64. Srinivas Mandalika has updated the pull request incrementally with one additional commit since the last revision: Added missing CopyRight Header ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8342/files - new: https://git.openjdk.java.net/jdk/pull/8342/files/4e20fbc6..7715eb83 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8342&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8342&range=00-01 Stats: 32 lines in 1 file changed: 29 ins; 1 del; 2 mod Patch: https://git.openjdk.java.net/jdk/pull/8342.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8342/head:pull/8342 PR: https://git.openjdk.java.net/jdk/pull/8342 From prr at openjdk.java.net Fri Apr 29 16:43:48 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 29 Apr 2022 16:43:48 GMT Subject: Integrated: 8285686: Upgrade to FreeType 2.12.0 In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 19:41:46 GMT, Phil Race wrote: > This upgrades the JDK from using freetype 2.10.4 to 2.12.0 > Automated tests pass, manual testing looks fine. > --with-freetype=bundled was used to make sure it is OK on Linux builds. This pull request has now been integrated. Changeset: 67dd8a8d Author: Phil Race URL: https://git.openjdk.java.net/jdk/commit/67dd8a8d6a3f069f11d8e1492a775892f1f49829 Stats: 10933 lines in 293 files changed: 6807 ins; 2146 del; 1980 mod 8285686: Upgrade to FreeType 2.12.0 Reviewed-by: serb, jdv ------------- PR: https://git.openjdk.java.net/jdk/pull/8456 From prr at openjdk.java.net Fri Apr 29 16:54:45 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 29 Apr 2022 16:54:45 GMT Subject: RFR: 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java [v3] In-Reply-To: References: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> Message-ID: On Thu, 28 Apr 2022 22:29:51 GMT, lawrence.andrews wrote: >> 1) Fixed Parser error by removing yesno from @run main/manual=yesno >> 2) Used PassFaileJFrame to show the test instruction to the user instead of printing the test instruction on the console or jtreg log file. >> 3) If printer is not configured then mark the test as passed. >> >> @shurymury >> @aivanov-jdk > > lawrence.andrews 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 'openjdk:master' into JDK-8285687 > - Added @key printer since this test needs printer > - 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java One thing we could start to do is use jtreg.SkippedException - which you define yourself. It is a "special" in that jtreg recognises it as meaning a test was skipped due to some reason that could not/was not determined before running. The test passes but with a special message so you know it didn't really run the test. https://openjdk.java.net/jtreg/faq.html#what-if-a-test-does-not-apply-in-a-given-situation For manual tests it might be good to change PassFailJFrame to be able to put up a special message to the user in such a case and disable "fail" .. ------------- PR: https://git.openjdk.java.net/jdk/pull/8412 From prr at openjdk.java.net Fri Apr 29 16:57:43 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 29 Apr 2022 16:57:43 GMT Subject: RFR: 8254759: [TEST_BUG] [macosx] javax/swing/JInternalFrame/4202966/IntFrameCoord.html fails In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 09:11:19 GMT, DamonGuy wrote: > Closed repo test fix from the test sprint. This test was approved in the closed repo and has been converted to an open repo test. > > This test checks if the coordinates are still correct after changing focuses between different JInternalFrames. The test is now automated instead of manual like the previous, closed version. This needs to be a headful test to allow robot to click on the different frames and to check coordinates. > > The issue was that in MacOS, the button wouldn't appear at a normal size. To fix this, the bounds have been increased to allow the button to be fully visible with the designated frame sizes on all L&Fs. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8444 From prr at openjdk.java.net Fri Apr 29 17:03:43 2022 From: prr at openjdk.java.net (Phil Race) Date: Fri, 29 Apr 2022 17:03:43 GMT Subject: RFR: JDK-8282772: JButton text set as HTML content has unwanted padding [v2] In-Reply-To: References: Message-ID: On Wed, 27 Apr 2022 18:52:46 GMT, DamonGuy wrote: >> The insets for buttons were incorrect for L&Fs except for Aqua when the text is set to HTML. This was fixed in Aqua by adding a conditional to check for the BasicHTML property key in the button component. This same logic can be used to fix Metal & Motif L&Fs in BasicButtonUI, but Nimbus is not fixed by this. Nimbus gets its default values from a skin.laf file, and when the defaults here are set to have left & right insets to 0 for ButtonUI, the issue is fixed. I also tested for non-HTML text after the changes, and the changes do not affect normal text. >> >> The HtmlButtonImageTest has been changed to cycle through all L&Fs available on a device. > > DamonGuy has updated the pull request incrementally with one additional commit since the last revision: > > Changed approach to fix. Marked as reviewed by prr (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8407 From duke at openjdk.java.net Fri Apr 29 17:21:53 2022 From: duke at openjdk.java.net (DamonGuy) Date: Fri, 29 Apr 2022 17:21:53 GMT Subject: RFR: 8254759: [TEST_BUG] [macosx] javax/swing/JInternalFrame/4202966/IntFrameCoord.html fails In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 22:42:33 GMT, Sergey Bylokhov wrote: > Please confirm that the mach5 is green for the few iterations. I ran the test locally 50 times and it all passed. I also ran the test in mach5 with repeats and it all passed as well. Added results to JBS. ------------- PR: https://git.openjdk.java.net/jdk/pull/8444 From kizune at openjdk.java.net Fri Apr 29 18:55:37 2022 From: kizune at openjdk.java.net (Alexander Zuev) Date: Fri, 29 Apr 2022 18:55:37 GMT Subject: RFR: 8254759: [TEST_BUG] [macosx] javax/swing/JInternalFrame/4202966/IntFrameCoord.html fails In-Reply-To: References: Message-ID: <2lbnqK6QLGqDhIDSAmWHdadVQh-WXxIMy7FlVpiRXQg=.4b6821e8-6a36-4bb8-a6e2-6a5105426f1e@github.com> On Thu, 28 Apr 2022 09:11:19 GMT, DamonGuy wrote: > Closed repo test fix from the test sprint. This test was approved in the closed repo and has been converted to an open repo test. > > This test checks if the coordinates are still correct after changing focuses between different JInternalFrames. The test is now automated instead of manual like the previous, closed version. This needs to be a headful test to allow robot to click on the different frames and to check coordinates. > > The issue was that in MacOS, the button wouldn't appear at a normal size. To fix this, the bounds have been increased to allow the button to be fully visible with the designated frame sizes on all L&Fs. Marked as reviewed by kizune (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8444 From duke at openjdk.java.net Fri Apr 29 20:26:23 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Fri, 29 Apr 2022 20:26:23 GMT Subject: RFR: 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java [v4] In-Reply-To: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> References: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> Message-ID: <92Ifw18mxDgktPFDLpsnC743RLYog6CxXVcQC3rMlHo=.973c3c8e-a531-430e-a714-5c3b870cb4f0@github.com> > 1) Fixed Parser error by removing yesno from @run main/manual=yesno > 2) Used PassFaileJFrame to show the test instruction to the user instead of printing the test instruction on the console or jtreg log file. > 3) If printer is not configured then mark the test as passed. > > @shurymury > @aivanov-jdk lawrence.andrews 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: - Merge branch 'openjdk:master' into JDK-8285687 - Merge branch 'openjdk:master' into JDK-8285687 - Added @key printer since this test needs printer - 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8412/files - new: https://git.openjdk.java.net/jdk/pull/8412/files/4655a27a..446292ac Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8412&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8412&range=02-03 Stats: 13123 lines in 362 files changed: 8418 ins; 2471 del; 2234 mod Patch: https://git.openjdk.java.net/jdk/pull/8412.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8412/head:pull/8412 PR: https://git.openjdk.java.net/jdk/pull/8412 From duke at openjdk.java.net Fri Apr 29 20:30:53 2022 From: duke at openjdk.java.net (DamonGuy) Date: Fri, 29 Apr 2022 20:30:53 GMT Subject: Integrated: 8254759: [TEST_BUG] [macosx] javax/swing/JInternalFrame/4202966/IntFrameCoord.html fails In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 09:11:19 GMT, DamonGuy wrote: > Closed repo test fix from the test sprint. This test was approved in the closed repo and has been converted to an open repo test. > > This test checks if the coordinates are still correct after changing focuses between different JInternalFrames. The test is now automated instead of manual like the previous, closed version. This needs to be a headful test to allow robot to click on the different frames and to check coordinates. > > The issue was that in MacOS, the button wouldn't appear at a normal size. To fix this, the bounds have been increased to allow the button to be fully visible with the designated frame sizes on all L&Fs. This pull request has now been integrated. Changeset: 2dd882af Author: Damon Nguyen Committer: Phil Race URL: https://git.openjdk.java.net/jdk/commit/2dd882af0830f174810840affa79045db4f04ef0 Stats: 145 lines in 1 file changed: 145 ins; 0 del; 0 mod 8254759: [TEST_BUG] [macosx] javax/swing/JInternalFrame/4202966/IntFrameCoord.html fails Reviewed-by: prr, kizune ------------- PR: https://git.openjdk.java.net/jdk/pull/8444 From duke at openjdk.java.net Fri Apr 29 20:37:30 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Fri, 29 Apr 2022 20:37:30 GMT Subject: RFR: 8285687 : Remove jtreg tag manual=yesno for ava/awt/print/PrinterJob/PageRangesDlgTest.java [v5] In-Reply-To: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> References: <2idh0qf39qyWBz8CH620Sobt-sulmfTt5UH6s2hbHVI=.8df8e571-079e-4314-9cab-20ea23f0dc31@github.com> Message-ID: > 1) Fixed Parser error by removing yesno from @run main/manual=yesno > 2) Used PassFaileJFrame to show the test instruction to the user instead of printing the test instruction on the console or jtreg log file. > 3) If printer is not configured then mark the test as passed. > > @shurymury > @aivanov-jdk lawrence.andrews has updated the pull request incrementally with two additional commits since the last revision: - Added jtreg.SkippedException - Added jtreg.SkippedException ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8412/files - new: https://git.openjdk.java.net/jdk/pull/8412/files/446292ac..44f8aee3 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8412&range=04 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8412&range=03-04 Stats: 44 lines in 2 files changed: 42 ins; 1 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8412.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8412/head:pull/8412 PR: https://git.openjdk.java.net/jdk/pull/8412 From duke at openjdk.java.net Fri Apr 29 22:48:00 2022 From: duke at openjdk.java.net (lawrence.andrews) Date: Fri, 29 Apr 2022 22:48:00 GMT Subject: RFR: 8285867 : Convert applet manual tests SelectionVisible.java to Frame and automate Message-ID: 1) Removed Applet dependent code and used Frame as top level. 2) Automated the manual test. @shurymury ------------- Commit messages: - 8285867 : Convert applet manual tests SelectionVisible.java to Frame and automate Changes: https://git.openjdk.java.net/jdk/pull/8477/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8477&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285867 Stats: 212 lines in 4 files changed: 71 ins; 116 del; 25 mod Patch: https://git.openjdk.java.net/jdk/pull/8477.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8477/head:pull/8477 PR: https://git.openjdk.java.net/jdk/pull/8477 From serb at openjdk.java.net Sat Apr 30 02:52:44 2022 From: serb at openjdk.java.net (Sergey Bylokhov) Date: Sat, 30 Apr 2022 02:52:44 GMT Subject: RFR: 8254759: [TEST_BUG] [macosx] javax/swing/JInternalFrame/4202966/IntFrameCoord.html fails In-Reply-To: References: Message-ID: On Thu, 28 Apr 2022 09:11:19 GMT, DamonGuy wrote: > Closed repo test fix from the test sprint. This test was approved in the closed repo and has been converted to an open repo test. > > This test checks if the coordinates are still correct after changing focuses between different JInternalFrames. The test is now automated instead of manual like the previous, closed version. This needs to be a headful test to allow robot to click on the different frames and to check coordinates. > > The issue was that in MacOS, the button wouldn't appear at a normal size. To fix this, the bounds have been increased to allow the button to be fully visible with the designated frame sizes on all L&Fs. test/jdk/javax/swing/JInternalFrame/4202966/IntFrameCoord.java line 77: > 75: }; > 76: > 77: b.addMouseListener(mouseListener); Note that b/if1/if2 are Swing components and should be accessed on the EDT ------------- PR: https://git.openjdk.java.net/jdk/pull/8444