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.

Bug 239810

Summary: "Insert code..."->"Add Property..." in java editor allows reserved keywords as name
Product: java Reporter: kleinf
Component: EditorAssignee: Dusan Balek <dbalek>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.4   
Hardware: Other   
OS: Other   
Issue Type: ENHANCEMENT Exception Reporter:

Description kleinf 2013-12-26 15:04:33 UTC
If I use "Insert code..."->"Add Property..." from the context menu to generate code for a property and enter a keyword like "class" or "if" as the property's name there is no warning; generating the code is not prevented. But the resulting code is clearly invalid.
It would be nice to get a warning at least or prevent the code generation at all, especially since naming conflicts with class members are checked. (The behavior is somehow inconsistent, if some kinds of invalid names are checked and others not.)