As far as I understand, closures generated by the Groovy compiler contain
both doCall() and call() methods, where call() always delegate to doCall().

Typically, users will use a short form of closure invocation, which Groovy
translates to direct call of doCall(). This means that in a typical scenario
 the generated call() method will never get invoked.

When using JaCoCo for code coverage, it will report call() method as unused.
For these reasons, it looks sensible to me to annotate call() with @Generated.
That way call() method will not be in the coverage report, while the doCall(),
which contains the implementation of a closure body, will be reported as 
covered.

Tnx

Reply via email to