[Checkers] JSR-308 backward compatibility

Mahmood Ali mahmood at MIT.EDU
Fri Apr 25 16:25:00 EDT 2008


> What is the recommended way to obtain backward compatibility for
> compilation by non-JSR-308 compilers?


The recommended way as of this coming release would be:
1. having all type annotations within comments e.g. /*@NonNull*/, like  
specified before.
2. Passing the import specifiers to the environment variable  
'jsr308.imports'.  You can either pass it as a command-line argument  
to java '-Djsr308.imports="checkers.quals.*"' or simple saved as  
system global variable (via export, set).  You can seperate various  
packages via the file path seperator, so in unix it would be  
"checkers.quals.NonNull:checkers.quals.Nullable".

I thought that this solution was a bit nicer than having commented  
imports.

- Mahmood




More information about the checkers mailing list