-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
6
-
x86
-
windows_2000
FULL PRODUCT VERSION :
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b78)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b78, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
The following assertion not being met:
assert event instanceof DropTargetDragEvent ||
event instanceof DropTargetDropEvent;
since null is not an instanceof either:
private TransferSupport support =
new TransferSupport(null, (DropTargetEvent)null);
REGRESSION. Last worked in version mustang
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached program using the -esa flag.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No output should be generated.
ACTUAL -
An error is thrown as a result of the assertion not being met.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "AWT-EventQueue-0" java.lang.AssertionError
at javax.swing.TransferHandler$TransferSupport.setDNDVariables(TransferHandler.java:250)
at javax.swing.TransferHandler$TransferSupport.<init>(TransferHandler.java:213)
at javax.swing.TransferHandler$TransferSupport.<init>(TransferHandler.java:184)
at javax.swing.TransferHandler$DropHandler.<init>(TransferHandler.java:1232)
at javax.swing.TransferHandler$DropHandler.<init>(TransferHandler.java:1220)
at javax.swing.TransferHandler.getDropTargetListener(TransferHandler.java:1036)
at javax.swing.TransferHandler.access$200(TransferHandler.java:59)
at javax.swing.TransferHandler$SwingDropTarget.<init>(TransferHandler.java:1135)
at javax.swing.SwingUtilities.installSwingDropTargetAsNecessary(SwingUtilities.java:84)
at javax.swing.JComponent.setTransferHandler(JComponent.java:3190)
at javax.swing.plaf.basic.BasicTreeUI.installListeners(BasicTreeUI.java:765)
at javax.swing.plaf.basic.BasicTreeUI.installUI(BasicTreeUI.java:631)
at javax.swing.plaf.metal.MetalTreeUI.installUI(MetalTreeUI.java:95)
at javax.swing.JComponent.setUI(JComponent.java:613)
at javax.swing.JTree.setUI(JTree.java:670)
at javax.swing.JTree.updateUI(JTree.java:686)
at javax.swing.JTree.<init>(JTree.java:641)
at javax.swing.JTree.<init>(JTree.java:539)
at test.Test$1.run(Test.java:11)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package test;
import javax.swing.JTree;
import javax.swing.SwingUtilities;
public class Test {
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new JTree();
}
});
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Disable system assertions.
Release Regression From : 5.0u6
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
java version "1.6.0-beta2"
Java(TM) SE Runtime Environment (build 1.6.0-beta2-b78)
Java HotSpot(TM) Client VM (build 1.6.0-beta2-b78, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
The following assertion not being met:
assert event instanceof DropTargetDragEvent ||
event instanceof DropTargetDropEvent;
since null is not an instanceof either:
private TransferSupport support =
new TransferSupport(null, (DropTargetEvent)null);
REGRESSION. Last worked in version mustang
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the attached program using the -esa flag.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
No output should be generated.
ACTUAL -
An error is thrown as a result of the assertion not being met.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exception in thread "AWT-EventQueue-0" java.lang.AssertionError
at javax.swing.TransferHandler$TransferSupport.setDNDVariables(TransferHandler.java:250)
at javax.swing.TransferHandler$TransferSupport.<init>(TransferHandler.java:213)
at javax.swing.TransferHandler$TransferSupport.<init>(TransferHandler.java:184)
at javax.swing.TransferHandler$DropHandler.<init>(TransferHandler.java:1232)
at javax.swing.TransferHandler$DropHandler.<init>(TransferHandler.java:1220)
at javax.swing.TransferHandler.getDropTargetListener(TransferHandler.java:1036)
at javax.swing.TransferHandler.access$200(TransferHandler.java:59)
at javax.swing.TransferHandler$SwingDropTarget.<init>(TransferHandler.java:1135)
at javax.swing.SwingUtilities.installSwingDropTargetAsNecessary(SwingUtilities.java:84)
at javax.swing.JComponent.setTransferHandler(JComponent.java:3190)
at javax.swing.plaf.basic.BasicTreeUI.installListeners(BasicTreeUI.java:765)
at javax.swing.plaf.basic.BasicTreeUI.installUI(BasicTreeUI.java:631)
at javax.swing.plaf.metal.MetalTreeUI.installUI(MetalTreeUI.java:95)
at javax.swing.JComponent.setUI(JComponent.java:613)
at javax.swing.JTree.setUI(JTree.java:670)
at javax.swing.JTree.updateUI(JTree.java:686)
at javax.swing.JTree.<init>(JTree.java:641)
at javax.swing.JTree.<init>(JTree.java:539)
at test.Test$1.run(Test.java:11)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
package test;
import javax.swing.JTree;
import javax.swing.SwingUtilities;
public class Test {
public static void main(String[] args) {
SwingUtilities.invokeLater(new Runnable() {
public void run() {
new JTree();
}
});
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Disable system assertions.
Release Regression From : 5.0u6
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
- duplicates
-
JDK-6405351 AssertionError in javax.swing.TransferHandler$TransferSupport
-
- Resolved
-