Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 94542 invoked from network); 12 Jan 2007 10:32:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jan 2007 10:32:48 -0000 Received: (qmail 55980 invoked by uid 500); 12 Jan 2007 10:32:55 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 55955 invoked by uid 500); 12 Jan 2007 10:32:55 -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 55945 invoked by uid 99); 12 Jan 2007 10:32:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Jan 2007 02:32:55 -0800 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; Fri, 12 Jan 2007 02:32:47 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9826D714313 for ; Fri, 12 Jan 2007 02:32:27 -0800 (PST) Message-ID: <25139710.1168597947605.JavaMail.jira@brutus> Date: Fri, 12 Jan 2007 02:32:27 -0800 (PST) From: "Mark Hindess (JIRA)" To: commits@harmony.apache.org Subject: [jira] Assigned: (HARMONY-1797) [classlib][swing] javax.swing.text.PlainDocument.removeUpdate(AbstractDocument.DefaultDocumentEvent chng) throws unspecified NullPointerException 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-1797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mark Hindess reassigned HARMONY-1797: ------------------------------------- Assignee: Mark Hindess > [classlib][swing] javax.swing.text.PlainDocument.removeUpdate(AbstractDocument.DefaultDocumentEvent chng) throws unspecified NullPointerException > ------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-1797 > URL: https://issues.apache.org/jira/browse/HARMONY-1797 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Aleksey Victorivich Yantsen > Assigned To: Mark Hindess > Priority: Minor > Attachments: H1797-PlainDocument.patch, H1797-PlainDocumentTest.patch, patch1797.txt > > > Problem: javax.swing.text.PlainDocument.removeUpdate(AbstractDocument.DefaultDocumentEvent chng) throws unspecified NullPointerException if no change where made to document before removeUpdate is invoked. > Test to reproduce: > import junit.framework.TestCase; > import javax.swing.text.PlainDocument; > import javax.swing.text.AbstractDocument; > import javax.swing.text.html.HTMLDocument; > import javax.swing.event.DocumentEvent; > class MyPlainDocument extends PlainDocument { > public void removeUpdate(AbstractDocument.DefaultDocumentEvent chng) { > super.removeUpdate(chng); > } > } > public class Test extends TestCase { > public void testcase() { > MyPlainDocument mpd = new MyPlainDocument(); > HTMLDocument localHTMLDocument = new HTMLDocument(); > AbstractDocument.DefaultDocumentEvent chng = localHTMLDocument.new DefaultDocumentEvent( 3, 13, DocumentEvent.EventType.INSERT); > > mpd.removeUpdate(chng); // no exception should be thrown > } > } > Output on Sun 1.5: > ================== > 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) > . > Time: 1.25 > OK (1 test) > 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 > .E > Time: 0.812 > There was 1 error: > 1) testcase(Test)java.lang.NullPointerException > at javax.swing.text.PlainDocument.removeUpdate(PlainDocument.java:155) > at MyPlainDocument.removeUpdate(Test.java:10) > at Test.testcase(Test.java:21) > at java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:25) > FAILURES!!! > Tests run: 1, Failures: 0, Errors: 1 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira