[ROO-3651] Roo doesn't allow to generate methods with empty body Created: 26/Jul/15  Updated: 26/Jul/15  Resolved: 26/Jul/15

Status: Resolved
Project: Spring Roo
Component/s: None
Affects Version/s: 2.0.0.M1
Fix Version/s: 2.0.0.M2

Type: Improvement Priority: Minor
Reporter: Juan Carlos García del Canto Assignee: Juan Carlos García del Canto
Resolution: Complete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


If you try to generate a method using MethodMetadataBuilder and you want that your method has empty body, ROO shell shows the following error:

Method 'org.springframework.roo.classpath.details.MethodMetadataBuilder@714d0d01[methodName=myMethod,parameterTypes=[java.lang.String]]' failed to provide a body, despite being identified for ITD inclusion

This check is only necessary if return type is distinct to void, because method needs to return something, so body should not be blank...

Comment by Juan Carlos García del Canto [ 26/Jul/15 ]

Now ROO allow to generate methods with empty body.

This changes were tested to prevent errors:


Generated at Wed Oct 23 00:34:37 UTC 2019 using Jira 7.13.8#713008-sha1:1606a5c1e7006e1ab135aac81f7a9566b2dbc3a6.