ArcanePlugins / Treasury

🏦 A powerful multi-platform library for next-level plugin integrations.
https://hangar.papermc.io/ArcanePlugins/Treasury
Other
56 stars 13 forks source link

Add nullability annotations on methods #221

Closed MrIvanPlays closed 1 year ago

MrIvanPlays commented 1 year ago

since v2 migrated from subscribers to futures, we forgot to add @NotNull annotations on the return values of methods changed.

Jikoo commented 1 year ago

Imo we should also consider https://github.com/osundblad/intellij-annotations-instrumenter-maven-plugin to ease the workload of adding nullity annotations. It's easy to forget manual null checks when annotating.

lokka30 commented 1 year ago

Imo we should also consider https://github.com/osundblad/intellij-annotations-instrumenter-maven-plugin to ease the workload of adding nullity annotations. It's easy to forget manual null checks when annotating.

My personal preference is to do these manually.

MrIvanPlays commented 1 year ago

@lokka30 this library's about adding Objects.requireNonNull calls on fields annotated with @NotNull.

lokka30 commented 1 year ago

@lokka30 this library's about adding Objects.requireNonNull calls on fields annotated with @NotNull.

Thanks for clarifying – I'm happy to use it for that specific function. I'm being careful not to overstep with automation.