Click here to load reader
Upload
bmathus
View
245
Download
1
Embed Size (px)
DESCRIPTION
Slides associated with the EclipseCon session: https://www.eclipsecon.org/france2014/session/handle-billion-dollar-mistake-java-help-tools-understand-your-code Note: the session was essentially code-based, so the slides may not be really useful taken alone.
Citation preview
Handle The Billion-Dollar Mistake In Java
Help tools understand your code
Baptiste Mathus – MiPih
EclipseCon France 2014
Baptiste Mathus - EclipseCon France 2014 - @bmathus
http://batmat.net
Agenda
•Null – a billion-dollar mistake?
•@Nonnull, @Nullable… @WTF?
•Tooling
•Alternatives
Baptiste Mathus - EclipseCon France 2014 - @bmathus
The null concept: a billion-dollar mistake?
His creator, Sir Charles Antony Richard Hoare, says yes! :-)
[...] languages designs is serious scientific engineering activity. And we should begin to take responsibility for the mistakes our users make in the use of our languages.
– Tony Hoare
Baptiste Mathus - EclipseCon France 2014 - @bmathus
Baptiste Mathus - EclipseCon France 2014 - @bmathusUnexpected…
JSR305 : Annotations for software detections
Why @Nonnull… annotations?
« they express design decisions that may be implicit, or described in documentation, but not easily available to tools »
Baptiste Mathus - EclipseCon France 2014 - @bmathus
Code talks, slides walks…
Baptiste Mathus - EclipseCon France 2014 - @bmathus
References• Null References: The Billion Dollar Mistake
• http://www.infoq.com/presentations/Null-References-The-Billion-Dollar-Mistake-Tony-Hoare
• Eclipse Help For Using Null Analysis• http://eclip.se/2f
• JSR 308: Annotations on Java Types• https://www.jcp.org/en/jsr/detail?id=308
• To go further: the Checker Framework• http://types.cs.washington.edu/checker-framework/
• Experiment: runtime report of non-compliant calls (WIP)• https://github.com/Batmat/jsr305reporter
Baptiste Mathus - EclipseCon France 2014 - @bmathus