JDK-6731921 : javax/swing/JSplitPane/UnitTest/UnitTest.java fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u10,7
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic,solaris
  • CPU: generic,sparc
  • Submitted: 2008-07-31
  • Updated: 2015-03-02
  • Resolved: 2011-03-01
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 6
6-poolResolved
Related Reports
Duplicate :  
Relates :  
Description
JDK		    : Fails:  6u10 b26 and later
                      Passes: 6u10 b25
		      
Failing Test [s]    : javax/swing/JSplitPane/UnitTest/UnitTest.java

    Test output:
    ============
java.lang.RuntimeException: Too small, wants java.awt.Dimension[width=26,height=
17] is java.awt.Dimension[width=16,height=398]
        at UnitTest.verifySize(UnitTest.java:308)
        at UnitTest.verifyMinMaintained(UnitTest.java:220)
        at UnitTest.doTest(UnitTest.java:365)
        at UnitTest.<init>(UnitTest.java:63)
        at UnitTest$1.run(UnitTest.java:43)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
ad.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Comments
EVALUATION The test fails after the fix for 6706212. The cause is in the following lines: src/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java @@ -328,12 +328,13 @@ setOrientation(splitPane.getOrientation()); // This plus 2 here is to provide backwards consistancy. Previously, // the old size did not include the 2 pixel border around the divider, // it now does. - LookAndFeel.installProperty(splitPane, "dividerSize", - UIManager.get("SplitPane.dividerSize")); + Integer dividerSize = (Integer)UIManager.get("SplitPane.dividerSize"); + if (divider == null) dividerSize = 10; + LookAndFeel.installProperty(splitPane, "dividerSize", dividerSize); divider.setDividerSize(splitPane.getDividerSize()); dividerSize = divider.getDividerSize(); splitPane.add(divider, JSplitPane.DIVIDER); As you can see, dividerSize local variable is introduced. However, BasicSplitPaneUI has dividerSize field. In the same method where the local variable is declared there is some code working with the field. After the fix the code logic was broken. It is the cause. The fix is simple. We should rename the local variable.
04-08-2008