harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Hindess (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-2780) [classlib][swing] j.s.text.DefaultCaret.adjustVisibility throws NPE whereas RI doesn't
Date Sun, 14 Jan 2007 22:19:27 GMT

     [ 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

        

Mime
View raw message