harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulex Yang (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (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
Date Wed, 27 Sep 2006 05:54:53 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1349?page=all ]

Paulex Yang resolved HARMONY-1349.
----------------------------------

    Resolution: Fixed

Miguel, patch applied at revision r450327 with minor changes, thanks a lot for this enhancement,
I noticed that you implemented three methods of Entity, but the JIRA and test only against
one, so I added some tests as well as merge the that one you provided.  Please verify the
problem is fully resolved as you expected. 

> [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
>         Assigned To: Paulex Yang
>            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

        

Mime
View raw message