JDK-6979537 : closed/javax/swing/JSplitPane/UnitTest/UnitTest.java fails
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u10,6u95,7
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,linux_redhat_5.0,solaris
  • CPU: generic,x86,sparc
  • Submitted: 2010-08-24
  • Updated: 2015-03-17
  • Resolved: 2011-03-07
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
7 b130Fixed
Related Reports
Duplicate :  
Duplicate :  
Description
Testsuite name: regression j2se
test: closed/javax/swing/JSplitPane/UnitTest/UnitTest.java
JDK/JRE tested: jdk7 b106
OS/architecture: x64 rhel 5
Reproducible: Always
Reproducible on machine: stt-57.russia
Is it a platform specific regression: N
Is it a Regression: N

Test run log location:
[stt-robot@stt-57]$ cat cur/work/closed/javax/swing/JSplitPane/UnitTest/UnitTest.jtr 
#Test Results (version 2)
#Tue Aug 24 19:45:41 MSD 2010
#checksum:127abec82fb86c48
#-----testdescription-----
$file=/net/vice/export/stt/newroot/regression/workspaces/170/1.7.0_fcsb106/j2se/test/closed/javax/swing/JSplitPane/UnitTest/UnitTest.java
$root=/net/vice/export/stt/newroot/regression/workspaces/170/1.7.0_fcsb106/j2se/test
author=Scott Violet
keywords=bug4179554 bug4223032 bug4244268 bug4149278
library=../../regtesthelpers
run=USER_SPECIFIED build Blocker\nUSER_SPECIFIED main UnitTest\n
source=UnitTest.java
title=A UnitTest to exercise various portions of JSplitPane

#-----environment-----

#-----testresult-----
description=file:///net/vice/export/stt/newroot/regression/workspaces/170/1.7.0_fcsb106/j2se/test/closed/javax/swing/JSplitPane/UnitTest/UnitTest.java
end=Tue Aug 24 19:45:41 MSD 2010
environment=regtest
execStatus=Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Too small, wants java.awt.Dimension[width=30,height=15] is java.awt.Dimension[width=20,height=398]
javatestOS=Linux 2.6.18-194.el5 (i386)
javatestVersion=3.2.2_03
script=com.sun.javatest.regtest.RegressionScript 
sections=script_messages build build main
start=Tue Aug 24 19:45:39 MSD 2010
test=closed/javax/swing/JSplitPane/UnitTest/UnitTest.java
work=/export/JQA/regression/cur/work/closed/javax/swing/JSplitPane/UnitTest

#section:script_messages
----------messages:(4/186)----------
JDK under test: (/export/jdk/jdk1.7.0b106)
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b106)
Java HotSpot(TM) Client VM (build 19.0-b05, mixed mode, sharing)

#section:build
----------messages:(3/103)----------
command: build Blocker
reason: User specified action: run build Blocker 
elapsed time (seconds): 0.002
result: Passed. All files up to date

#section:build
----------messages:(3/91)----------
command: build UnitTest
reason: Named class compiled on demand
elapsed time (seconds): 0.0
result: Passed. All files up to date

#section:main
----------messages:(3/103)----------
command: main UnitTest
reason: User specified action: run main UnitTest 
elapsed time (seconds): 1.538
----------System.out:(0/0)----------
----------System.err:(19/1305)----------
java.lang.RuntimeException: Too small, wants java.awt.Dimension[width=30,height=15] is java.awt.Dimension[width=20,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:251)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:660)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:209)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:118)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Too small, wants java.awt.Dimension[width=30,height=15] is java.awt.Dimension[width=20,height=398]
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Too small, wants java.awt.Dimension[width=30,height=15] is java.awt.Dimension[width=20,height=398]
result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Too small, wants java.awt.Dimension[width=30,height=15] is java.awt.Dimension[width=20,height=398]


test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Too small, wants java.awt.Dimension[width=30,height=15] is java.awt.Dimension[width=20,height=398]

Steps to reproduce: 

[stt-robot@stt-57]$ /export/jdk/jdk1.7.0b106/bin/javac UnitTest.java 
Note: UnitTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
[stt-robot@stt-57]$ /export/jdk/jdk1.7.0b106/bin/java UnitTest      
Exception in thread "main" java.lang.RuntimeException: Too small, wants java.awt.Dimension[width=30,height=15] is java.awt.Dimension[width=20,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:251)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:660)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:209)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:118)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

It seems to be test bug.

Comments
RULE javax/swing/JSplitPane/UnitTest/UnitTest.java Exception java.lang.RuntimeException: Too small, wants java.awt.Dimension[width=26,height=16] is java.awt.Dimension[width=16,height=398]
17-03-2015

EVALUATION The following line if (divider == null) dividerSize = 10; looks wierd, since divider is not supposed to ever be null and it is used without null check in the next lines I think it should be rewritten like this: if (dividerSize == null) dividerSize = 10;
03-02-2011

SUGGESTED FIX --- a/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java Wed Jan 05 15:54:45 2011 -0800 +++ b/src/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java Tue Jan 18 19:32:10 2011 +0300 @@ -345,9 +345,9 @@ // 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. - Integer dividerSize = (Integer)UIManager.get("SplitPane.dividerSize"); - if (divider == null) dividerSize = 10; - LookAndFeel.installProperty(splitPane, "dividerSize", dividerSize); + Integer dividerSizeTmp = (Integer)UIManager.get("SplitPane.dividerSize"); + if (divider == null) dividerSizeTmp = 10; + LookAndFeel.installProperty(splitPane, "dividerSize", dividerSizeTmp); divider.setDividerSize(splitPane.getDividerSize()); dividerSize = divider.getDividerSize();
18-01-2011

EVALUATION The variable dividerSize has tainted the protected field within BasicSplitPaneUI class.
18-01-2011

EVALUATION In that build the view of the application changed significantly. It doesn't look like a swing regression but awt one.
30-12-2010

EVALUATION Reproduced on ubuntu10 with gnome JDK7b104.
31-08-2010