You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey A. Ivanov (JIRA)" <ji...@apache.org> on 2006/12/18 14:05:29 UTC
[jira] Updated: (HARMONY-2776) [classlib][swing]
j.s.text.BoxView.childAllocation does not throw NPE whereas RI does
[ http://issues.apache.org/jira/browse/HARMONY-2776?page=all ]
Alexey A. Ivanov updated HARMONY-2776:
--------------------------------------
Attachment: H2776-BoxView_WithChildrenTest.patch
Regression test.
> [classlib][swing] j.s.text.BoxView.childAllocation does not throw NPE whereas RI does
> -------------------------------------------------------------------------------------
>
> Key: HARMONY-2776
> URL: http://issues.apache.org/jira/browse/HARMONY-2776
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Priority: Minor
> Attachments: H2776-BoxView_WithChildrenTest.patch
>
>
> Consider the following example:
> import java.awt.Rectangle;
> import javax.swing.text.BoxView;
> import javax.swing.text.Element;
> import javax.swing.text.PlainDocument;
> import javax.swing.text.View;
> public class Test {
> private static class BV extends BoxView {
> public BV(final Element element, final int axis) {
> super(element, axis);
> }
> @Override
> public void childAllocation(final int index, final Rectangle alloc) {
> super.childAllocation(index, alloc);
> }
> }
> public static void main(String[] args) {
> BV bv = new BV(new PlainDocument().getDefaultRootElement(), View.Y_AXIS);
> bv.childAllocation(0, null);
> System.err.println("silent");
> }
> }
> ======= end of code =======
> Harmony prints:
> silent
> RI prints:
> java.lang.NullPointerException
> at javax.swing.text.BoxView.childAllocation(BoxView.java:669)
> at Test$BV.childAllocation(Test.java:59)
> at Test.main(Test.java:65)
--
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