Skip to content

Breaking Change Proposals ('Treasury v3') #287

@lokka30

Description

@lokka30

Nobody is in the mood to make another breaking change to Treasury, though if we ever need to make one in the distant future, it would be best to make as many of these breaking changes all in one go to reduce the burden to implementers.

To avoid clogging up our issue tracker, I'd prefer to group these suggestions here.

Without further ado, let's look at the current proposals. Please add your vote in the comments.


Proposal: Adjust return type of EconomyProvider#registerCurrency from TriState to Boolean

Description

There is no purpose for the third state, FALSE, in the TriState that is returned from EconomyProvider#registerCurrency. TRUE is used for 'it worked', UNSPECIFIED is used for 'it was already registered', and an exception should be thrown in the overlapping CompletableFuture returned if the currency couldn't be registered, leaving zero purpose for the FALSE state.

Therefore, I recommend we simply switch the return type to Boolean so that TriState#TRUE is represented by a true value and TriState#UNSPECIFIED is represented by a false value (so that the boolean returned is a question of whether the currency was not already registered).

Voting

  • Yay: lokka30
  • Nay:

Sketchpad of ideas that need to be described and added above:

  • deleteAccount should return nothing (void), the boolean result false is meaningless since an exception should be thrown if the deletion doesn't go through.

Any further proposals? Add yours below and I'll pop it in here. Your vote counts too - add yours in the comments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: lowLow prioritystatus: on holdDevelopment is paused until further noticestatus: unconfirmedNeeds confirmation / validationtype: improvementA feature is added or adjustedunassigned developersNo maintainers or contributors are assigned to solve this yetunassigned target versionNo target/ideal project version has been assigned to this yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions