Re: RFR: 8081474: SwingWorker calls 'done' before the 'doInBackground' is finished [v22]

2023-02-16 Thread Prasanta Sadhukhan
> SwingWorker done() method [spec > ](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/SwingWorker.java#L452) > says "Executed on the Event Dispatch Thread after the doInBackground method > is finished" > but there's no mechanism in place to honor that claim.

Re: RFR: 8300727: java/awt/List/ListGarbageCollectionTest/AwtListGarbageCollectionTest.java failed with "List wasn't garbage collected"

2023-02-16 Thread Sergey Bylokhov
On Thu, 16 Feb 2023 21:50:04 GMT, Alexey Ivanov wrote: >For this reason, GC logs are enabled. If, for whatever reason, the call to >System.gc() is ignored, we'll see it in the test log. Then a specific GC could >be selected, for example, or another fix implemented. As of now this test can be e

Re: RFR: 8300727: java/awt/List/ListGarbageCollectionTest/AwtListGarbageCollectionTest.java failed with "List wasn't garbage collected"

2023-02-16 Thread Alexey Ivanov
On Thu, 16 Feb 2023 21:41:12 GMT, Sergey Bylokhov wrote: >> The test has become unstable recently, there were quite a few failures, on >> Windows mostly. I was lucky enough to find a host where the test failed >> consistently. >> >> I call `System.gc()` directly as suggested in comments to the

Re: RFR: 8300727: java/awt/List/ListGarbageCollectionTest/AwtListGarbageCollectionTest.java failed with "List wasn't garbage collected"

2023-02-16 Thread Sergey Bylokhov
On Thu, 16 Feb 2023 14:38:21 GMT, Alexey Ivanov wrote: > The test has become unstable recently, there were quite a few failures, on > Windows mostly. I was lucky enough to find a host where the test failed > consistently. > > I call `System.gc()` directly as suggested in comments to the bug. I

Re: RFR: 8081474: SwingWorker calls 'done' before the 'doInBackground' is finished [v21]

2023-02-16 Thread Alexey Ivanov
On Thu, 16 Feb 2023 21:19:59 GMT, Sergey Bylokhov wrote: > I think the previous iteration of the fix was not run the doneEDT if the > setState throws an exception, while the current version, and initial code > always run it. It depends… If you change the order of the `doneEDT` and state, the

Re: RFR: 8302495: update for deprecated sprintf for java.desktop

2023-02-16 Thread Phil Race
On Tue, 14 Feb 2023 20:41:39 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I have this update reviewed? > > The sprintf is deprecated in Xcode 14 because of security concerns. The issue > was addressed in [JDK-8296812](https://bugs.openjdk.org/browse/JDK-8296812) > for building failure, and >

Re: RFR: 8081474: SwingWorker calls 'done' before the 'doInBackground' is finished [v21]

2023-02-16 Thread Sergey Bylokhov
On Thu, 16 Feb 2023 19:12:47 GMT, Alexey Ivanov wrote: >> src/java.desktop/share/classes/javax/swing/SwingWorker.java line 308: >> >>> 306: } finally { >>> 307: doneEDT(); >>> 308: setState(StateValue.DONE); >> >> C

Re: RFR: 8302495: update for deprecated sprintf for java.desktop

2023-02-16 Thread SWinxy
On Tue, 14 Feb 2023 20:41:39 GMT, Xue-Lei Andrew Fan wrote: > Hi, > > May I have this update reviewed? > > The sprintf is deprecated in Xcode 14 because of security concerns. The issue > was addressed in [JDK-8296812](https://bugs.openjdk.org/browse/JDK-8296812) > for building failure, and >

Re: RFR: 8081474: SwingWorker calls 'done' before the 'doInBackground' is finished [v21]

2023-02-16 Thread Alexey Ivanov
On Thu, 16 Feb 2023 18:59:07 GMT, Sergey Bylokhov wrote: > Can the test checks the case when the listener called from "setState" will > throw an exception, I think some of the previous iterations of the fix will > not work in this case. This is not a new problem and _is not introduced_ by Pras

Integrated: 8302671: libawt has a memmove decay error

2023-02-16 Thread Julian Waters
On Thu, 16 Feb 2023 15:33:51 GMT, Julian Waters wrote: > In libawt, the size parameter is issued by a sizeof on an array, which as > expected decays into a pointer and breaks the cleanup code by giving the > incorrect size This pull request has now been integrated. Changeset: e5042dd4 Author:

Re: RFR: 8081474: SwingWorker calls 'done' before the 'doInBackground' is finished [v21]

2023-02-16 Thread Sergey Bylokhov
On Thu, 16 Feb 2023 05:13:16 GMT, Prasanta Sadhukhan wrote: >> SwingWorker done() method [spec >> ](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/SwingWorker.java#L452) >> says "Executed on the Event Dispatch Thread after the doInBackground method >> is

Re: RFR: 8302671: libawt has a memmove decay error

2023-02-16 Thread Kevin Rushforth
On Thu, 16 Feb 2023 15:33:51 GMT, Julian Waters wrote: > In libawt, the size parameter is issued by a sizeof on an array, which as > expected decays into a pointer and breaks the cleanup code by giving the > incorrect size Marked as reviewed by kcr (Author). - PR: https://git.ope

Re: RFR: 8302671: libawt has a memmove decay error

2023-02-16 Thread Phil Race
On Thu, 16 Feb 2023 16:42:05 GMT, Kevin Rushforth wrote: > I just checked, and he is correct. In a function declaration, the array is > treated as a pointer, I see .. - PR: https://git.openjdk.org/jdk/pull/12597

Re: RFR: 8302671: libawt has a memmove decay error

2023-02-16 Thread Phil Race
On Thu, 16 Feb 2023 15:33:51 GMT, Julian Waters wrote: > In libawt, the size parameter is issued by a sizeof on an array, which as > expected decays into a pointer and breaks the cleanup code by giving the > incorrect size Marked as reviewed by prr (Reviewer). - PR: https://git.o

Re: RFR: 8302513: remove sun.awt.util.IdentityLinkedList

2023-02-16 Thread Phil Race
On Wed, 15 Feb 2023 00:11:58 GMT, Stuart Marks wrote: > IdentityLinkedList is used in only one place, so it's fairly simple to > replace it with IdentityArrayList. Marked as reviewed by prr (Reviewer). - PR: https://git.openjdk.org/jdk/pull/12567

Re: Stage Manager Problems

2023-02-16 Thread Philip Race
>The more I look at this: I’m afraid the crux of this problem is Stage Manager has introduced a new window state that Java’s AWT architecture can’t really describe yet. (But I’d love to be proved wrong…?) I think you are right. I do not have Ventura to see / test for myself but everything I am

Re: RFR: 8302671: libawt has a memmove decay error

2023-02-16 Thread Julian Waters
On Thu, 16 Feb 2023 18:12:33 GMT, Sergey Bylokhov wrote: >> In libawt, the size parameter is issued by a sizeof on an array, which as >> expected decays into a pointer and breaks the cleanup code by giving the >> incorrect size > > Interesting that this code can be compiled by gcc on windows.

Re: RFR: 8302671: libawt has a memmove decay error

2023-02-16 Thread Sergey Bylokhov
On Thu, 16 Feb 2023 15:33:51 GMT, Julian Waters wrote: > In libawt, the size parameter is issued by a sizeof on an array, which as > expected decays into a pointer and breaks the cleanup code by giving the > incorrect size Marked as reviewed by serb (Reviewer). Interesting that this code can

Re: RFR: 8302513: remove sun.awt.util.IdentityLinkedList

2023-02-16 Thread Sergey Bylokhov
On Wed, 15 Feb 2023 00:11:58 GMT, Stuart Marks wrote: > IdentityLinkedList is used in only one place, so it's fairly simple to > replace it with IdentityArrayList. Looks fine. I assume it was tested by the mach5. - Marked as reviewed by serb (Reviewer). PR: https://git.openjdk.or

Re: RFR: 8302671: libawt has a memmove decay error

2023-02-16 Thread Julian Waters
On Thu, 16 Feb 2023 17:56:54 GMT, Sergey Bylokhov wrote: > Does anybody know how this was found, by some tool or compiler warning? It was found by gcc, which will raise a noisy alert of `-Wsizeof-array-argument` and `-Wsizeof-pointer-memaccess` when compiling awt_Component.cpp:3402:38: error:

Re: RFR: 8302671: libawt has a memmove decay error

2023-02-16 Thread Sergey Bylokhov
On Thu, 16 Feb 2023 15:33:51 GMT, Julian Waters wrote: > In libawt, the size parameter is issued by a sizeof on an array, which as > expected decays into a pointer and breaks the cleanup code by giving the > incorrect size Does anybody know how this was found, by some tool or compiler warning?

RFR: 8302513: remove sun.awt.util.IdentityLinkedList

2023-02-16 Thread Stuart Marks
IdentityLinkedList is used in only one place, so it's fairly simple to replace it with IdentityArrayList. - Commit messages: - Replace IdentityLinkedList with IdentityArrayList. Changes: https://git.openjdk.org/jdk/pull/12567/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=

Re: RFR: 8302671: libawt has a memmove decay error

2023-02-16 Thread Laurent Bourgès
On Thu, 16 Feb 2023 15:33:51 GMT, Julian Waters wrote: > In libawt, the size parameter is issued by a sizeof on an array, which as > expected decays into a pointer and breaks the cleanup code by giving the > incorrect size LGTM. Length is 256*sizeof(BYTE) = 256. - PR: https://gi

Re: RFR: 8302671: libawt has a memmove decay error

2023-02-16 Thread Kevin Rushforth
On Thu, 16 Feb 2023 15:33:51 GMT, Julian Waters wrote: > In libawt, the size parameter is issued by a sizeof on an array, which as > expected decays into a pointer and breaks the cleanup code by giving the > incorrect size I just checked, and he is correct. In a function declaration, the array

Re: RFR: 8302671: libawt has a memmove decay error

2023-02-16 Thread Phil Race
On Thu, 16 Feb 2023 15:33:51 GMT, Julian Waters wrote: > In libawt, the size parameter is issued by a sizeof on an array, which as > expected decays into a pointer and breaks the cleanup code by giving the > incorrect size Umm .. I'm not sure this is correct. Have you verified ? -

Re: RFR: 8302525: Write a test to check various components send Events while mouse and key are used simultaneously

2023-02-16 Thread Ravi Gupta
On Wed, 15 Feb 2023 12:50:42 GMT, Ravi Gupta wrote: > Main aim of this testcase is to test the behavior of various events under > stress. > > This testcase verifies the following assertions > a. This TestCase performs various mouse and key operations on components and > checks whether all the

Re: RFR: 8302671: libawt has a memmove decay error

2023-02-16 Thread Magnus Ihse Bursie
On Thu, 16 Feb 2023 15:33:51 GMT, Julian Waters wrote: > In libawt, the size parameter is issued by a sizeof on an array, which as > expected decays into a pointer and breaks the cleanup code by giving the > incorrect size This looks bad. :-( Have you checked if this results in any user-visibl

RFR: 8302671: libawt has a memmove decay error

2023-02-16 Thread Julian Waters
In libawt, the size parameter is issued by a sizeof on an array, which as expected decays into a pointer and breaks the cleanup code by giving the incorrect size - Commit messages: - Brackets - memmove decay error Changes: https://git.openjdk.org/jdk/pull/12597/files Webrev: htt

RFR: 8300727: java/awt/List/ListGarbageCollectionTest/AwtListGarbageCollectionTest.java failed with "List wasn't garbage collected"

2023-02-16 Thread Alexey Ivanov
The test has become unstable recently, there were quite a few failures, on Windows mostly. I was lucky enough to find a host where the test failed consistently. I call `System.gc()` directly as suggested in comments to the bug. I used `PhantomReference` instead of `WeakReference`. Now the test

Integrated: 8300549: JFileChooser Approve button tooltip is null in Aqua L&F in CUSTOM_DIALOG mode

2023-02-16 Thread Tejesh R
On Wed, 25 Jan 2023 14:24:41 GMT, Tejesh R wrote: > _JFilechooser_ returns _null_ for Approve button tool tip in `CUSTOM_DIALOG` > mode (`getToolTipText()`). The fallback text has been set to "Choose" text. > Observation found in validating the test of PR - #11901. This pull request has now be

Re: RFR: 8300549: JFileChooser Approve button tooltip is null in Aqua L&F in CUSTOM_DIALOG mode [v2]

2023-02-16 Thread Abhishek Kumar
On Mon, 30 Jan 2023 15:05:55 GMT, Tejesh R wrote: >> _JFilechooser_ returns _null_ for Approve button tool tip in `CUSTOM_DIALOG` >> mode (`getToolTipText()`). The fallback text has been set to "Choose" text. >> Observation found in validating the test of PR - #11901. > > Tejesh R has updated t

Re[2]: Stage Manager Problems

2023-02-16 Thread Jeremy Wood
Harshitha, Thanks for the suggestions. I think those don’t really resolve the problem, though. In the original sample program (having only 1 frame) watching the keyboard focus could help identify when there’s a change, but if there’s a second frame: that second window could retain the focus

Re: RFR: 8081474: SwingWorker calls 'done' before the 'doInBackground' is finished [v21]

2023-02-16 Thread Alexey Ivanov
On Thu, 16 Feb 2023 05:13:16 GMT, Prasanta Sadhukhan wrote: >> SwingWorker done() method [spec >> ](https://github.com/openjdk/jdk/blob/master/src/java.desktop/share/classes/javax/swing/SwingWorker.java#L452) >> says "Executed on the Event Dispatch Thread after the doInBackground method >> is