7110590: DnDMerlinQLTestsuite_DnDJTextArea test fails with an java.awt.dnd.InvalidDnDOperationException
authordenis
Tue, 17 Jan 2012 19:09:32 +0400
changeset 11502 9d4e3b71c122
parent 11501 3c5730331052
child 11503 c40240392a01
7110590: DnDMerlinQLTestsuite_DnDJTextArea test fails with an java.awt.dnd.InvalidDnDOperationException Reviewed-by: art
jdk/src/share/classes/java/awt/AWTKeyStroke.java
--- 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) {