7110590: DnDMerlinQLTestsuite_DnDJTextArea test fails with an java.awt.dnd.InvalidDnDOperationException
Reviewed-by: art
--- a/jdk/src/share/classes/java/awt/AWTKeyStroke.java Mon Jan 16 18:28:56 2012 +0400
+++ b/jdk/src/share/classes/java/awt/AWTKeyStroke.java Tue Jan 17 19:09:32 2012 +0400
@@ -802,8 +802,11 @@
*/
protected Object readResolve() throws java.io.ObjectStreamException {
synchronized (AWTKeyStroke.class) {
- return getCachedStroke(keyChar, keyCode, modifiers, onKeyRelease);
+ if (getClass().equals(getAWTKeyStrokeClass())) {
+ return getCachedStroke(keyChar, keyCode, modifiers, onKeyRelease);
+ }
}
+ return this;
}
private static int mapOldModifiers(int modifiers) {