What is the status of JSR 305?

Viewed 48599

I have seen the question JSR305 vs. JSR308 (Java Type Anotations) - Which is going to be the standard? and I understand the difference between JSR 308 and JSR 305.

I also understand that, at this time, 308 is slated for Java 7, and 305 is not, and I am curious about the overall status of 305.

Specifically, I am using Google Collections and JSR-305 in some of my projects (in a similar manner to what one of the Guice best practices advocates) and was wondering if there is a more "future direction"-friendly approach I should be using instead. I am planning to also ask about this on the JSR-305 group, but that group does not have much activity and I was just wondering if anyone here had any more info.

5 Answers

If you are concerned about nullability annotations then I would recommend using the ones provided by SpotBugs project from the edu.umd.cs.findbugs.annotations namespace. These days it should be supported by most linters or IDEs. It's not as nice as proposed javax.annotation in JSR 305, but remember that JSR 305 was never approved and actually no jar file with classes was ever attached to JSR 305 proposal.

Few more interesting articles regarding this:

JSR 305 vs JSR 308

There is barely any relation between JSR 305 and JSR 308. JSR 308 is about ability to apply annotations to generics (java type arguments). JSR 308 has been incorporated as part of Java SE 8.

The only link is that both JSRs are related to a two distinct projects (FindBugs and Checker Framework) which are touching null-safety and nullability annotations topic.

By content the JSRs are no way related.

According to Alex Millers Java 7 blog, JSR-308 (and 305) are scheduled to go in to Java 7. Perhaps he will show up here and give you more information.

Related