Sciweavers

Share
IEE
2008

Reducing the use of nullable types through non-null by default and monotonic non-null

9 years 10 months ago
Reducing the use of nullable types through non-null by default and monotonic non-null
With Java 5 annotations, we note a marked increase in tools that can statically detect potential null dereferences. To be effective such tools require that developers annotate declarations with nullity modifiers and have annotated API libraries. Unfortunately, in our experience specifying moderately large code bases, the use of non-null annotations is more labor intensive than it should be. Motivated by this experience, we conducted an empirical study of 5 open source projects totaling 700 KLOC which confirms that on average, 75% of reference declarations are meant to be non-null, by design. Guided by these results, we propose adoption the of a non-null-by-default semantics. This new default has advantages of better matching general practice, lightening developer annotation burden and being safer. We also describe the Eclipse JML JDT, a tool supporting the new semantics, including the ability to read the extensive API library specifications written in the Java Modeling Language (JML). ...
Patrice Chalin, Perry R. James, Frédé
Added 10 Dec 2010
Updated 10 Dec 2010
Type Journal
Year 2008
Where IEE
Authors Patrice Chalin, Perry R. James, Frédéric Rioux
Comments (0)
books