-
Bug
-
Resolution: Not an Issue
-
P3
-
8u20, 8u25, 9
-
x86_64
-
windows_7
FULL PRODUCT VERSION :
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
Windows 7 Service pack 1
EXTRA RELEVANT SYSTEM CONFIGURATION :
Lenovo W530 laptop with NViadia K2000M graphic card (driver 331.82)
A DESCRIPTION OF THE PROBLEM :
When extending WindowAdapter, the windowClosed method is called in our sample with latest Java 7 (1.7.0_71) but not with latest Java 8 (1.8.0_25).
REGRESSION. Last worked in version 7u71
ADDITIONAL REGRESSION INFORMATION:
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
javac AWTTrampoline.java
javac Main.java
java Main
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Output of the last step gives the message "Hello Closed"
ACTUAL -
Output of the last step gives no message
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
==================================
File Main.java
public class Main {
public Main() {
AWTTrampoline.jumpInAWT();
}
public static void main(String[] a) {
Main window = new Main();
}
}
==================================
File AWTTrampoline.java
import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public final class AWTTrampoline extends WindowAdapter
{
private Frame frame;
private AWTTrampoline()
{
frame=new Frame();
frame.addWindowListener(this);
frame.dispose();
}
public static void jumpInAWT()
{
new AWTTrampoline();
}
public void windowClosed(WindowEvent e)
{
frame.removeWindowListener(this);
frame=null;
System.out.println("Hello Closed ");
}
}
---------- END SOURCE ----------
java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7601]
Windows 7 Service pack 1
EXTRA RELEVANT SYSTEM CONFIGURATION :
Lenovo W530 laptop with NViadia K2000M graphic card (driver 331.82)
A DESCRIPTION OF THE PROBLEM :
When extending WindowAdapter, the windowClosed method is called in our sample with latest Java 7 (1.7.0_71) but not with latest Java 8 (1.8.0_25).
REGRESSION. Last worked in version 7u71
ADDITIONAL REGRESSION INFORMATION:
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
javac AWTTrampoline.java
javac Main.java
java Main
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Output of the last step gives the message "Hello Closed"
ACTUAL -
Output of the last step gives no message
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
==================================
File Main.java
public class Main {
public Main() {
AWTTrampoline.jumpInAWT();
}
public static void main(String[] a) {
Main window = new Main();
}
}
==================================
File AWTTrampoline.java
import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public final class AWTTrampoline extends WindowAdapter
{
private Frame frame;
private AWTTrampoline()
{
frame=new Frame();
frame.addWindowListener(this);
frame.dispose();
}
public static void jumpInAWT()
{
new AWTTrampoline();
}
public void windowClosed(WindowEvent e)
{
frame.removeWindowListener(this);
frame=null;
System.out.println("Hello Closed ");
}
}
---------- END SOURCE ----------
- relates to
-
JDK-8020851 java.awt.event.WindowEvent spec should state that WINDOW_CLOSED event may not be delivered under certain circumstances
- Resolved
-
JDK-8015500 Prevent sending multiple WINDOW_CLOSED events for already disposed windows
- Closed