harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasily Zakharov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-3016) [classlib][swing] JColorChooser.showDialog() throws NPE if JDialog.setDefaultLookAndFeelDecorated(true) was called
Date Wed, 17 Jan 2007 17:58:30 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-3016?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465473
] 

Vasily Zakharov commented on HARMONY-3016:
------------------------------------------

Looking at the stack, it seems fixing issue HARMONY-2666 caused this problem.
Though it's still unclear why frame is null at BasicInternalFrameTitlePane initialization.

If HARMONY-2666 change is reverted, the test still crashes, with the following stack:

java.lang.NullPointerException
        at javax.swing.plaf.metal.MetalRootPaneTitlePane.loadWindowProperties(MetalRootPaneTitlePane.java:329)
        at javax.swing.plaf.metal.MetalRootPaneTitlePane.installTitlePane(MetalRootPaneTitlePane.java:23)
        at javax.swing.plaf.basic.BasicInternalFrameTitlePane.<init>(BasicInternalFrameTitlePane.java:429)
        at javax.swing.plaf.metal.MetalInternalFrameTitlePane.<init>(MetalInternalFrameTitlePane.java:96)
        (the rest as above) 


> [classlib][swing] JColorChooser.showDialog() throws NPE if JDialog.setDefaultLookAndFeelDecorated(true)
was called
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3016
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3016
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>         Environment: WinXP
>            Reporter: Vasily Zakharov
>
> Here's the code to reproduce:
> import java.awt.Color;
> import javax.swing.JColorChooser;
> import javax.swing.JDialog;
> public class Test {
>     public static void main(String[] args) {
>         JDialog.setDefaultLookAndFeelDecorated(true);
>         JColorChooser.showDialog(null, "JColorChooser", Color.BLACK);
>     }
> }
> It works fine on RI, but causes the following exception on Harmony:
> Exception in thread "main" java.lang.NullPointerException
>         at javax.swing.plaf.basic.BasicInternalFrameTitlePane.<init>(BasicInternalFrameTitlePane.java:423)
>         at javax.swing.plaf.metal.MetalInternalFrameTitlePane.<init>(MetalInternalFrameTitlePane.java:96)
>         at javax.swing.plaf.metal.MetalRootPaneTitlePane.<init>(MetalRootPaneTitlePane.java:190)
>         at javax.swing.plaf.metal.MetalRootPaneUI.createTitlePane(MetalRootPaneUI.java:448)
>         at javax.swing.plaf.metal.MetalRootPaneUI.installWindowDecorations(MetalRootPaneUI.java:393)
>         at javax.swing.plaf.metal.MetalRootPaneUI.propertyChange(MetalRootPaneUI.java:372)
>         at java.beans.PropertyChangeSupport.doFirePropertyChange(PropertyChangeSupport.java:342)
>         at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:62)
>         at java.awt.Component.firePropertyChangeImpl(Component.java:1666)
>         at java.awt.Component.firePropertyChange(Component.java:1670)
>         at javax.swing.JComponent.firePropertyChange(JComponent.java:56)
>         at javax.swing.JRootPane.setWindowDecorationStyle(JRootPane.java:229)
>         at javax.swing.JDialog.dialogInit(JDialog.java:486)
>         at javax.swing.JDialog.<init>(JDialog.java:93)
>         at javax.swing.JDialog.<init>(JDialog.java:129)
>         at javax.swing.JDialog.<init>(JDialog.java:241)
>         at javax.swing.JColorChooser.createDialog(JColorChooser.java:120)
>         at javax.swing.JColorChooser.showDialog(JColorChooser.java:15)
>         at Test.main(Test.java:9)
> If JDialog.setDefaultLookAndFeelDecorated(true) call is commented, or "true" is replaced
with "false", the window opens normally on both Harmony and RI.
> The problem is actual as of r497095.

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