nmatt opened a new issue, #4783:
URL: https://github.com/apache/netbeans/issues/4783
### Apache NetBeans version
Apache NetBeans 15
### What happened
Example Java source code:
```java
public abstract class AbstractBase
{
abstract void method();
static
{
AbstractBase base = new Derived();
base.method();
}
}
final class Derived extends AbstractBase
{
@Override
void method() { return; } // (*)
}
```
NetBeans shows a warning and hint '*Remove unused "method"*' on the
overriding `method()` field (*), This is incorrect, because clearly the method
is being used, via the `AbstractBase` type. The usage analysis apparently
doesn't take overridden methods into account.
NetBeans 12.2 (which I used previously) does not show that warning, although
it does support the same hint ("Unused Element"). So this appears to be a
regression.
### How to reproduce
See example source code above.
### Did this work correctly in an earlier version?
Apache NetBeans 12.3 or earlier
### Operating System
Windows 10 Enterprise 22H1
### JDK
Oracle JDK 8u271
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
No
### Code of Conduct
Yes
--
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