Jason70117 / jsr-305

Automatically exported from code.google.com/p/jsr-305
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
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 emily@soldal.org on 23 Oct 2011 at 4:31

GoogleCodeExporter commented 9 years ago
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 ryeb...@gmail.com on 28 Nov 2011 at 5:40