Rework LockManager.getLock() in iterative fashion 83/40883/2
authorStephen Kitt <skitt@redhat.com>
Mon, 27 Jun 2016 15:22:17 +0000 (17:22 +0200)
committerSam Hague <shague@redhat.com>
Fri, 1 Jul 2016 19:01:07 +0000 (15:01 -0400)
commit5fd70afcf3edd17e56a43a5dc31c40f3eef14659
tree1580da9b188cedb6d8cf2e5e0459810fe5606565
parent47abc3957b04eb6a36c3546da39b993aaa166e47
Rework LockManager.getLock() in iterative fashion

getLock currently uses recursion, which limits the retries to the
available stack depth and causes some code duplication. Rewriting them
using loops feels clearer to me and simplifies the code.

Change-Id: I1134bcf653dce3d519b2002af5e78850e41ff284
Signed-off-by: Stephen Kitt <skitt@redhat.com>
lockmanager/lockmanager-impl/src/main/java/org/opendaylight/lockmanager/LockManager.java
lockmanager/lockmanager-impl/src/main/java/org/opendaylight/lockmanager/LockManagerUtils.java