You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Miguel Montes (JIRA)" <ji...@apache.org> on 2006/09/07 15:08:23 UTC
[jira] Updated: (HARMONY-1349) [classlib][html] Compatibility: The
values stored in the public field type of j.s.t.h.p.Entity are different
from those used in the RI
[ http://issues.apache.org/jira/browse/HARMONY-1349?page=all ]
Miguel Montes updated HARMONY-1349:
-----------------------------------
Attachment: Entity_01.patch
> [classlib][html] Compatibility: The values stored in the public field type of j.s.t.h.p.Entity are different from those used in the RI
> --------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HARMONY-1349
> URL: http://issues.apache.org/jira/browse/HARMONY-1349
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Miguel Montes
> Priority: Minor
> Attachments: Entity_01.patch, Entity_01.patch
>
>
> The class javax.swing.text.html.parser.Entity defines the type and value of an entity in a DTD. The field 'type' is used in the RI for storing the type, but also to encode other information, used by the methods isParameter() and isGeneral(). Therefore, the value returned by getType() is NOT the same as the value stored in type.
> ====================== java code ========================
> import java.io.IOException;
> import javax.swing.text.html.parser.*;
> public class TestEntityType {
> public static void main(String[] args) throws IOException {
> DTD dtd = DTD.getDTD("dummy");
> Entity space = dtd.getEntity("#SPACE");
> System.out.println("type: "+space.type);
> System.out.println("getType(): "+space.getType());
> }
> }
> =======================================================
> Output:
> $ java -showversion TestEntityType
> java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode)
> type: 65536
> getType(): 0
> $ /harmony-hdk-r431938/jdk/jre/bin/java -showversion TestEntityType
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r431938, (Aug 16 2006), Linux/ia32/gcc 3.4.6, release build
> http://incubator.apache.org/harmony
> type: 0
> getType(): 0
> Attached is a patch to make Entity behavior similar to the observed behavior of the RI
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira