Details
-
Bug
-
Resolution: Fixed
-
P3
-
1.2.0, 1.2.1
-
1.2.2
-
x86, sparc
-
solaris_2.5.1, windows_nt
-
Verified
Description
Name: akC57697 Date: 08/12/98
The set com.sun.java.swing.text.html.HTML.allAttributes[] does not
contain HTML.Attribute.FACE. The method getAttributeKey(String) returns null
for the attribute "face".
The documentation says:
"
public static Attribute getAttributeKey(String attName)
Fetch an attribute constant for a well-known attribute name
(i.e. one of the attributes in the set <code>allAttributes</code>).
If the given name does not represent one of the well-known attributes,
then null will be returned.
"
The FACE is "well-known".
The example:
------------------------------8-<--------------------------------------------
import com.sun.java.swing.text.html.HTML;
class Test {
public static void main(String[] argv) {
String [] names ={
"size","color","clear","background","bgcolor","text","link",
"vlink","alink","width","height","align","name","href","rel",
"rev","title","target","shape","coords","ismap","nohref",
"alt","id","src","hspace","vspace","usemap","lowsrc","codebase",
"code","archive","value","valuetype","type","class","style",
"lang","face","dir","declare","classid","data","codetype",
"standby","border","shapes","noshade","compact","start","action",
"method","enctype","checked","maxlength","multiple","selected",
"rows","cols","dummy","cellspacing","cellpadding","valign",
"halign","nowrap","rowspan","colspan","prompt","http-equiv",
"content","language","version","n","frameborder","marginwidth",
"marginheight","scrolling","noresize","endtag","comment"};
for (int i=0 ; i<names.length; i++) {
if (HTML.getAttributeKey(names[i])==null) {
System.out.println("The attribute \""+names[i]+"\" is absent.");
}
}
}
}
---------------------------->-8----------------------------------------------
Output:
The attribute "face" is absent.
java full version "JDK-1.2fcs-E"
======================================================================
Attachments
Issue Links
- duplicates
-
JDK-4235200 inconsistent key classes in MutableAttributeSet from html.parser
- Closed