client-libs-dev@openjdk.java.net

2022-05-23 Thread Tejesh R
_Header_ object not initialized/set when paint() method of `WindowTableHeaderUI` class is executed. The paint() event is executed through explicit call of `JTable.updateUI()` in the regression test. In order to set the _header_ to the _called_ JTable, it is set in the `getTableCellRendererCompo

Re: RFR: 8287102: ImageReaderSpi.canDecodeInput() for standard plugins should return false if a stream is too short [v2]

2022-05-23 Thread Martin Desruisseaux
> Invoking `ImageReaderSpi.canDecodeInput(Object)` with a stream having less > than 8 bytes causes an `EOFException` to be thrown instead of returning > `false`. This is caused by BMP, WBMP, GIF, PNG and TIFF reader > implementations assuming that those bytes always exist and not checking EOF >

Re: RFR: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box [v2]

2022-05-23 Thread Jeremy
On Sun, 22 May 2022 17:57:27 GMT, Jeremy wrote: >> This resolves an occasional unit test failure in Path2D.UnitTest. >> >> The previous Path2D#getBounds2D(PathIterator) implementation assumed that >> after a SEG_CLOSE the next segment would always be a SEG_MOVETO to start a >> new clearly defi

RFR: 8287148: Avoid redundant HashMap.containsKey calls in ExtendedKeyCodes.getExtendedKeyCodeForChar

2022-05-23 Thread Andrey Turbanov
`sun.awt.ExtendedKeyCodes#regularKeyCodesMap` contains only non-null values. It means we can replace containsKey+get with get+null check. It's clearer and a bit faster. - Commit messages: - [PATCH] Avoid redundant HashMap.containsKey calls in ExtendedKeyCodes Changes: https://git.o

Re: RFR: 8244681: Add a warning for possibly lossy conversion in compound assignments [v9]

2022-05-23 Thread Adam Sotona
> Please review this patch adding new lint option, **lossy-conversions**, to > javac to warn about type casts in compound assignments with possible lossy > conversions. > > The new lint warning is shown if the type of the right-hand operand of a > compound assignment is not assignment compatibl

Re: RFR: 8244681: Add a warning for possibly lossy conversion in compound assignments [v10]

2022-05-23 Thread Adam Sotona
> Please review this patch adding new lint option, **lossy-conversions**, to > javac to warn about type casts in compound assignments with possible lossy > conversions. > > The new lint warning is shown if the type of the right-hand operand of a > compound assignment is not assignment compatibl

Re: JDK-8274735, JPEG compression in a TIFF container, openjdk/jdk/pull/7849

2022-05-23 Thread Michal Karm
Thanks for taking the time to explain it. Inline... On 5/20/22 19:50, Philip Race wrote: Identifying the intended color space of a JPEG is so much guesswork .. and we've not had support for ARGB since JDK 10 which was the last release to contain the Sun/Oracle "closed" support for that (from K

RFR: JDK-8225013: sanity/client/SwingSet/src/ScrollPaneDemoTest.java fails on Linux

2022-05-23 Thread Alexandre Iline
Before the fix the test was failing around 1 time in fifty runs. After the fix the test did not fail in ~ 1k runs. Additional instrumentation is added to save useful information on the UI state, should the failure happen again. - Commit messages: - A public method to capture the wh

Re: RFR: JDK-8225013: sanity/client/SwingSet/src/ScrollPaneDemoTest.java fails on Linux

2022-05-23 Thread Alexandre Iline
On Mon, 23 May 2022 16:25:37 GMT, Alexandre Iline wrote: > Before the fix the test was failing around 1 time in fifty runs. After the > fix the test did not fail in ~ 1k runs. > Additional instrumentation is added to save useful information on the UI > state, should the failure happen again.

Re: RFR: JDK-8225013: sanity/client/SwingSet/src/ScrollPaneDemoTest.java fails on Linux

2022-05-23 Thread Phil Race
On Mon, 23 May 2022 16:25:37 GMT, Alexandre Iline wrote: > Before the fix the test was failing around 1 time in fifty runs. After the > fix the test did not fail in ~ 1k runs. > Additional instrumentation is added to save useful information on the UI > state, should the failure happen again.

RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray

