OsgiWebHookProviderWebHookRegistry has flawed locking logic

Description

The problem is here:

The problem is that if the tryLock fails with InterruptedException the unlock call in finally will fail because there is no lock held currently by the thread, so the effort to return an empty list is futile. Below is what happens when the InterruptedException indeed occurs (not the IllegalMonitorStateException thrown from the finally block):

Environment

None

Testing Notes

None

Status

Assignee

Unassigned

Reporter

Dariusz Kordonski

Labels

Add-on Type

None

Team

None

CC

None

Risk factor

None

QA Kickoff Status

None

QA Demo Status

None

Affects versions

Priority

Major
Configure