google / google/error-prone

`UnusedMethod` marks CDI observer methods as unused

Open
#5,123 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
820
Avg merge
5h 9m
Merged PRs (30d)
50

Description

CDI observer methods have a method parameter annotated with (using the jakarta namespace) `jakarta.enterprise.event.Observes` or `jakarta.enterprise.event.ObservesAsync` for synchronous or asynchronous event observation respectively.

`UnusedMethod` only ignores methods that annotated with selected annotation like e.g. `jakarta.annotation.PostConstruct` and others.

As such these CDI observer methods will be marked as unused and produce a warning.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.