harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey A. Ivanov (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-2780) [classlib][swing] j.s.text.DefaultCaret.adjustVisibility throws NPE whereas RI doesn't
Date Mon, 18 Dec 2006 15:40:21 GMT
[classlib][swing] j.s.text.DefaultCaret.adjustVisibility throws NPE whereas RI doesn't

                 Key: HARMONY-2780
                 URL: http://issues.apache.org/jira/browse/HARMONY-2780
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
            Reporter: Alexey A. Ivanov
            Priority: Minor

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 {
        public void adjustVisibility(Rectangle r) {

    public static void main(String[] args) {
        new DefCaret().adjustVisibility(null);
======= 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 -------
------ end of output -------

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


View raw message