nmatt opened a new issue, #9014:
URL: https://github.com/apache/netbeans/issues/9014
### Apache NetBeans version
Apache NetBeans 28
### What happened
Effectively final variables are not code-completed after a prefix within a
local class.
### Language / Project Type / NetBeans Component
_No response_
### How to reproduce
In the example class below, invoke code completion after the `a`.
=> `alsoCallable` is not proposed.
(The same for any longer prefix of `alsoCallable`.)
What does work:
- When declaring _alsoCallable_ as _final_, code completion after `a` does
propose it.
- Code completion after `c` does propose `callable` (although it is not
_final_ just like `alsoCallable`).
- Code completion without a prefix (e.g. within an empty`{}`) does propose
`alsoCallable`.
Example class:
```java
import java.util.concurrent.Callable;
class Example
{
void run(Callable<?> callable)
{
Callable<?> alsoCallable = callable;
new Thread()
{
@Override
public void run()
{
a // <- want code completion for alsoCallable.call() here
}
};
}
}
```
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
Windows
### JDK
21
### Apache NetBeans packaging
Apache NetBeans binary zip
### Anything else
_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