sonatype/nexus-p2-repository-plugin — pull request #14 by cstamas (2012-06-26 20:13:07+00:00)
Title: Enhancing lock management in P2 plugin.

Is about NXCM-4391

We had locks that were not properly unlocked in case of OOMError.
Well, this fix is not a guarantee -- as JVM _might not_ invoke finally blocks, we should at least try our best.

----

Minor line moves over all, but biggest change is in
AbstractP2MetadataSource where a lock.unlock() might "escape"
some finally block, as we had in NXCM-4391 (OOMError).

But, even if we have these changes, JVM does not guarantee, that
finally block will be invoked at all in case of Errors like OOM is,
but we try at least.