Apache NetBeans version
Apache NetBeans 28
What happened
The hint to add an import for a static method is not offered inside record classes.
Language / Project Type / NetBeans Component
Java, Hints
How to reproduce
Example:
record Example(String name)
{
Example { Objects.requireNonNull(name); }
void f() { System.currentTimeMillis(); }
}
=> No static-import hint is offered for requireNonNull() and currentTimeMillis().
Compare to the case of a regular class:
class Example
{
Example(String name) { Objects.requireNonNull(name); }
void f() { System.currentTimeMillis(); }
}
Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows
JDK
JDK 21
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
No response
Are you willing to submit a pull request?
No
Apache NetBeans version
Apache NetBeans 28
What happened
The hint to add an import for a static method is not offered inside record classes.
Language / Project Type / NetBeans Component
Java, Hints
How to reproduce
Example:
=> No static-import hint is offered for requireNonNull() and currentTimeMillis().
Compare to the case of a regular class:
Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows
JDK
JDK 21
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
No response
Are you willing to submit a pull request?
No