Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.12
-
None
Description
This problem was marked fixed with GROOVY-9855, but I'm seeing (a variant of?) it again:
@Grab(Example.CONSTANT) // ^ The value for annotation attribute Grab.value must be a constant expression class Example { public static final String GROUP = 'asdf' public static final String CONSTANT = GROUP + ':asdf:0.1' }
In case it's relevant, the non-minimal case involves a statically imported constant from another class:
class MyController { public static final String PARAM_OWNER = 'filter[' + REL_OWNER + ']' @GetMapping(params = PARAM_OWNER) // ^ Expected 'PARAM_OWNER' to be an inline constant of type java.lang.String not a field expression in @org.springframework.web.bind.annotation.GetMapping ... }
Attachments
Issue Links
- is related to
-
GROOVY-11179 JSR308 inline constants for annotations in class header
- Closed
-
GROOVY-10750 Compiler does not resolve compile-time constants in string concatenation
- Closed