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/20 16:24:21 UTC

[jira] Created: (HARMONY-2819) [classlib][swing] j.s.text.JTextComponent.fireCaretUpdate(null) throws unspecified NPE

[classlib][swing] j.s.text.JTextComponent.fireCaretUpdate(null) throws unspecified NPE
--------------------------------------------------------------------------------------

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


RI works silently but Harmony throws NPE in the following code.

======== Code to Reproduce =======
import javax.swing.JEditorPane;
import javax.swing.event.CaretEvent;

public class Test {
    private static class Editor extends JEditorPane {
        @Override
        public void fireCaretUpdate(CaretEvent ce) {
            super.fireCaretUpdate(ce);
        }
    }

    public static void main(String[] args) {
        Editor editor = new Editor();
        editor.fireCaretUpdate(null);
    }
}
======= end of code =======

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

        

[jira] Resolved: (HARMONY-2819) [classlib][swing] j.s.text.JTextComponent.fireCaretUpdate(null) throws unspecified NPE

Posted by "Mark Hindess (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2819?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Hindess resolved HARMONY-2819.
-----------------------------------

    Resolution: Fixed
      Assignee: Mark Hindess

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

> [classlib][swing] j.s.text.JTextComponent.fireCaretUpdate(null) throws unspecified NPE
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2819
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2819
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexey A. Ivanov
>         Assigned To: Mark Hindess
>            Priority: Minor
>         Attachments: H2819-JTextComponent.patch, H2819-JTextComponentTest.patch
>
>
> RI works silently but Harmony throws NPE in the following code.
> ======== Code to Reproduce =======
> import javax.swing.JEditorPane;
> import javax.swing.event.CaretEvent;
> public class Test {
>     private static class Editor extends JEditorPane {
>         @Override
>         public void fireCaretUpdate(CaretEvent ce) {
>             super.fireCaretUpdate(ce);
>         }
>     }
>     public static void main(String[] args) {
>         Editor editor = new Editor();
>         editor.fireCaretUpdate(null);
>     }
> }
> ======= end of code =======

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

        

[jira] Closed: (HARMONY-2819) [classlib][swing] j.s.text.JTextComponent.fireCaretUpdate(null) throws unspecified NPE

Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-2819?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexey A. Ivanov closed HARMONY-2819.
-------------------------------------


Everything's correct.
Thank you, Mark.

> [classlib][swing] j.s.text.JTextComponent.fireCaretUpdate(null) throws unspecified NPE
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2819
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2819
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexey A. Ivanov
>         Assigned To: Mark Hindess
>            Priority: Minor
>         Attachments: H2819-JTextComponent.patch, H2819-JTextComponentTest.patch
>
>
> RI works silently but Harmony throws NPE in the following code.
> ======== Code to Reproduce =======
> import javax.swing.JEditorPane;
> import javax.swing.event.CaretEvent;
> public class Test {
>     private static class Editor extends JEditorPane {
>         @Override
>         public void fireCaretUpdate(CaretEvent ce) {
>             super.fireCaretUpdate(ce);
>         }
>     }
>     public static void main(String[] args) {
>         Editor editor = new Editor();
>         editor.fireCaretUpdate(null);
>     }
> }
> ======= end of code =======

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-2819) [classlib][swing] j.s.text.JTextComponent.fireCaretUpdate(null) throws unspecified NPE

Posted by "Alexey A. Ivanov (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/HARMONY-2819?page=all ]

Alexey A. Ivanov updated HARMONY-2819:
--------------------------------------

    Attachment: H2819-JTextComponentTest.patch
                H2819-JTextComponent.patch

Regression test and the fix.

Just wrapped the code which accesses CaretEvent information with check for null.

> [classlib][swing] j.s.text.JTextComponent.fireCaretUpdate(null) throws unspecified NPE
> --------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2819
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2819
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Alexey A. Ivanov
>            Priority: Minor
>         Attachments: H2819-JTextComponent.patch, H2819-JTextComponentTest.patch
>
>
> RI works silently but Harmony throws NPE in the following code.
> ======== Code to Reproduce =======
> import javax.swing.JEditorPane;
> import javax.swing.event.CaretEvent;
> public class Test {
>     private static class Editor extends JEditorPane {
>         @Override
>         public void fireCaretUpdate(CaretEvent ce) {
>             super.fireCaretUpdate(ce);
>         }
>     }
>     public static void main(String[] args) {
>         Editor editor = new Editor();
>         editor.fireCaretUpdate(null);
>     }
> }
> ======= end of code =======

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