RFR: 8303213: Avoid AtomicReference in TextComponentPrintable [v3]
Andrey Turbanov
aturbanov at openjdk.org
Thu Mar 2 19:33:46 UTC 2023
On Mon, 27 Feb 2023 20:48:22 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
>> If CompareAndSwap is not used, then AtomicReference could be replaced with volatile. It simplified code a bit.
>
> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision:
>
> 8303213: Avoid AtomicReference in TextComponentPrintable
>
> expand star import
I've tested `javax/swing` on my linux x64.
There were 4 failures. All of them do fail, even without my changes.
<details>
<summary>javax/swing/JInternalFrame/Test6325652.java</summary>

STDOUT:
class Test6325652
public void Test6325652.select() throws java.beans.PropertyVetoException
public static void Test6325652.stepFirst() throws java.awt.AWTException
public void Test6325652.stepFirstValidate()
FAILED
STDERR:
java.lang.Error: frame should be an icon
at Test6325652.stepFirstValidate(Test6325652.java:73)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at SwingTest.run(SwingTest.java:96)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
</details>
<details>
<summary>javax/swing/JMenu/TestDisabledMenuForegroundColor.java</summary>

STDERR:
java.lang.RuntimeException: Disabled JMenu foreground color not grayed out
at TestDisabledMenuForegroundColor.main(TestDisabledMenuForegroundColor.java:80)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
at java.base/java.lang.Thread.run(Thread.java:1623)
</details>
<details>
<summary>javax/swing/JSlider/TestJSliderRendering.java</summary>

STDERR:
java.lang.RuntimeException: The slider is not rendered properly
at TestJSliderRendering.main(TestJSliderRendering.java:140)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
at java.base/java.lang.Thread.run(Thread.java:1623)
</details>
<details>
<summary>javax/swing/JToolTip/TestTooltipBackgroundColor.java</summary>

STDERR:
java.lang.RuntimeException: The expected background color for tooltip not found
at TestTooltipBackgroundColor.main(TestTooltipBackgroundColor.java:185)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:125)
at java.base/java.lang.Thread.run(Thread.java:1623)
</details>
>Did you run any Swing printing tests that exercise this code ?
Is there any easy way to find out which tests does that?
-------------
PR: https://git.openjdk.org/jdk/pull/12018
More information about the client-libs-dev
mailing list