When I use annotation @Endpoint the method is remain unused the I use SonarQube to scan the project It was detected as unused method and affected to the code quality result. So, What is the solution for this problem?
It is a false positive, so make SonarQube ignore it.
IIRC annotating the method with SuppressWarnings("unused")
should do the trick.
2 Likes
I would change the SonarQube configuration, which you should do anyway as the default often doesn’t fit.
2 Likes