Skip to content

Commit

Permalink
Refactor ComputeNodeInstanceContext.getLockContext()
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Dec 17, 2024
1 parent 694c6bf commit 1d8282f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,11 @@ public Optional<ComputeNodeInstance> getComputeNodeInstanceById(final String ins
}

/**
* Get lock context.
* Get lock context.
*
* @return lock context
* @throws IllegalStateException if lock context is not initialized
*/
public LockContext<?> getLockContext() throws IllegalStateException {
public LockContext<?> getLockContext() {
return Optional.ofNullable(lockContext.get()).orElseThrow(() -> new IllegalStateException("Lock context is not initialized."));
}
}

0 comments on commit 1d8282f

Please sign in to comment.