Skip to content

BudgetCounters Javadoc describes a return value that does not exist #37

@nficano

Description

@nficano

BudgetCounters.ensureAllPositive is a void method, but its Javadoc at arcp-runtime/src/main/java/dev/arcp/runtime/lease/BudgetCounters.java around line 56 says it returns null if all budgets are positive and otherwise throws. That contradicts the method signature and makes the public API documentation look copied from an older nullable-returning design.

Fix prompt: Rewrite the Javadoc for ensureAllPositive so it accurately describes the side-effect-free validation behavior. The comment should say that the method returns normally when every tracked budget remains positive and throws BudgetExhaustedException when any tracked currency is exhausted. Add an @throws BudgetExhaustedException tag that explains the condition and include a focused test or doclint check that prevents stale @return-style prose on void methods.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationseverity:lowLow severity

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions