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.
Summary: | Variable name "aNull" is generated for "isNull" method by "Assign Return Value To New Variable" | ||
---|---|---|---|
Product: | java | Reporter: | matthies <matthies> |
Component: | Hints | Assignee: | Max Sauer <msauer> |
Status: | RESOLVED WONTFIX | ||
Severity: | blocker | ||
Priority: | P4 | ||
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
matthies
2008-09-02 16:06:17 UTC
Not so serious IMHO. Just a little explanation - the name of variable derived by removing is/get for getter methods. Is the result is a keyword a prefix 'a' is added. Yes, I guessed so much. But normally no prefix 'a' is added. It is only added when the result would match a Java keyword and hence wouldn't be a valid identifier. The defect is that adding 'a' assumes that the removed prefix was 'get'. At least in the case of 'is', it begs the question why the 'is' was removed in the first place when a new prefix has to be added anyway. Possible solutions: 1) Make the fallback prefix dependent on the removed prefix. 2) Don't remove the getter prefix in the first place if the result is a Java keyword. 3) Use the normal name collision logic which appends a number (e.g. "null1"). This will be resolved LATER. NetBeans.org Migration: changing resolution from LATER to WONTFIX |