JDK-6264570 : 2124360 Fix was broken,(Space added after named anchors)
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0u4
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2005-05-03
  • Updated: 2010-04-02
  • Resolved: 2005-05-16
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.
Other
5.0u5Resolved
Related Reports
Duplicate :  
Description
2124360 Fix was broken,(Space added after named anchors)

This was fixed in 1.5.0_04-b03 but the test case was failed on 1.5.0_04-b03 
on Solaris9-sparc and AMD64-Sol10.

JDK details:
------------
JDK under test: (/export/updates/jdks/jdk1.5.0_04)
java version "1.5.0_04-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-ea-b03)
Java HotSpot(TM) Client VM (build 1.5.0_04-ea-b03, mixed mode, sharing)

Test:
-----
javax/swing/text/html/HTMLDocument/4207472/bug4207472.java

Work:
-----
/net/urts071/export6/testSuites/Regression/workspace_150/test/javax/swing/text/html/HTMLDocument/4207472

Results:
--------
Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: failed
Error details:
java.lang.RuntimeException: failed
	at bug4207472.main(bug4207472.java:25)
	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:585)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:83)
	at java.lang.Thread.run(Thread.java:595)

JavaTest Message: Test threw exception: java.lang.RuntimeException: failed
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: failed

Steps to reproduce:
-------------------
1.
Copy the the attached bug4207472.java file to your test location.
2.
Compile the java file with jdk1.5.0_04-b03
3.
Execute the class file with jdk1.5.0_04-b03
Results:
--------
bash-2.05$ /export/updates/jdks/jdk1.5.0_04/bin/java bug4207472
Exception in thread "main" java.lang.RuntimeException: failed
        at bug4207472.main(bug4207472.java:25)



###@###.### 2005-05-03 08:51:45 GMT
###@###.### 2005-05-03 15:01:23 GMT

Comments
EVALUATION I confirm an empty anchor is rendered one pixel wide in jdk1.5.0_04 vs zero pixels wide in jdk1.6 see 6264570.png in the attachment. (Note: before the fix it was as wide as the space. which is font size depended and no less then one pixel wide. In the attached screen short it is four pixels wide) ###@###.### 2005-05-03 23:06:15 GMT There is a bug fixed in mustang but not back-ported to 1.5. 4855860 JTextPane returns too large preferredSize in some specific cases The fix for this bug is one line change ( http://sa.sfbay.sun.com/projects/swing_data/dragon/4855860.0/src/share/classes/javax/swing/text/GlyphView.java.sdiff.html ) This fix is responsible for removing that unexpected pixel. I am closing this bug as a duplicate. ###@###.### 2005-05-16 21:23:53 GMT
03-05-2005