8056211: api/java_awt/Event/InputMethodEvent/serial/index.html#Input[serial2002] failure
Reviewed-by: pchelko, alexsch
diff --git a/src/share/classes/java/awt/event/InputMethodEvent.java b/src/share/classes/java/awt/event/InputMethodEvent.java
index cd7122d..d90e5ec 100644
--- a/src/share/classes/java/awt/event/InputMethodEvent.java
+++ b/src/share/classes/java/awt/event/InputMethodEvent.java
@@ -417,7 +417,8 @@
private void readObject(ObjectInputStream s) throws ClassNotFoundException, IOException {
s.defaultReadObject();
if (when == 0) {
- when = getMostRecentEventTimeForSource(this.source);
+ // Can't use getMostRecentEventTimeForSource because source is always null during deserialization
+ when = EventQueue.getMostRecentEventTime();
}
}