snowdrop-zen / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
1 stars 0 forks source link

Panache Reactive should use `@CheckReturnValue` #455

Closed snowdrop-bot closed 2 years ago

snowdrop-bot commented 2 years ago

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

https://github.com/quarkusio/quarkus/issues/21796


$upstream:21796$