Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.6-beta-1
-
None
Description
Given the following annotation type declaration in Java:
public @interface Timeout { int value(); TimeUnit unit(); }
In Java I can write:
@Timeout(5, unit = TimeUnit.SECONDS)
The Groovy equivalent is slightly more verbose:
@Timeout(value = 5, unit = TimeUnit.SECONDS)
Groovy should also allow the former style.
Additionally, Jochen has suggested to allow the following styles (see http://www.nabble.com/Annotation-syntax%3A-Java-vs.-Groovy-to17217160.html):
@Timeout(5, unit: TimeUnit.SECONDS) @Timeout(value: 5, unit: TimeUnit.SECONDS)