Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 74011 invoked from network); 15 Nov 2006 15:39:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Nov 2006 15:39:01 -0000 Received: (qmail 46452 invoked by uid 500); 15 Nov 2006 15:39:12 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 46350 invoked by uid 500); 15 Nov 2006 15:39:11 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 46333 invoked by uid 99); 15 Nov 2006 15:39:11 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Nov 2006 07:39:11 -0800 X-ASF-Spam-Status: No, hits=1.6 required=10.0 tests=GAPPY_SUBJECT X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Nov 2006 07:38:59 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 023377142D7 for ; Wed, 15 Nov 2006 07:38:39 -0800 (PST) Message-ID: <7525119.1163605119006.JavaMail.jira@brutus> Date: Wed, 15 Nov 2006 07:38:39 -0800 (PST) From: "Miguel Montes (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Commented: (HARMONY-1272) [classlib][html] Compatibility: j.s.t.h.p.ContentModel structure is different from the RI structure In-Reply-To: <30216137.1156475225733.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/HARMONY-1272?page=comments#action_12450070 ] Miguel Montes commented on HARMONY-1272: ---------------------------------------- OK > [classlib][html] Compatibility: j.s.t.h.p.ContentModel structure is different from the RI structure > --------------------------------------------------------------------------------------------------- > > Key: HARMONY-1272 > URL: http://issues.apache.org/jira/browse/HARMONY-1272 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Miguel Montes > Assigned To: Alexey Petrenko > Attachments: ContentModel_02.patch > > > The class j.s.t.h.p.ContentModel is a representation of a ContentModel. Basically it represents the content model as a binary tree. The structure of the tree created is different from the structure created by the RI, so the same sequence of constructor calls produces different trees. > The following code produces the content model (meta & base) with the RI, and throws an exception with Harmony > =============TestContentModel.java========== > import java.io.IOException; > import javax.swing.text.html.parser.ContentModel; > import javax.swing.text.html.parser.DTD; > public class TestContentModel { > public static void main(String[] args) throws IOException { > DTD dtd = DTD.getDTD("dummy"); > > ContentModel model1 = new ContentModel (dtd.getElement(3)); > ContentModel model2 = new ContentModel (0, dtd.getElement(2), model1); > ContentModel model = new ContentModel ('&', model2); > System.out.println("ContentModel: " + model); > } > } > ================================================== > [miguel@mp bin]$ java -showversion TestContentModel > 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) > ContentModel: (meta & base) > [miguel@mp bin]$ /harmony/harmony-hdk-r431938/jdk/jre/bin/java -showversion TestContentModel > 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 > java.lang.IllegalArgumentException: Illegal type, must be ,, |, & > at javax.swing.text.html.parser.ContentModel.checkBinaryType(ContentModel.java:310) > at javax.swing.text.html.parser.ContentModel.(ContentModel.java:78) > at TestContentModel.main(TestContentModel.java:16) > For generating the above content model with Harmony, the code is > ==============TestContentModel2===================== > import java.io.IOException; > import javax.swing.text.html.parser.ContentModel; > import javax.swing.text.html.parser.DTD; > public class TestContentModel2 { > public static void main(String[] args) throws IOException { > DTD dtd = DTD.getDTD("tmp"); > > ContentModel model1 = new ContentModel (dtd.getElement(2)); > ContentModel model2 = new ContentModel (dtd.getElement(3)); > ContentModel model = new ContentModel ('&', model1, model2); > System.out.println("ContentModel: " + model); > } > } > ======================================================== > [miguel@mp bin]$ /harmony/harmony-hdk-r431938/jdk/jre/bin/java -showversion TestContentModel2 > 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 > ContentModel: META&BASE > The same code produces a different content model with the RI > [miguel@mp bin]$ java -showversion TestContentModel2 > 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) > ContentModel: (meta) -- 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