On Fri, 7 Aug 2026 19:47:19 GMT, Sergey Bylokhov <[email protected]> wrote:

>> Prasanta Sadhukhan has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Review comment
>
> src/java.desktop/share/classes/javax/swing/JComponent.java line 4200:
> 
>> 4198:             var accessor = SwingAccessor.getJTextComponentAccessor();
>> 4199:             if (!accessor.isDragEnabledSet(textComponent)) {
>> 4200:                 accessor.setDragEnabledUIResource(textComponent,
> 
> This line may cause undocumented headless exception in public 
> LookAndFeel.installProperty() method?

Aqua already prevents it

if (!GraphicsEnvironment.isHeadless()) {
    LookAndFeel.installProperty(component, "dragEnabled", true);
}

and BasicTextUI installs false, so it cannot throw so there will not be any 
headless exception

> test/jdk/javax/swing/text/JTextComponent/TextComponentDragEnabledTest.java 
> line 42:
> 
>> 40: import javax.swing.SwingUtilities;
>> 41: import javax.swing.UIManager;
>> 42: import javax.swing.UnsupportedLookAndFeelException;
> 
> UnsupportedLookAndFeelException is unused?

removed

> test/jdk/javax/swing/text/JTextComponent/TextComponentDragEnabledTest.java 
> line 94:
> 
>> 92:             for (UIManager.LookAndFeelInfo laf :
>> 93:                 UIManager.getInstalledLookAndFeels()) {
>> 94:                 UIManager.setLookAndFeel(new MetalLookAndFeel());
> 
> Why is it necessary to set new MetalLookAndFeel() here? Is the goal to check 
> the transition from all installed L&Fs one by one, or the transition from 
> MetalLookAndFeel to other L&Fs?
> 
> It will be good to test serialization patched in the last commit as well.

The intended goal is to check the application set property value is preserved 
during transition from one L&F to Aqua since intended L&F being tested is Aqua 
and since Metal is present everywhere so I wanted to check from Metal -> Aqua, 
but the testing is extended for all installed L&F to check preservation is 
honoured for transition from Metal to any L&F not just Aqua
Checking for all possible combination will be too much for this regression test.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/32101#discussion_r3763778986
PR Review Comment: https://git.openjdk.org/jdk/pull/32101#discussion_r3763790849
PR Review Comment: https://git.openjdk.org/jdk/pull/32101#discussion_r3763773739

Reply via email to