Skip to content

docs(lock): clarify ILockManager API documentation#59984

Open
joshtrichards wants to merge 3 commits intomasterfrom
jtr/docs-lock-ILockManager-API
Open

docs(lock): clarify ILockManager API documentation#59984
joshtrichards wants to merge 3 commits intomasterfrom
jtr/docs-lock-ILockManager-API

Conversation

@joshtrichards
Copy link
Copy Markdown
Member

Summary

Improve the ILockManager documentation and also fix a presumed bug in the underlying registerLockProvider() implementation.

Changes

  • improve the interface-level description for ILockManager
  • document registerLazyLockProvider() throwing PreConditionNotMetException when a provider is already registered
  • document runInScope() throwing PreConditionNotMetException when a scope is already active
  • fix getLockInScope() docs to reflect that it returns null when no scope is active instead of throwing
  • clarify that isLockProviderAvailable() checks current availability and may attempt lazy provider resolution
  • Implementation fix: align registerLockProvider() behavior with the documented single-provider registration contract by also rejecting previously registered lazy providers

Notes

This change is intended to improve API clarity and keep the public interface documentation in sync with the implementation. No functional behavior changes are intended beyond the consistency fix in registerLockProvider().

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Signed-off-by: Josh <josh.t.richards@gmail.com>
LockManager::registerLazyLockProvider() checks for both eager and lazy, but the older registerLockProvider() did not.

Signed-off-by: Josh <josh.t.richards@gmail.com>
Signed-off-by: Josh <josh.t.richards@gmail.com>
@joshtrichards joshtrichards added this to the Nextcloud 34 milestone Apr 28, 2026
@joshtrichards joshtrichards changed the title Jtr/docs lock i lock manager api docs(lock): clarify ILockManager API documentation Apr 28, 2026
@joshtrichards joshtrichards added the 3. to review Waiting for reviews label Apr 28, 2026
@joshtrichards joshtrichards marked this pull request as ready for review April 28, 2026 17:21
@joshtrichards joshtrichards requested a review from a team as a code owner April 28, 2026 17:21
@joshtrichards joshtrichards requested review from CarlSchwan, juliusknorr, leftybournes, provokateurin and salmart-dev and removed request for a team April 28, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants