[GRADLE-488] TestNGOptions propertyMissing and methodMissing returns null if suiteXmlBuilder is null. Created: 19/May/09 Updated: 04/Jan/13 Resolved: 20/May/09 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | 0.6 |
Type: | Bug | ||
Reporter: | Hans Dockter | Assignee: | Tom Eyckmans |
Resolution: | Fixed | Votes: | 0 |
Description |
public def propertyMissing(String name) { if ( suiteXmlBuilder != null ) { return suiteXmlBuilder.getMetaClass()."${name}" } else { super.propertyMissing(name) } } public def methodMissing(String name, args) { if ( suiteXmlBuilder != null ) { return suiteXmlBuilder.getMetaClass().invokeMethod(suiteXmlBuilder, name, args); } else { super.methodMissing(name, args) } } The else value won't be used by Groovy as the return value. Thus the methods returns null in the else case. In Groovy 1.6 this behavior has changed (but we are still with 1.5.6). The code fix is obvious but we should also have a unit test checking this. |