2022-05-23 Thread Alexey Ivanov
**WTrayIconPeer**: removed duplicate call to `popupParent.dispose()` that might cause NPE (it looks `popupParent` cannot be `null`); organised imports. **SystemTray**: removed redundant initialisers; replaced sized array with empty array in `toArray` call; dropped `newValue != null` chained with

Re: RFR: JDK-8282778: Create a regression test for JDK-4699544 [v5]

2022-05-23 Thread Alexander Zuev
On Wed, 18 May 2022 10:04:53 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.Accessib

Re: RFR: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box [v2]

2022-05-23 Thread Phil Race
On Sun, 22 May 2022 17:57:27 GMT, Jeremy wrote: >> This resolves an occasional unit test failure in Path2D.UnitTest. >> >> The previous Path2D#getBounds2D(PathIterator) implementation assumed that >> after a SEG_CLOSE the next segment would always be a SEG_MOVETO to start a >> new clearly defi

Re: RFR: JDK-8282777: Create a Regression test for JDK-4515031 [v4]

2022-05-23 Thread Alexander Zuev
On Wed, 18 May 2022 10:09:30 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 verif

Re: RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray

2022-05-23 Thread Phil Race
On Mon, 23 May 2022 16:43:05 GMT, Alexey Ivanov wrote: > **WTrayIconPeer**: removed duplicate call to `popupParent.dispose()` that > might cause NPE (it looks `popupParent` cannot be `null`); organised imports. > > **SystemTray**: removed redundant initialisers; replaced sized array with > emp

Re: RFR: 8282771 : Create test case for JDK-8262981 [v4]

2022-05-23 Thread Alexander Zuev
On Tue, 22 Mar 2022 15:14:34 GMT, lawrence.andrews wrote: >> Following methods are covered in this testcase >> getAccessibleAction() >> getAccessibleActionCount() >> doAccessibleAction(int direction) >> >> @shurymury > > lawrence.andrews has updated the pull request incrementally with one > a

Re: RFR: 8276266: Clean up incorrect client-libs ProblemList.txt entries [v2]

2022-05-23 Thread Alexander Zuev
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/Cho

Re: RFR: 8286172: Create an automated test for JDK-4516019 [v2]

