Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 13728 invoked from network); 7 Dec 2006 11:38:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Dec 2006 11:38:50 -0000 Received: (qmail 85731 invoked by uid 500); 7 Dec 2006 11:38:58 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 85717 invoked by uid 500); 7 Dec 2006 11:38:58 -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 85708 invoked by uid 99); 7 Dec 2006 11:38:58 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Dec 2006 03:38:58 -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; Thu, 07 Dec 2006 03:38:49 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4DA007142F7 for ; Thu, 7 Dec 2006 03:38:29 -0800 (PST) Message-ID: <4472012.1165491509315.JavaMail.jira@brutus> Date: Thu, 7 Dec 2006 03:38:29 -0800 (PST) From: "Alexey A. Ivanov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-2514) [classlib][swing] javax.swing.text.Segment.toString() throws unspecified NPE In-Reply-To: <10262716.1165482561088.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-2514?page=all ] Alexey A. Ivanov updated HARMONY-2514: -------------------------------------- Attachment: H2514-Segment.patch The fix: added a check (array != null) before constructing String object. > [classlib][swing] javax.swing.text.Segment.toString() throws unspecified NPE > ---------------------------------------------------------------------------- > > Key: HARMONY-2514 > URL: http://issues.apache.org/jira/browse/HARMONY-2514 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Denis Kishenko > Attachments: H2514-Segment.patch, H2514-SegmentTest.patch > > > javax.swing.text.Segment.toString() throws unspecified NPE on Harmony, but RI doesn't. > ============ Test ============= > import junit.framework.TestCase; > import javax.swing.text.Segment; > public class Test extends TestCase { > public void testcase() { > System.out.println("s.toString() = " + new Segment().toString()); > } > } > ============ Harmony ========== > .java.lang.NullPointerException > at javax.swing.text.Segment.toString(Segment.java:144) > at Test.testcase(Test.java:11) > at java.lang.reflect.VMReflection.invokeMethod(Native Method) > at java.lang.reflect.Method.invoke(Unknown Source) > at junit.framework.TestCase.runTest(TestCase.java:154) > at junit.framework.TestCase.runBare(TestCase.java:127) > at junit.framework.TestResult$1.protect(TestResult.java:106) > at junit.framework.TestResult.runProtected(TestResult.java:124) > at junit.framework.TestResult.run(TestResult.java:109) > at junit.framework.TestCase.run(TestCase.java:118) > at junit.framework.TestSuite.runTest(TestSuite.java:208) > at junit.framework.TestSuite.run(TestSuite.java:203) > at junit.textui.TestRunner.doRun(TestRunner.java:115) > at junit.textui.TestRunner.start(TestRunner.java:172) > at junit.textui.TestRunner.main(TestRunner.java:138) > F > Time: 0.016 > There was 1 failure: > 1) testcase(Test)junit.framework.AssertionFailedError > at Test.testcase(Test.java:15) > at java.lang.reflect.VMReflection.invokeMethod(Native Method) > FAILURES!!! > Tests run: 1, Failures: 1, Errors: 0 > =========== RI ============ > .s.toString() = > Time: 0 > OK (1 test) -- 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