Closed JojOatXGME closed 4 years ago
For now, you can add custom annotation to your project and setup the inspection to recognize it.
We created 'MustBeInvokedByOverriders' annotation. Will appear in the next release.
@amaembo Thanks!! I'm actually a little bit confused that you used RetentionPolicy.RUNTIME
(like on the original annotation) instead of RetentionPolicy.CLASS
as writtin in the CONTRIBUTING.md.
Oops! Good catch, thanks! Fixed.
The Java | Inheritance issues | Method does not call super method inspection produces a warning when a method overrides another method without calling the super method. By default, this is only done when the super method is annotated with javax.annotation.OverridingMethodsMustInvokeSuper. I think that is a nice feature. Unfortunately, this annotation is not part of the official API and cannot be accessed when the JPMS (aka. Jigsaw) is used. I would like to see a similar annotation within this annotation module.