Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 75888 invoked from network); 9 Jan 2007 18:54:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jan 2007 18:54:50 -0000 Received: (qmail 37591 invoked by uid 500); 9 Jan 2007 18:54:56 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 37342 invoked by uid 500); 9 Jan 2007 18:54: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 37287 invoked by uid 99); 9 Jan 2007 18:54:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jan 2007 10:54: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; Tue, 09 Jan 2007 10:54:48 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C244B7142BA for ; Tue, 9 Jan 2007 10:54:27 -0800 (PST) Message-ID: <13757876.1168368867792.JavaMail.jira@brutus> Date: Tue, 9 Jan 2007 10:54:27 -0800 (PST) From: "Dmitry Irlyanov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-1742) [classlib][swing] javax.swing.text.MaskFormatter.valueToString(Object) throws unspecified NPE 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-1742?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dmitry Irlyanov updated HARMONY-1742: ------------------------------------- Attachment: H1742-MaskFormatter.patch > [classlib][swing] javax.swing.text.MaskFormatter.valueToString(Object) throws unspecified NPE > --------------------------------------------------------------------------------------------- > > Key: HARMONY-1742 > URL: https://issues.apache.org/jira/browse/HARMONY-1742 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Svetlana Samoilenko > Priority: Minor > Attachments: H1742-MaskFormatter.patch, H1742-MaskFormatterTest.patch, MaskFormatterTest.patch, MaskFormatterTest.patch > > > Description: > javax.swing.text.MaskFormatter.valueToString(Object) throws unspecified NPE. > The same issue is for MaskFormatter.install(JFormattedTextField) method. > Test for reproducing: > import junit.framework.TestCase; > import javax.swing.*; > import javax.swing.text.*; > import java.text.*; > public class test extends TestCase { > public void testValueToString_Object() throws ParseException{ > MaskFormatter obj = new MaskFormatter(); > obj.valueToString(new Object()); > } > public void testInstall_JFormattedTextField() { > MaskFormatter obj = new MaskFormatter(); > obj.install(new JFormattedTextField()); > } > } > HARMONY output: > ============== > Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable. > java version "1.5.0" > pre-alpha : not complete or compatible > svn = r450941, (Sep 28 2006), Windows/ia32/msvc 1310, release build > http://incubator.apache.org/harmony > .E.E > Time: 1.109 > There were 2 errors: > 1) testValueToString_Object(test)java.lang.NullPointerException > at javax.swing.text.MaskFormatter.fillAll(MaskFormatter.java:202) > at javax.swing.text.MaskFormatter.valueToString(MaskFormatter.java:193) > at test.testValueToString_Object(test.java:10) > at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java) > 2) testInstall_JFormattedTextField(test)java.lang.NullPointerException > at javax.swing.text.MaskFormatter.fillAll(MaskFormatter.java:202) > at javax.swing.text.MaskFormatter.valueToString(MaskFormatter.java:193) > at javax.swing.JFormattedTextField$AbstractFormatter.updateText(JFormattedTextField.java:99) > at javax.swing.JFormattedTextField$AbstractFormatter.install(JFormattedTextField.java:92) > at javax.swing.text.MaskFormatter.install(MaskFormatter.java:119) > at test.testInstall_JFormattedTextField(test.java:14) > at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java) > FAILURES!!! > Tests run: 2, Failures: 0, Errors: 2 > SUN output: > ========= > 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: 0.01 > OK (2 test) -- 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