[GRADLE-1425] StackOverflow in TestNGOptions Created: 06/Mar/11  Updated: 10/Apr/14  Resolved: 10/Apr/14

Status: Resolved
Project: Gradle
Affects Version/s: 1.0-milestone-1
Fix Version/s: 1.2-rc-1

Type: Bug
Reporter: Kevin Stembridge Assignee: Unassigned
Resolution: Fixed Votes: 0

Attachments: File build.gradle    

 Description   

The following line of code generates a StackOverflowError in TestNGOptions:

useTestNG() {options -> println project.version}

The full build.gradle file is attached. Note this is the build file from the Java Quickstart sample project with the above line of code added.

The following line of output is repeated until the overflow error occurs:

[ERROR] [org.gradle.BuildExceptionReporter] 	at org.gradle.api.tasks.testing.testng.TestNGOptions.methodMissing(TestNGOptions.groovy:209)

This code snippet is from the TestNGOptions class, line 209 is the one causing the overflow.

205: public def methodMissing(String name, args) {
206:     if (suiteXmlBuilder != null) {
207:         return suiteXmlBuilder.getMetaClass().invokeMethod(suiteXmlBuilder, name, args);
208:     } else {
209:        return super.methodMissing(name, args)
210:    }
211: }

Generated at Wed Jun 30 11:55:13 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.