-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.4.2
-
sparc
-
solaris_7
Name: ssR10000 Date: 05/12/2003
It's looks like the method HTMLDocument.getElement(Element, Object, Object)
always return null value.
21 tests failed due to this bug.
====== HTMLDocument2153 ====== getElement(e, attribute, value) for tag A
Return incorrect element: null
====== HTMLDocument2154 ====== getElement(e, attribute, value) for tag ADDRESS
Return incorrect element: null
====== HTMLDocument2155 ====== getElement(e, attribute, value) for tag B
Return incorrect element: null
====== HTMLDocument2156 ====== getElement(e, attribute, value) for tag BIG
Return incorrect element: null
====== HTMLDocument2157 ====== getElement(e, attribute, value) for tag CITE
Return incorrect element: null
====== HTMLDocument2158 ====== getElement(e, attribute, value) for tag CODE
Return incorrect element: null
====== HTMLDocument2159 ====== getElement(e, attribute, value) for tag DFN
Return incorrect element: null
====== HTMLDocument2160 ====== getElement(e, attribute, value) for tag EM
Return incorrect element: null
====== HTMLDocument2161 ====== getElement(e, attribute, value) for tag FONT
Return incorrect element: null
====== HTMLDocument2162 ====== getElement(e, attribute, value) for tag I
Return incorrect element: null
====== HTMLDocument2163 ====== getElement(e, attribute, value) for tag KBD
Return incorrect element: null
====== HTMLDocument2164 ====== getElement(e, attribute, value) for tag SAMP
Return incorrect element: null
====== HTMLDocument2165 ====== getElement(e, attribute, value) for tag SMALL
Return incorrect element: null
====== HTMLDocument2166 ====== getElement(e, attribute, value) for tag STRIKE
Return incorrect element: null
====== HTMLDocument2167 ====== getElement(e, attribute, value) for tag S
Return incorrect element: null
====== HTMLDocument2168 ====== getElement(e, attribute, value) for tag STRONG
Return incorrect element: null
====== HTMLDocument2169 ====== getElement(e, attribute, value) for tag SUB
Return incorrect element: null
====== HTMLDocument2170 ====== getElement(e, attribute, value) for tag SUP
Return incorrect element: null
====== HTMLDocument2171 ====== getElement(e, attribute, value) for tag TT
Return incorrect element: null
====== HTMLDocument2172 ====== getElement(e, attribute, value) for tag U
Return incorrect element: null
====== HTMLDocument2173 ====== getElement(e, attribute, value) for tag VAR
Return incorrect element: null
Each of these tests looks like:
-------------------------------------------------------------------------------
String magicid="magicid";
String test="<!DOCTYPE HTML PUBLIC \"-//w3c//DTD html 3.2//EN\">"
+"<HTML><TITLE>test</TITLE><BODY><A href=\"www.sun.com\" id=\""+magicid+"\">"
+magic+"</A></BODY></HTML>";
HTMLEditorKit c = new HTMLEditorKit();
HTMLDocument doc = null;
try {
doc = new HTMLDocument();
c.read(new StringReader(test),doc,0);
} catch(Exception e) {
return Status.failed( "Unexpected "+e+" thrown" );
}
Element e = doc.getElement(doc.getDefaultRootElement(), HTML.Attribute.ID, magicid);
if (e == null) {
ref.println("Return incorrect element: null");
}
-------------------------------------------------------------------------------
======================================================================
- duplicates
-
JDK-4481753 HTMLDocument.getElement() returns incorrect value
-
- Resolved
-