SlideShare a Scribd company logo
1 of 8
Download to read offline
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 - @bmathus
Unexpected…
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

More Related Content

Similar to Handle the billion-dollar mistake in Java

Economics of Open Source Software
Economics of Open Source SoftwareEconomics of Open Source Software
Economics of Open Source Software
Ray Toal
 

Similar to Handle the billion-dollar mistake in Java (20)

Highcharts wrapper for Seaside by Mariano Martinez Peck
Highcharts wrapper for Seaside by Mariano Martinez PeckHighcharts wrapper for Seaside by Mariano Martinez Peck
Highcharts wrapper for Seaside by Mariano Martinez Peck
 
Artificial intelligence training in hyderabad
Artificial intelligence training in hyderabadArtificial intelligence training in hyderabad
Artificial intelligence training in hyderabad
 
Disruption is Change is Future
Disruption is Change is FutureDisruption is Change is Future
Disruption is Change is Future
 
Will your intranet be replaced with a (chat) bot?
Will your intranet be replaced with a (chat) bot?Will your intranet be replaced with a (chat) bot?
Will your intranet be replaced with a (chat) bot?
 
Horacio Gonzalez | Hey people, have you looked at Flutter yet? | Codemotion M...
Horacio Gonzalez | Hey people, have you looked at Flutter yet? | Codemotion M...Horacio Gonzalez | Hey people, have you looked at Flutter yet? | Codemotion M...
Horacio Gonzalez | Hey people, have you looked at Flutter yet? | Codemotion M...
 
Building Bots Using IBM Watson
Building Bots Using IBM WatsonBuilding Bots Using IBM Watson
Building Bots Using IBM Watson
 
How Mistral AI raised €105m with no pitch deck or product
How Mistral AI raised €105m with no pitch deck or productHow Mistral AI raised €105m with no pitch deck or product
How Mistral AI raised €105m with no pitch deck or product
 
Mistral AI Strategic Memo.pdf
Mistral AI Strategic Memo.pdfMistral AI Strategic Memo.pdf
Mistral AI Strategic Memo.pdf
 
Horacio Gonzalez - Monitoring OVH - Codemotion Amsterdam 2019
Horacio Gonzalez - Monitoring OVH - Codemotion Amsterdam 2019Horacio Gonzalez - Monitoring OVH - Codemotion Amsterdam 2019
Horacio Gonzalez - Monitoring OVH - Codemotion Amsterdam 2019
 
210 - Software Population Pyramids: The Current and the Future of OSS Develop...
210 - Software Population Pyramids: The Current and the Future of OSS Develop...210 - Software Population Pyramids: The Current and the Future of OSS Develop...
210 - Software Population Pyramids: The Current and the Future of OSS Develop...
 
Human-in-the-loop in IoT Systems
Human-in-the-loop in IoT SystemsHuman-in-the-loop in IoT Systems
Human-in-the-loop in IoT Systems
 
Economics of Open Source Software
Economics of Open Source SoftwareEconomics of Open Source Software
Economics of Open Source Software
 
IRJET- A Survey to Chatbot System with Knowledge Base Database by using Artif...
IRJET- A Survey to Chatbot System with Knowledge Base Database by using Artif...IRJET- A Survey to Chatbot System with Knowledge Base Database by using Artif...
IRJET- A Survey to Chatbot System with Knowledge Base Database by using Artif...
 
AI & Robotics PPT For Schools Students.pptx
AI & Robotics PPT For Schools Students.pptxAI & Robotics PPT For Schools Students.pptx
AI & Robotics PPT For Schools Students.pptx
 
What Every Programmer has to know about AI ?
What Every Programmer has to know about AI ?What Every Programmer has to know about AI ?
What Every Programmer has to know about AI ?
 
Bluemix Paris Meetup- #10 - Développer des applications cognitives avec IBM ...
Bluemix Paris Meetup- #10 - Développer des applications cognitives avec IBM ...Bluemix Paris Meetup- #10 - Développer des applications cognitives avec IBM ...
Bluemix Paris Meetup- #10 - Développer des applications cognitives avec IBM ...
 
Bluemix Paris Meetup - session #10 Watson - Développer des applications cogn...
Bluemix Paris Meetup - session #10 Watson - Développer des applications cogn...Bluemix Paris Meetup - session #10 Watson - Développer des applications cogn...
Bluemix Paris Meetup - session #10 Watson - Développer des applications cogn...
 
CAA2014 Community Archaeology and Technology: Making community-driven, open s...
CAA2014 Community Archaeology and Technology: Making community-driven, open s...CAA2014 Community Archaeology and Technology: Making community-driven, open s...
CAA2014 Community Archaeology and Technology: Making community-driven, open s...
 
APIs are for humans (defrag-con)
APIs are for humans   (defrag-con)APIs are for humans   (defrag-con)
APIs are for humans (defrag-con)
 
From Makerspace to MarketSpace - Trondheim MakerFaire 2015
From Makerspace to MarketSpace - Trondheim MakerFaire 2015From Makerspace to MarketSpace - Trondheim MakerFaire 2015
From Makerspace to MarketSpace - Trondheim MakerFaire 2015
 

Recently uploaded

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Recently uploaded (20)

Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 

Handle the billion-dollar mistake in Java

  • 1. Handle The Billion-Dollar Mistake In Java Help tools understand your code Baptiste Mathus – MiPih EclipseCon France 2014
  • 2. Baptiste Mathus - EclipseCon France 2014 - @bmathus http://batmat.net
  • 3. Agenda •Null – a billion-dollar mistake? •@Nonnull, @Nullable… @WTF? •Tooling •Alternatives Baptiste Mathus - EclipseCon France 2014 - @bmathus
  • 4. 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
  • 5. Baptiste Mathus - EclipseCon France 2014 - @bmathus Unexpected…
  • 6. 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
  • 7. Code talks, slides walks… Baptiste Mathus - EclipseCon France 2014 - @bmathus
  • 8. 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