Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@Immutable should have RetentionPolicy.RUNTIME to allow for testability #21

Open
GoogleCodeExporter opened this issue Apr 22, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

If Immutable does not have RetentionPolicy.RUNTIME then there is no easy way to 
test for immutability.

I've been writing a Test-by-Contract JUnit system which would be able to test 
for Immutability, but this is dependent upon @Immutable, and perhaps a few 
other annotations, being available at runtime.

Original issue reported on code.google.com by [email protected] on 23 Oct 2011 at 4:31

@GoogleCodeExporter
Copy link
Author

JSR107 needs a runtime annotation for classes that are @Immutable for the 
specific case mentioned. 


https://github.com/jsr107/jsr107spec/issues/9

Because JSR305 doesn't have any timeframe for completion, it's likely a 
different one will be defined as part of JSR107 that will have 
RetentionPolicy.RUNTIME

Original comment by [email protected] on 28 Nov 2011 at 5:40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant