Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panache Reactive should use @CheckReturnValue #21796

Closed
cescoffier opened this issue Nov 29, 2021 · 1 comment · Fixed by #21810
Closed

Panache Reactive should use @CheckReturnValue #21796

cescoffier opened this issue Nov 29, 2021 · 1 comment · Fixed by #21810
Assignees
Labels
area/panache kind/enhancement New feature or request
Milestone

Comments

@cescoffier
Copy link
Member

Description

IntelliJ has a "smart" feature that introduces a warning in the user code if it detects a method call annotated with CheckReturnValue where the returned object is unused. It's pretty useful when the methods return Uni or Multi.

IntelliJ only checks for the annotation name, regardless of where it comes from. Thus, SmallRye Common Annotation provides such an annotation used in Mutiny, Vert.x Mutiny Bindings and SmallRye Reactive Messaging.

It would be pretty nice to have that annotation in Hibernate Reactive. Thus, IntelliJ users would not let Unis do nothing.

Implementation ideas

  1. Add the dependency
  2. Add the annotation in the generated code
@cescoffier cescoffier added the kind/enhancement New feature or request label Nov 29, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Nov 29, 2021

/cc @FroMage, @loicmathieu

@geoand geoand self-assigned this Nov 30, 2021
geoand added a commit to geoand/quarkus that referenced this issue Nov 30, 2021
geoand added a commit to geoand/quarkus that referenced this issue Nov 30, 2021
geoand added a commit that referenced this issue Nov 30, 2021
Add @CheckReturnValue to Hibernate Reactive Panache methods
@quarkus-bot quarkus-bot bot added this to the 2.6 - main milestone Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/panache kind/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants