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.
The value default_return_value is undefined when applying template for overridden method. Steps to reproduce: 1) the template: <#-- A built-in Freemarker template (see http://freemarker.sourceforge.net) used for filling the body of overridden methods generated by the IDE. When editing the template, the following predefined variables, that will be then expanded into the corresponding values, could be used together with Java expressions and comments: ${super_method_call} a super method call ${method_return_type} a return type of a created method ${default_return_value} a value returned by the method by default ${method_name} name of the created method ${class_name} qualified name of the enclosing class ${simple_class_name} simple name of the enclosing class --> /* ${super_method_call} a super method call ${method_return_type} a return type of a created method ${default_return_value} a value returned by the method by default ${method_name} name of the created method ${class_name} qualified name of the enclosing class ${simple_class_name} simple name of the enclosing class */ <#if method_return_type?? && method_return_type != "void"> return ${super_method_call}; //To change body of generated methods, choose Tools | Templates. <#else> ${super_method_call}; //To change body of generated methods, choose Tools | Templates. </#if> 2) override the clone method -> @Override protected Object clone() throws CloneNotSupportedException { /* super.clone() a super method call java.lang.Object a return type of a created method Expression default_return_value is undefined on line 17, column 3 in Templates/Classes/Code/OverridenMethodBody. a value returned by the method by default clone name of the created method javaapplication103.JavaApplication103 qualified name of the enclosing class JavaApplication103 simple name of the enclosing class */ return super.clone(); //To change body of generated methods, choose Tools | Templates. } Product Version: NetBeans IDE Dev (Build 20120822-2d15d7042ee9) Java: 1.7.0_06; Java HotSpot(TM) 64-Bit Server VM 23.2-b09 System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb) User directory: C:\Users\jprox\AppData\Roaming\NetBeans\dev Cache directory: C:\Users\jprox\AppData\Local\NetBeans\Cache\dev
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/e7123da07acd
Integrated into 'main-golden', will be available in build *201208300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/e7123da07acd User: Dusan Balek <dbalek@netbeans.org> Log: Issue #217218: default_return_value is undefined - fixed.