This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Example: class Example { void example() { new Isdn(); } } class Isdn { } Applying "Assign Return Value To New Value" to "new Isdn()" results in: class Example { void example() { Isdn dn = new Isdn(); } } class Isdn { } The expected result would be to name the variable "isdn" instead of "dn". Handling "is" as a boolean prefix does not make sense for constructor invocations.
The actual utility that tries to guess the name is in java.editor.
Created attachment 159820 [details] Possible change I prepared a patch - it tries to use the Tree where the identifier came from for better decision.