The deadlock seems to happen because DefaultModelPersistence.this.lock is still locked when PersistentModelConverter.toModel is called. Since the purpose of the lock is to synchronise access to the content of the property file this is not necessary.
This change moves the call to PersistentModelConverter.toModel outside of the lock and should therefore avoid the deadlock situation.
Fixes https://github.com/eclipse/buildship/issues/1275
The deadlock seems to happen because
DefaultModelPersistence.this.lock
is still locked whenPersistentModelConverter.toModel
is called. Since the purpose of the lock is to synchronise access to the content of the property file this is not necessary. This change moves the call toPersistentModelConverter.toModel
outside of the lock and should therefore avoid the deadlock situation.