Proposal: Elvis and Other Null-Safe Operators

Joseph D. Darcy Joe.Darcy at Sun.COM
Tue Mar 3 18:28:26 PST 2009

cadenza at wrote:
>> This will be very confusing when you use Foo from another part of your 
>> application and expect the value to be non-null and get a NPE. In fact 
>> the @Nonnull is positvely misleading.
>> Basically, you can't rely on JSR-305. The information needs to be 
>> rechecked. Thus, whats the point in using it at all?!! Documentation 
>> perhaps? Annotations are not suitable for handling language level issues
>> like nulls.
> An annotation processor visible to javac could perform the @nonNull check and
> cause the compilation to fail.


... and such checking is done with the Checkers framework associated 
with JSR 308 that is built on top of annotation processing:


More information about the coin-dev mailing list