You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Denis Kishenko (JIRA)" <ji...@apache.org> on 2006/12/07 10:09:21 UTC
[jira] Created: (HARMONY-2514) [classlib][swing]
javax.swing.text.Segment.toString() throws unspecified NPE
[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
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
[jira] Commented: (HARMONY-2514) [classlib][swing]
javax.swing.text.Segment.toString() throws unspecified NPE
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472561 ]
Alexey A. Ivanov commented on HARMONY-2514:
-------------------------------------------
Works fine.
Thank you, Mark.
> [classlib][swing] javax.swing.text.Segment.toString() throws unspecified NPE
> ----------------------------------------------------------------------------
>
> Key: HARMONY-2514
> URL: https://issues.apache.org/jira/browse/HARMONY-2514
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Denis Kishenko
> Assigned To: Mark Hindess
> 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.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (HARMONY-2514) [classlib][swing]
javax.swing.text.Segment.toString() throws unspecified NPE
Posted by "Alexey Petrenko (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey Petrenko closed HARMONY-2514.
------------------------------------
> [classlib][swing] javax.swing.text.Segment.toString() throws unspecified NPE
> ----------------------------------------------------------------------------
>
> Key: HARMONY-2514
> URL: https://issues.apache.org/jira/browse/HARMONY-2514
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Denis Kishenko
> Assigned To: Mark Hindess
> 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.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HARMONY-2514) [classlib][swing]
javax.swing.text.Segment.toString() throws unspecified NPE
Posted by "Alexey A. Ivanov (JIRA)" <ji...@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
[jira] Resolved: (HARMONY-2514) [classlib][swing]
javax.swing.text.Segment.toString() throws unspecified NPE
Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HARMONY-2514?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Hindess resolved HARMONY-2514.
-----------------------------------
Resolution: Fixed
Assignee: Mark Hindess
Applied in r495875. Please confirm they have been applied as expected.
> [classlib][swing] javax.swing.text.Segment.toString() throws unspecified NPE
> ----------------------------------------------------------------------------
>
> Key: HARMONY-2514
> URL: https://issues.apache.org/jira/browse/HARMONY-2514
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Denis Kishenko
> Assigned To: Mark Hindess
> 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: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (HARMONY-2514) [classlib][swing]
javax.swing.text.Segment.toString() throws unspecified NPE
Posted by "Denis Kishenko (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2514?page=all ]
Denis Kishenko updated HARMONY-2514:
------------------------------------
Patch Info: [Patch Available]
> [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
[jira] Updated: (HARMONY-2514) [classlib][swing]
javax.swing.text.Segment.toString() throws unspecified NPE
Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
[ http://issues.apache.org/jira/browse/HARMONY-2514?page=all ]
Alexey A. Ivanov updated HARMONY-2514:
--------------------------------------
Attachment: H2514-SegmentTest.patch
Regression test case.
> [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