Hi All,

Please review a fix for a regression introduced inJDK-8030702: <https://bugs.openjdk.java.net/browse/JDK-8030702>Deadlock between subclass of AbstractDocument and UndoManager where UndoableEditEvent.getEdit() was made to return DefaultDocumentEventUndoableWrapper (or UndoableEdit, an interface) instead of CompoundEdit (a concrete class)
so when application wants to cast to CompoundEdit, it results in CCE.
Also, it seems the application expects DefaultDocumentEvent instance also via UndoableEditEvent.getEdit() so that it can utilise it to get offset and length of editable change.

Proposed fix is to make DefaultDocumentEvent implement UndoableEditLockSupport (used to prevent deadlock in 8030702 <https://bugs.openjdk.java.net/browse/JDK-8030702>). With this, no CCE is seen and the 8030702 <https://bugs.openjdk.java.net/browse/JDK-8030702> also passed.
http://cr.openjdk.java.net/~psadhukhan/8190763/webrev.00/

Regards
Prasanta

Reply via email to