[
https://issues.apache.org/jira/browse/GROOVY-9669?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Paul King resolved GROOVY-9669.
-------------------------------
Fix Version/s: 3.0.6
Resolution: Fixed
Proposed PR merged. The non-GString parts of the PR were back ported to 3_0_X
so that {{@Immutable}} classes can benefit from checking the extra annotation.
I would in general not object to also supporting
{{javax.annotation.concurrent.Immutable}} even with its {{RetentionPolicy}}. It
could be used to annotate Groovy classes within the same compilation unit. But
since using the "javax." package violates Oracle's licensing terms and Oracle
don't release a jar with that annotation nor include it in recent JDKs, let's
just skip it for now as the current PR already does.
> Enhance immutability check
> --------------------------
>
> Key: GROOVY-9669
> URL: https://issues.apache.org/jira/browse/GROOVY-9669
> Project: Groovy
> Issue Type: Improvement
> Reporter: Daniel Sun
> Assignee: Daniel Sun
> Priority: Major
> Fix For: 4.0.0-alpha-1, 3.0.6
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> If a class is marked with one of the annotations:
> * {{groovy.transform.Immutable}} (already supported)
> * {{groovy.transform.KnownImmutable}} (already supported)
> * {{net.jcip.annotations.Immutable}} (supported by Findbugs and IntelliJ
> IDEA{{)}}
> * -{{javax.annotation.concurrent.Immutable}} (its RetentionPolicy is CLASS,
> can not be got via reflection)-
> we will believe their promise and treat them as immutable class.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)