You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexei Zakharov (JIRA)" <ji...@apache.org> on 2007/02/12 15:25:12 UTC

[jira] Resolved: (HARMONY-1699) [classlib][swing] NPE in BasicRootPaneUI caused by the JFileChooser.

     [ https://issues.apache.org/jira/browse/HARMONY-1699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexei Zakharov resolved HARMONY-1699.
--------------------------------------

    Resolution: Cannot Reproduce

I cannot reproduce the issue on the most recent Harmony snapshot. Looks like it was fixed by the patch from HARMONY-1867. Closing it as CANNOT REPRODUCE.

> [classlib][swing] NPE in BasicRootPaneUI caused by the JFileChooser.
> --------------------------------------------------------------------
>
>                 Key: HARMONY-1699
>                 URL: https://issues.apache.org/jira/browse/HARMONY-1699
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: Windows XP
>            Reporter: Oleg Khaschansky
>         Assigned To: Alexei Zakharov
>            Priority: Minor
>
> To reproduce do the following steps:
> 1. Run the testcase (listed below).
> 2. In the FileChooser select  the "File Name" text field.
> 3. Type in the name of any existing directory.
> 4. Press "Enter" key.
> As a result the NPE is thrown and user events are no more processed by the frame when FileChooser dialog is closed. On RI this works fine, no exceptions.
> -------------------------------------------------------------------------
> The testcase:
> import javax.swing.*;
> public class Test {
>    public static void main(String[] args) {
>        JFrame f = new JFrame();
>        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
>        f.setSize(100, 100);
>        f.setVisible(true);
>        JButton hello = new JButton("Hello");
>        f.getContentPane().add(hello);
>        f.getRootPane().setDefaultButton(hello);
>        new JFileChooser().showOpenDialog(f);
>     }
> }
> -------------------------------------------------------------------------
> Harmony output:
> java.lang.reflect.InvocationTargetException
> 	at java.awt.EventQueue.invokeAndWait(EventQueue.java:74)
> 	at java.awt.Toolkit.unsafeInvokeAndWait(Toolkit.java:48)
> 	at java.awt.Dialog.showImpl(Dialog.java:256)
> 	at java.awt.Dialog.show(Dialog.java:246)
> 	at java.awt.Component.show(Component.java:3239)
> 	at java.awt.Component.setVisible(Component.java:321)
> 	at javax.swing.JFileChooser.showDialog(JFileChooser.java:51)
> 	at javax.swing.JFileChooser.showOpenDialog(JFileChooser.java:58)
> 	at ttt.main(ttt.java:14)
> Caused by: java.lang.NullPointerException
> 	at javax.swing.plaf.basic.BasicRootPaneUI$DefaultButtonAction.isEnabled(BasicRootPaneUI.java:70)
> 	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:455)
> 	at javax.swing.JComponent.processKeyBinding(JComponent.java:588)
> 	at javax.swing.JComponent.processKeyBindings(JComponent.java:783)
> 	at javax.swing.JComponent.processKeyEvent(JComponent.java:765)
> 	at java.awt.Component.processEvent(Component.java:3825)
> 	at java.awt.Container.processEvent(Container.java:1281)
> 	at java.awt.Component.dispatchEvent(Component.java:3718)
> 	at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:312)
> 	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:379)
> 	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:96)
> 	at java.awt.Component.dispatchEvent(Component.java:3687)
> 	at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:139)
> 	at java.awt.EventQueue.dispatchEvent(EventQueue.java:144)
> 	at java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:69)
> 	at java.awt.ModalContext.runModalLoop(ModalContext.java:43)
> 	at java.awt.Dialog$DialogModalContext.runModalLoop(Dialog.java:44)
> 	at java.awt.Dialog.showModal(Dialog.java:369)
> 	at java.awt.Dialog.access$000(Dialog.java:34)
> 	at java.awt.Dialog$1.run(Dialog.java:258)
> 	at java.awt.event.InvocationEvent.runAndNotify(InvocationEvent.java:88)
> 	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:77)
> 	at java.awt.EventQueueCore.dispatchEventImpl(EventQueueCore.java:131)
> 	at java.awt.EventQueue.dispatchEvent(EventQueue.java:144)
> 	at java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:69)
> 	at java.awt.EventDispatchThread.run(EventDispatchThread.java:48)

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