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 2007/02/13 10:21:05 UTC
[jira] Closed: (HARMONY-2780) [classlib][swing]
j.s.text.DefaultCaret.adjustVisibility throws NPE whereas RI doesn't
[ https://issues.apache.org/jira/browse/HARMONY-2780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexey A. Ivanov closed HARMONY-2780.
-------------------------------------
Verified.
Thank you, Mark.
> [classlib][swing] j.s.text.DefaultCaret.adjustVisibility throws NPE whereas RI doesn't
> --------------------------------------------------------------------------------------
>
> Key: HARMONY-2780
> URL: https://issues.apache.org/jira/browse/HARMONY-2780
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Alexey A. Ivanov
> Assigned To: Mark Hindess
> Priority: Minor
> Attachments: H2780-DefaultCaret.patch, H2780-DefaultCaretTest.patch
>
>
> javax.swing.text.DefaultCaret.adjustVisibility(null) throws NullPointerException whereas RI works silently. The spec says nothing about exceptions.
> ======= Code to Reproduce =======
> import java.awt.Rectangle;
> import javax.swing.text.DefaultCaret;
> public class Test {
> private static class DefCaret extends DefaultCaret {
> @Override
> public void adjustVisibility(Rectangle r) {
> super.adjustVisibility(r);
> }
> }
> public static void main(String[] args) {
> new DefCaret().adjustVisibility(null);
> System.err.println("silent");
> }
> }
> ======= end of code =======
> ------ Harmony Output -------
> Exception in thread "main" java.lang.NullPointerException
> at javax.swing.text.DefaultCaret.adjustVisibility(DefaultCaret.java:415)
> at Test$DefCaret.adjustVisibility(Test.java:9)
> at Test.main(Test.java:14)
> ------- end of output -------
> ------- RI Output -------
> silent
> ------ end of output -------
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.