JDK-6376865 : JCK-Runtime-15a StyleSheet.setgetTests StyleSheet 2021: Failed to getFont for 5.0_u7_b1
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0u7
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-01-25
  • Updated: 2012-03-23
  • Resolved: 2006-03-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 JDK 6
5.0u7Fixed 6 b76Fixed
Related Reports
Relates :  
Description
JCK_VERSION=1.5a JCK_BUILD_ID=b11
java version "1.5.0_07-ea"

Failed Test: javasoft.sqe.tests.api.javax.swing.text.html.StyleSheet.setgetTests
StyleSheet 2021 returns: Failed to getFont

This test passes on 5u6b5 and fails on 5u7b1. It is a clear regression across all platforms.
I tested on Solaris10_X86, Windows XPHome, Solaris 10 Sparc u1 b19a.

See attached script for your convenience for reproducing the failure.

Below is the complete output of the test execution -

StyleSheet2015: Passed. OKAY
StyleSheet2016: Passed. OKAY
StyleSheet2017: Passed. OKAY
StyleSheet2018: Passed. OKAY
StyleSheet2019: Passed. OKAY
StyleSheet2020: Passed. OKAY
StyleSheet2021: Failed. Failed to getFont.
StyleSheet2022: Passed. OKAY
StyleSheet2023: Passed. OKAY
StyleSheet2024: Passed. OKAY
StyleSheet2025: Passed. OKAY
StyleSheet2026: Passed. OKAY
StyleSheet2027: Passed. OKAY
StyleSheet2028: Passed. OKAY
StyleSheet2029: Passed. OKAY
StyleSheet2030: Passed. OKAY
StyleSheet2031: Passed. OKAY
StyleSheet2032: Passed. OKAY
StyleSheet2033: Passed. OKAY
StyleSheet2034: Passed. OKAY
StyleSheet2035: Passed. OKAY
StyleSheet2036: Passed. OKAY
StyleSheet2037: Passed. OKAY
StyleSheet2038: Passed. OKAY
StyleSheet2039: Passed. OKAY
StyleSheet2040: Passed. OKAY
StyleSheet2041: Passed. OKAY
StyleSheet2042: Passed. OKAY
StyleSheet2043: Passed. OKAY
StyleSheet2044: Passed. OKAY
StyleSheet2045: Passed. OKAY
StyleSheet2046: Passed. OKAY
StyleSheet2047: Passed. OKAY
StyleSheet2048: Passed. OKAY
STATUS:Failed.test cases: 34; passed: 33; failed: 1; first test case failure: StyleSheet2021

Comments
EVALUATION This is now passing for 5u7 build2.
28-03-2006

EVALUATION This how JCK test look like: -- StyleSheet c = new StyleSheet(); SimpleAttributeSet as = new SimpleAttributeSet(); c.addCSSAttribute(as, CSS.Attribute.FONT_FAMILY, "SansSerif"); c.addCSSAttribute(as, CSS.Attribute.FONT_STYLE, "italic"); c.addCSSAttribute(as, CSS.Attribute.FONT_SIZE, "medium"); Font fn = c.getFont(as); if (!(fn.getName().equals("SansSerif") && fn.isItalic())) { System.out.println("failed"); } -- According to javadoc for java.awt.Font -- Font name lookup is case insensitive, using the case folding rules of the US locale. -- It seems it would be more appropriate for the test to check font name this way : fn.getName().equalsIgnoreCase("SansSerif") I am not sure if it is a bug or nuisance. In any case I will be happy to return the old behavior back. Is it something which should be done for 5.0u7 ?
13-02-2006

EVALUATION This is not a P1 regression but rather a minor issue that is arguably a problem with the test. The test uses CSS to create a font and then checks the name of the font created for "SansSerif". Due to the fix for 5062649, the name is now "sansserif", which is okay since font names are case-insensitive. However, for backward compatibility, we'll look into fixing this minor change.
27-01-2006