JDK-6832120 : regression javax/swing/text/Utilities/bug6760148.java fails on 6u14b04
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u14
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_10
  • CPU: x86
  • Submitted: 2009-04-20
  • Updated: 2011-01-19
  • Resolved: 2009-08-10
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 JDK 7
6u16-rev b02Fixed 7Resolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
regression test suite
test: javax/swing/text/Utilities/bug6760148.java
platoform: x86
os: solaris10
test fails on 6u14b04 and passes on 6u14b03
fails with:
invoking: testCharsWidth
Exception in thread "main" java.lang.RuntimeException
        at SwingTestHelper.fail(SwingTestHelper.java:691)
        at Assert.assertTrue(Assert.java:22)
        at Assert.assertTrue(Assert.java:29)
        at bug6760148.checkCharsWidth(bug6760148.java:89)
        at bug6760148.traverseViews(bug6760148.java:62)
        at bug6760148.traverseViews(bug6760148.java:64)
        at bug6760148.testCharsWidth(bug6760148.java:54)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at SwingTestHelper.invoke(SwingTestHelper.java:625)
        at SwingTestHelper.access$800(SwingTestHelper.java:173)
        at SwingTestHelper$6.run(SwingTestHelper.java:609)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.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)

to reproduct login at stt-12.russia under stt-robot :

[stt-robot@stt-12]$ pwd
/export/JQA/regression/6u14b04
[stt-robot@stt-12]$ /export/jdk/jdk1.6.0_14b04/bin/java -version                  
java version "1.6.0_14-ea"
Java(TM) SE Runtime Environment (build 1.6.0_14-ea-b04)
Java HotSpot(TM) Server VM (build 14.0-b13, mixed mode)
[stt-robot@stt-12]$ /export/jdk/jdk1.6.0_14b04/bin/javac bug6760148.java 
Note: bug6760148.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[stt-robot@stt-12]$ /export/jdk/jdk1.6.0_14b04/bin/java bug6760148      
invoking: testCharsWidth
Exception in thread "main" java.lang.RuntimeException
        at SwingTestHelper.fail(SwingTestHelper.java:691)
        at Assert.assertTrue(Assert.java:22)
        at Assert.assertTrue(Assert.java:29)
        at bug6760148.checkCharsWidth(bug6760148.java:89)
        at bug6760148.traverseViews(bug6760148.java:62)
        at bug6760148.traverseViews(bug6760148.java:64)
        at bug6760148.testCharsWidth(bug6760148.java:54)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at SwingTestHelper.invoke(SwingTestHelper.java:625)
        at SwingTestHelper.access$800(SwingTestHelper.java:173)
        at SwingTestHelper$6.run(SwingTestHelper.java:609)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.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)
^C[stt-robot@stt-12]$ /export/jdk/jdk1.6.0_14b03/bin/java -version  
java version "1.6.0_14-ea"
Java(TM) SE Runtime Environment (build 1.6.0_14-ea-b03)
Java HotSpot(TM) Server VM (build 14.0-b12, mixed mode)
[stt-robot@stt-12]$ /export/jdk/jdk1.6.0_14b03/bin/javac bug6760148.java 
Note: bug6760148.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
[stt-robot@stt-12]$ /export/jdk/jdk1.6.0_14b03/bin/java bug6760148      
invoking: testCharsWidth
OK
^C[stt-robot@stt-12]$ /export/jdk/jdk1.6.0_14b03/bin/java -version  
java version "1.6.0_14-ea"
Java(TM) SE Runtime Environment (build 1.6.0_14-ea-b03)
Java HotSpot(TM) Server VM (build 14.0-b12, mixed mode)
The top bug description should read "Regression: test case starts to fail in 6u14b04"

Comments
SUGGESTED FIX Webrev: http://sa.sfbay.sun.com/projects/swing_data/6u15/6832120.0
02-06-2009

EVALUATION Utilities.getTabbedTextoffset should compare the string width with the initial area dimensions, not with the last x-offset which may be beyond the area.
21-04-2009