sdedic commented on code in PR #6277:
URL: https://github.com/apache/netbeans/pull/6277#discussion_r1281427862
##########
java/java.hints/src/org/netbeans/modules/java/hints/bugs/Unused.java:
##########
@@ -56,12 +62,33 @@ public class Unused {
@TriggerTreeKind(Kind.COMPILATION_UNIT)
public static List<ErrorDescription> unused(HintContext ctx) {
List<UnusedDescription> unused =
UnusedDetector.findUnused(ctx.getInfo(), () -> ctx.isCanceled());
+ Set<UnusedDescription> toRemove = new HashSet<>();
+ if (!unused.isEmpty()) {
+ List<TestMethodController.TestMethod> tms =
getTestMethods(ctx.getInfo());
Review Comment:
I'd prefer some SPI that other modules could plug into. For example,
`@RequestMapping` or other annotations could be put even on a private method
(although discouraged), and should be deemed "used" -- tracked as #6284
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists