JDK-8057184 : JCK8's api/javax_swing/JDesktopPane/descriptions.html#getset failed with GTKLookAndFeel on Linux and Solaris run
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 7u6,7u71,7u72,7u80,8,8u25,9
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-09-03
  • Updated: 2015-06-04
  • Resolved: 2014-09-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 7 JDK 8 JDK 9
7u71Fixed 8u25Fixed 9 b32Fixed
Related Reports
Relates :  
Description
The following code illustrates the problem observed with GTKLookAndFeel/JDK8+:
----------------------------------------------------------------------------------------
import javax.swing.*;
import static java.lang.System.out;

public class JDP {
    public static void main(String[] args) {
        JDesktopPane pane = new JDesktopPane();
        out.println("frames = " + pane.getAllFrames().length);
        pane.add(new JInternalFrame());
        out.println("frames = " + pane.getAllFrames().length);
    }
}
----------------------------------------------------------------------------------------


When -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel is used for JDK8 the number of frames after adding a single frame is reported as 2.

For JDK7 only a single frame is reported as present after adding. 

Minimized issue reproduced with Solaris and JDK8, JDK8u26 - and seems to be present in all 8 updates.
Reported as visible with Linux by JCK QA.

The following JCK8 testcases fail:
api/javax_swing/JDesktopPane/descriptions.html#getset[JDesktopPane2005]
api/javax_swing/JDesktopPane/descriptions.html#getset[JDesktopPane2006]

(testcases are present in JCK7 as well http://jre.us.oracle.com/java/re/jck/7/promoted/latest/extra/mtl/jck-7-fcs-b59.mtl )

--- Original report by JCK QA -----
JDK 8 b129
JCK 8a QAC b12

Other Options
-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel

Comments
The issue is being reproduced with 7u06b22 on OEL6.
2014-09-04

SQE OK to take the tck-red bug fix into CPU14_04
2014-09-04

8u and 7u back ports are straightforward and will be ready shortly.
2014-09-04

- webrev link: http://cr.openjdk.java.net/~alexsch/8057184/webrev.01 - review link: http://mail.openjdk.java.net/pipermail/swing-dev/2014-September/003883.html - issue impact: JDesktopPane can return the same internal frames under GTK L&F - fix rational: The ArrayList collection is changed to LinkedHashSet to avoid storing the same items -risks: Minimal -suggested testing: run JCK api/javax_swing/JDesktopPane tests
2014-09-04

Is it affecting 7u?
2014-09-04

This is the regression from the fix JDK-7124328. The fix retrieves internal frames from subcomponents and does not skip the same frames.
2014-09-04

Please investigate this tck-red issue asap
2014-09-04

The is is reproduced in JDK 7u80 b02. The fix that causes the issue has been integrated in JDK 7u6 b10 JDK-2223221
2014-09-04

The failure is present in JCK8 run: https://wiki.se.oracle.com/display/JPG/JCK8+b29+Test+Report#JCK8b29TestReport-Additionaltestruns http://moonblade.ru.oracle.com/set/java/jck/qa-results/jck/8/ea/b29/results/laf/laf_linux_b29_GTK/report/html/kfl_newfailures.html
2014-09-03

JDK 8 b129 JCK 8a QAC b12
2014-09-03

What version of JDK is used?
2014-09-03

What is the version of JCK used?
2014-09-03