Saljack opened a new issue, #6557:
URL: https://github.com/apache/netbeans/issues/6557
### Description
JUnit 5 allows to use methods without any access modifier. Developers do not
need to add `public` modifier and test classes are more readable. These test
methods without any access modifier and with `@Test` annotation are marked in
NetBeans as unused. This is not correct behaviour because these methods are
used by the JUnit 5 runner.
```java
import org.junit.jupiter.api.Test;
class TestClass {
@Test
void unusedTestMethod() { // <-- this is marked as unused
// test code
}
}
```
It would be really nice to remove this false positive warning or disable
some hints only in test files.
Note:
There are multiple annotations which mark test methods e.g.
`@ParamatrizedTest` so it should check if method has anywhere `@Testable`
annotation.
### Use case/motivation
The test classes contain many warnings and it is easy to overlook some
meaningful warning/error.
### Related issues
_No response_
### Are you willing to submit a pull request?
No
--
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