Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 3931 invoked from network); 24 Jan 2007 12:51:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jan 2007 12:51:40 -0000 Received: (qmail 74985 invoked by uid 500); 24 Jan 2007 12:51:46 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 74972 invoked by uid 500); 24 Jan 2007 12:51:45 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 74962 invoked by uid 99); 24 Jan 2007 12:51:45 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= 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, 24 Jan 2007 04:51:45 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 601627142E2 for ; Wed, 24 Jan 2007 04:50:49 -0800 (PST) Message-ID: <26253445.1169643049389.JavaMail.jira@brutus> Date: Wed, 24 Jan 2007 04:50:49 -0800 (PST) From: "Sergey Krivenko (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-1817) [classlib][swing] javax.swing.text.html.HTMLEditorKit.createInputAttributes(Element element,MutableAttributeSet set) does not throw NullPointerException when RI does MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-1817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467028 ] Sergey Krivenko commented on HARMONY-1817: ------------------------------------------ Looks like the bug is fixed. Please close the issue now. > [classlib][swing] javax.swing.text.html.HTMLEditorKit.createInputAttributes(Element element,MutableAttributeSet set) does not throw NullPointerException when RI does > --------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-1817 > URL: https://issues.apache.org/jira/browse/HARMONY-1817 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Aleksey Victorivich Yantsen > Priority: Minor > Attachments: HTMLEditorKitTest.java, StyledEditorKit_patch.txt > > > Problem: createInputAttributes(Element element, MutableAttributeSet set) does not throw NullPointerException when element or set are null. Reference implementation throws unspecified NullPointerException in such cases. > This is compatibility issue. > Test to reproduce: > import junit.framework.TestCase; > import javax.swing.text.Element; > import javax.swing.text.MutableAttributeSet; > import javax.swing.text.SimpleAttributeSet; > import javax.swing.text.html.HTMLDocument; > import javax.swing.text.html.HTMLEditorKit; > public class Test extends TestCase { > class MyHTMLEditorKit extends HTMLEditorKit { > public void createInputAttributes(Element element, > MutableAttributeSet set) { > super.createInputAttributes(element, set); > } > } > public void testElementIsNull() { > MyHTMLEditorKit mhe = new MyHTMLEditorKit(); > Element e = null; > MutableAttributeSet mas = new SimpleAttributeSet(); > > mhe.createInputAttributes(e, mas); > } > public void testSetIsNull() { > MyHTMLEditorKit mhe = new MyHTMLEditorKit(); > HTMLDocument hd = new HTMLDocument(); > Element e = hd.getDefaultRootElement(); > MutableAttributeSet mas = null; > > mhe.createInputAttributes(e, mas); > } > } > Output on RI: > ================== > java version "1.5.0_06" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05) > Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode) > .E.E > Time: 0.375 > There were 2 errors: > 1) testElementIsNull(Test)java.lang.NullPointerException > at javax.swing.text.html.HTMLEditorKit.createInputAttributes(HTMLEditorKit.java:415) > at Test$MyHTMLEditorKit.createInputAttributes(Test.java:14) > at Test.testElementIsNull(Test.java:22) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > 2) testSetIsNull(Test)java.lang.NullPointerException > at javax.swing.text.html.HTMLEditorKit.createInputAttributes(HTMLEditorKit.java:414) > at Test$MyHTMLEditorKit.createInputAttributes(Test.java:14) > at Test.testSetIsNull(Test.java:31) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > FAILURES!!! > Tests run: 2, Failures: 0, Errors: 2 > Output on Harmony: > ================== > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r453981, (Oct 9 2006), Windows/ia32/msvc 1310, release build > http://incubator.apache.org/harmony > .. > Time: 0.39 > OK (2 tests) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.