-
Bug
-
Resolution: Fixed
-
P3
-
6
-
b81
-
generic, x86
-
generic, windows, windows_xp
The following exception is thrown as result of FileDialog.setVisible(true) call
Exception in thread "main" java.lang.NullPointerException: null pData
at sun.awt.windows.WWindowPeer.setFocusableWindow(Native Method)
at sun.awt.windows.WWindowPeer.updateFocusableWindowState(WWindowPeer.java:66)
at java.awt.Window.updateChildFocusableWindowState(Window.java:753)
at java.awt.Dialog.conditionalShow(Dialog.java:928)
at java.awt.Dialog.show(Dialog.java:1032)
at java.awt.Component.show(Component.java:1415)
at java.awt.Component.setVisible(Component.java:1368)
at java.awt.Window.setVisible(Window.java:694)
at java.awt.Dialog.setVisible(Dialog.java:983)
at test.main(test.java:13)
It's a regression of the fix for the bug (fixed in b79):
6391763 REG: Window not gaining focus even after the parent dialog is made visible, WinXP
This code (see Dialog.java) makes the bug visible:
925 Window.updateChildFocusableWindowState(this);
here's simple test to reproduce the problem.
=================
import java.awt.*;
import java.awt.event.*;
public class test {
final static Frame frame = new Frame("frame");
public static void main(String[] argv){
FileDialog fd = new FileDialog(frame);
fd.setMode(FileDialog.LOAD);
fd.setTitle("File dialog");
fd.setVisible(true);
}
}
Exception in thread "main" java.lang.NullPointerException: null pData
at sun.awt.windows.WWindowPeer.setFocusableWindow(Native Method)
at sun.awt.windows.WWindowPeer.updateFocusableWindowState(WWindowPeer.java:66)
at java.awt.Window.updateChildFocusableWindowState(Window.java:753)
at java.awt.Dialog.conditionalShow(Dialog.java:928)
at java.awt.Dialog.show(Dialog.java:1032)
at java.awt.Component.show(Component.java:1415)
at java.awt.Component.setVisible(Component.java:1368)
at java.awt.Window.setVisible(Window.java:694)
at java.awt.Dialog.setVisible(Dialog.java:983)
at test.main(test.java:13)
It's a regression of the fix for the bug (fixed in b79):
6391763 REG: Window not gaining focus even after the parent dialog is made visible, WinXP
This code (see Dialog.java) makes the bug visible:
925 Window.updateChildFocusableWindowState(this);
here's simple test to reproduce the problem.
=================
import java.awt.*;
import java.awt.event.*;
public class test {
final static Frame frame = new Frame("frame");
public static void main(String[] argv){
FileDialog fd = new FileDialog(frame);
fd.setMode(FileDialog.LOAD);
fd.setTitle("File dialog");
fd.setVisible(true);
}
}
- duplicates
-
JDK-6411081 REGRESSION: java.awt.FileDialog.setVisible(true) throws an exception
-
- Closed
-
-
JDK-6412655 CTE_REGTEST/Generic/4273333/TestPrint.java fails
-
- Closed
-
-
JDK-6412758 Unable to save .java.policy file; NullPointerException being thrown (Windows)
-
- Closed
-