JDK-6845304 : HTMLStyleElement can't be cast to LinkStyle
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 6u14,7,7u3,8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,windows,windows_xp
  • CPU: generic,x86
  • Submitted: 2009-05-27
  • Updated: 2015-06-03
  • Resolved: 2014-10-30
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 8 JDK 9
8u40 b14Fixed 9Fixed
Description
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. open the following url with java console open:
http://sqeweb/jsn/users/fred/deployment_ws/fred/deployment_6_UR_int_ws/deployment/src/plugin/FunctionalTest/FunctionalTest/html/LinkStyleTest1.html

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No exception will be printed in console and string "stylesheet has been got from style element" will be printed.
ACTUAL -
The following exception is printed:
java.lang.ClassCastException: sun.plugin.dom.html.HTMLStyleElement cannot be cast to org.w3c.dom.stylesheets.LinkStyle
	at LinkStyleTest1.start(LinkStyleTest1.java:34)

REPRODUCIBILITY :
This bug can be reproduced always.

The applet source code is:
http://sqeweb/jsn/users/fred/deployment_ws/fred/deployment_6_UR_int_ws/deployment/src/plugin/FunctionalTest/FunctionalTest/src/LinkStyleTest1.java