Hi Prasanta,

This is a compatibility issue.

The complexity of 8030702 is that it had to fix the concurrency issue without changing the API. So the only fix that may help here is the one that does not change the API.

--Semyon

On 12/14/2017 02:16 AM, Prasanta Sadhukhan wrote:

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