2022-05-23 Thread Alisen Chung
On Tue, 17 May 2022 12:36:04 GMT, Srinivas Mandalika wrote: >> Create an automated test for >> [JDK-4516019](https://bugs.openjdk.java.net/browse/JDK-4516019) >> >> Clicking on the increment/decrement buttons of the spinner does not install >> focus on the spinner or one of its focusable chil

Re: RFR: JDK-8225013: sanity/client/SwingSet/src/ScrollPaneDemoTest.java fails on Linux

2022-05-23 Thread Alexandre Iline
On Mon, 23 May 2022 16:45:09 GMT, Phil Race wrote: > Can you explain both the problem and the solution ? >From what I have observed, the test starts before the window is painted. The >window is basically gray. My hypothesis is then that it takes time to load the >background image and the test

Re: RFR: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box [v2]

2022-05-23 Thread Jeremy
On Sun, 22 May 2022 17:57:27 GMT, Jeremy wrote: >> This resolves an occasional unit test failure in Path2D.UnitTest. >> >> The previous Path2D#getBounds2D(PathIterator) implementation assumed that >> after a SEG_CLOSE the next segment would always be a SEG_MOVETO to start a >> new clearly defi

Re: RFR: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box [v2]

2022-05-23 Thread Phil Race
On Sun, 22 May 2022 17:57:27 GMT, Jeremy wrote: >> This resolves an occasional unit test failure in Path2D.UnitTest. >> >> The previous Path2D#getBounds2D(PathIterator) implementation assumed that >> after a SEG_CLOSE the next segment would always be a SEG_MOVETO to start a >> new clearly defi

Re: RFR: 8176501: Method Shape.getBounds2D() incorrectly includes Bezier control points in bounding box [v2]

2022-05-23 Thread Phil Race
On Sun, 22 May 2022 17:57:27 GMT, Jeremy wrote: >> This resolves an occasional unit test failure in Path2D.UnitTest. >> >> The previous Path2D#getBounds2D(PathIterator) implementation assumed that >> after a SEG_CLOSE the next segment would always be a SEG_MOVETO to start a >> new clearly defi

Re: RFR: JDK-8225013: sanity/client/SwingSet/src/ScrollPaneDemoTest.java fails on Linux [v2]

2022-05-23 Thread Alexandre Iline
> Before the fix the test was failing around 1 time in fifty runs. After the > fix the test did not fail in ~ 1k runs. > Additional instrumentation is added to save useful information on the UI > state, should the failure happen again. Alexandre Iline has updated the pull request incrementally w

Re: RFR: JDK-8225013: sanity/client/SwingSet/src/ScrollPaneDemoTest.java fails on Linux [v2]

2022-05-23 Thread lawrence . andrews
On Mon, 23 May 2022 18:00:39 GMT, Alexandre Iline wrote: >> Before the fix the test was failing around 1 time in fifty runs. After the >> fix the test did not fail in ~ 1k runs. >> Additional instrumentation is added to save useful information on the UI >> state, should the failure happen agai

Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults

2022-05-23 Thread Roger Riggs
On Tue, 10 May 2022 19:24:24 GMT, Mark Powers wrote: >> src/java.base/share/classes/java/lang/reflect/AccessibleObject.java line 777: >> >>> 775: if (!printStackPropertiesSet && VM.initLevel() >= 1) { >>> 776: printStackWhenAccessFails = GetBooleanAction. >>> 777:

Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults [v2]

2022-05-23 Thread Mark Powers
> JDK-6725221 Standardize obtaining boolean properties with defaults Mark Powers has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains six commits: - Alan and Jamil comments - Merge - reverse true.equals and false.equals changes - Merge

Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults [v2]

2022-05-23 Thread Mark Powers
On Mon, 23 May 2022 18:34:41 GMT, Roger Riggs wrote: >> You are right. The old way maps the null string to true, and the new way >> maps it to false. I did not notice that. At this point, I see no value in >> making the "true".equals and "false".equals changes. Too much can break. >> I'll reve

Re: RFR: 8284690: [macos] VoiceOver : Getting java.lang.IllegalArgumentException: Invalid location on Editable JComboBox

2022-05-23 Thread Victor Dyakov
On Fri, 20 May 2022 21:13:35 GMT, Alexander Zuev wrote: > Check for the available range on the document model and adjust text range > request accordingly. @prsadhuk please review - PR: https://git.openjdk.java.net/jdk/pull/8820

Re: RFR: JDK-6725221 Standardize obtaining boolean properties with defaults [v2]

2022-05-23 Thread Roger Riggs
On Mon, 23 May 2022 18:58:34 GMT, Mark Powers wrote: >> JDK-6725221 Standardize obtaining boolean properties with defaults > > Mark Powers has updated the pull request with a new target base due to a > merge or a rebase. The pull request now contains six commits: > > - Alan and Jamil comments

Re: RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray

2022-05-23 Thread Sergey Bylokhov
On Mon, 23 May 2022 17:18:17 GMT, Phil Race wrote: >> **WTrayIconPeer**: removed duplicate call to `popupParent.dispose()` that >> might cause NPE (it looks `popupParent` cannot be `null`); organised imports. >> >> **SystemTray**: removed redundant initialisers; replaced sized array with >> em

Re: RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray

2022-05-23 Thread Alexey Ivanov
On Mon, 23 May 2022 20:23:08 GMT, Phil Race wrote: >> It is not intuitive but the "zero version" is actually faster: > > ok ... why ? It's explained in Aleksey Shipilёv's article https://shipilev.net/blog/2016/arrays-wisdom-ancients/#_conclusion - PR: https://git.openjdk.java.net/j

Re: RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray

2022-05-23 Thread Phil Race
On Mon, 23 May 2022 20:15:12 GMT, Sergey Bylokhov wrote: >> src/java.desktop/share/classes/java/awt/SystemTray.java line 349: >> >>> 347: if (icons != null) { >>> 348: return icons.toArray(new TrayIcon[0]); >>> 349: } >> >> Actually, the old code is more efficient th

Re: RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray

2022-05-23 Thread Alexey Ivanov
On Mon, 23 May 2022 20:24:52 GMT, Alexey Ivanov wrote: >> ok ... why ? > > It's explained in Aleksey Shipilёv's article > https://shipilev.net/blog/2016/arrays-wisdom-ancients/#_conclusion In fact, there's no need to create zero-sized array, there's one already: `EMPTY_TRAY_ARRAY`. Yet the cod

Re: RFR: 8286786: [macos] javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java still fails

2022-05-23 Thread Damon Nguyen
On Fri, 20 May 2022 09:07:29 GMT, Prasanta Sadhukhan wrote: > In PR#[8380](https://github.com/openjdk/jdk/pull/8380) we have reduced the > error tolerance from 25 to 1 so no need of exact color check which is causing > failure in specific M1 iMac system because of minimalistic color difference

Re: RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray

2022-05-23 Thread Sergey Bylokhov
On Mon, 23 May 2022 20:28:30 GMT, Alexey Ivanov wrote: >> It's explained in Aleksey Shipilёv's article >> https://shipilev.net/blog/2016/arrays-wisdom-ancients/ >> >> In short, zero-sized array avoids the need for JVM to zero all array >> elements before they're overwritten with real values. On

Re: RFR: JDK-8225013: sanity/client/SwingSet/src/ScrollPaneDemoTest.java fails on Linux [v2]

2022-05-23 Thread Phil Race
On Mon, 23 May 2022 18:00:39 GMT, Alexandre Iline wrote: >> Before the fix the test was failing around 1 time in fifty runs. After the >> fix the test did not fail in ~ 1k runs. >> Additional instrumentation is added to save useful information on the UI >> state, should the failure happen agai

Re: RFR: JDK-8225013: sanity/client/SwingSet/src/ScrollPaneDemoTest.java fails on Linux [v2]

2022-05-23 Thread Sergey Bylokhov
On Mon, 23 May 2022 18:00:39 GMT, Alexandre Iline wrote: >> Before the fix the test was failing around 1 time in fifty runs. After the >> fix the test did not fail in ~ 1k runs. >> Additional instrumentation is added to save useful information on the UI >> state, should the failure happen agai

RFR: 8286159: Memory leak in getAllConfigs of awt_GraphicsEnv.c:585

2022-05-23 Thread Phil Race
If we don't store the memory allocated for graphicsConfigs because we failed/bail, we need to free it. - Commit messages: - 8286159 Changes: https://git.openjdk.java.net/jdk/pull/8857/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8857&range=00 Issue: https://bugs.o

Re: RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray

2022-05-23 Thread Phil Race
On Mon, 23 May 2022 20:34:27 GMT, Sergey Bylokhov wrote: >> In fact, there's no need to create zero-sized array, there's one already: >> `EMPTY_TRAY_ARRAY`. >> >> Yet the code may look weird with it. >> >> >> return icons.toArray(EMPTY_TRAY_ARRAY); > > We probably can extract this to the sepa

Integrated: JDK-8225013: sanity/client/SwingSet/src/ScrollPaneDemoTest.java fails on Linux

2022-05-23 Thread Alexandre Iline
On Mon, 23 May 2022 16:25:37 GMT, Alexandre Iline wrote: > Before the fix the test was failing around 1 time in fifty runs. After the > fix the test did not fail in ~ 1k runs. > Additional instrumentation is added to save useful information on the UI > state, should the failure happen again.

Re: RFR: 8286663: Resolve IDE warnings in WTrayIconPeer and SystemTray

2022-05-23 Thread Sergey Bylokhov
On Mon, 23 May 2022 21:11:34 GMT, Phil Race wrote: >> We probably can extract this to the separate cleanup, the resulted code is >> smaller and faster. >> PS I have added a link to my previous message, accidentally hit submit >> button. > > I'm sure I've used this pattern > return icons.toArray

client-libs-dev@openjdk.java.net

2022-05-23 Thread Sergey Bylokhov
On Mon, 23 May 2022 07:03:03 GMT, Tejesh R wrote: > _Header_ object not initialized/set when paint() method of > `WindowTableHeaderUI` class is executed. The paint() event is executed > through explicit call of `JTable.updateUI()` in the regression test. In order > to set the _header_ to the _

Re: RFR: 8284690: [macos] VoiceOver : Getting java.lang.IllegalArgumentException: Invalid location on Editable JComboBox

2022-05-23 Thread Sergey Bylokhov
On Fri, 20 May 2022 21:13:35 GMT, Alexander Zuev wrote: > Check for the available range on the document model and adjust text range > request accordingly. Marked as reviewed by serb (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/8820

Re: RFR: 8282526: Default icon is not painted properly [v3]

2022-05-23 Thread Sergey Bylokhov
On Wed, 27 Apr 2022 15:41:33 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 >>

Re: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton

2022-05-23 Thread Sergey Bylokhov
On Mon, 16 May 2022 06:45:04 GMT, Tejesh R wrote: > Added test for checking setMargin() of JRadioButton. Just an idea for discussion: I remember that we added some support for the manual tests, kind of framework or something. Probably it will be useful to reuse when we add "new" tests? https:/

Re: RFR: 8282857: Create a regression test for JDK-4702690 [v4]

2022-05-23 Thread Sergey Bylokhov
On Tue, 17 May 2022 12:33:43 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

Re: RFR: 8275170: Some jtreg sound tests should be marked with sound keyword [v3]

2022-05-23 Thread Sergey Bylokhov
On Fri, 20 May 2022 22:31:38 GMT, Phil Race wrote: >> This fix adds "headful sound" keywords to a number of javax/sound jtreg tests >> >> The jtreg javax.sound tests are written in such a way that if a needed audio >> device >> or other platform resource is not available, they just exit with a

Re: RFR: JDK-8282778: Create a regression test for JDK-4699544 [v5]

2022-05-23 Thread Sergey Bylokhov
On Wed, 18 May 2022 10:04:53 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.Accessib

Re: RFR: 8286270: [java.desktop] Replace color search in XColors with a switch statement [v3]

2022-05-23 Thread Sergey Bylokhov
On Fri, 20 May 2022 00:53:27 GMT, SWinxy wrote: >> The current implementation creates ~750 new objects on load, and uses a >> binary array search with a Comparable implementation. This implementation is >> probably bad. Instead, we can use the enhanced switch feature to possibly >> save time,

Re: RFR: 8287102: ImageReaderSpi.canDecodeInput() for standard plugins should return false if a stream is too short [v2]

2022-05-23 Thread Sergey Bylokhov
On Mon, 23 May 2022 08:09:20 GMT, Martin Desruisseaux wrote: >> Invoking `ImageReaderSpi.canDecodeInput(Object)` with a stream having less >> than 8 bytes causes an `EOFException` to be thrown instead of returning >> `false`. This is caused by BMP, WBMP, GIF, PNG and TIFF reader >> implementa

client-libs-dev@openjdk.java.net

2022-05-23 Thread Tejesh R
On Tue, 24 May 2022 00:10:34 GMT, Sergey Bylokhov wrote: > Is it possible to create a new test case for this patch, or can we add @bug > to some existed one? I don't think there exist a bug for this fix, I will create a new test case for this patch. - PR: https://git.openjdk.java

Integrated: 8286786: [macos] javax/swing/JInternalFrame/8146321/JInternalFrameIconTest.java still fails

2022-05-23 Thread Prasanta Sadhukhan
On Fri, 20 May 2022 09:07:29 GMT, Prasanta Sadhukhan wrote: > In PR#[8380](https://github.com/openjdk/jdk/pull/8380) we have reduced the > error tolerance from 25 to 1 so no need of exact color check which is causing > failure in specific M1 iMac system because of minimalistic color difference

Re: RFR: 8286620: Create regression test for verifying setMargin() of JRadioButton

2022-05-23 Thread Tejesh R
On Tue, 24 May 2022 00:46:21 GMT, Sergey Bylokhov wrote: > Just an idea for discussion: I remember that we added some support for the > manual tests, kind of framework or something. Probably it will be useful to > reuse when we add "new" tests? > https://bugs.openjdk.java.net/browse/JDK-828380

Re: RFR: 6829250: Reg test: java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java fails in Windows

2022-05-23 Thread Sergey Bylokhov
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. No I mean the JDK-4976497 which was closed as duplicate of another one(as well as some ot