You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mark Hindess (JIRA)" <ji...@apache.org> on 2007/01/14 23:19:27 UTC

[jira] Resolved: (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 ]

Mark Hindess resolved HARMONY-2780.
-----------------------------------

    Resolution: Fixed
      Assignee: Mark Hindess

Applied patches in r496167.  Please confirm they have been applied as expected.

> [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.
-
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