JDT embraces type annotations

Status:
Accepted

Java 8 is coming. It is happening right here. Developers of your favorite Java IDE are participating in shaping this long awaited milestone for the Java ecosystem: On time with the GA of Java 8, JDT will ship its first release with support for developing in Java 8.

While everybody talks about lambda expressions, Java 8 brings another major enhancement that is less known: type annotations.

So, now we can place annotations in more locations, but why should we care?

This talk will motivate the idea of pluggable type systems and showcase how many classes of typical programming errors can potentially be detected right during compile time - if the program contains sufficient information.

The presentation will use the best known example for type annotations: null annotations, which in the era of Java 8 will significantly gain in power, bringing us a good step forward towards provably NPE-free programs.

Advice is given for regular developers and specifically for framework developers, for whom null type annotations bring new flexibility, responsibility and protection.

Null analysis based on type annotations will be demonstrated live in the IDE.

From the wide range of problems to which type annotations can be applied I will also highlight approaches to tackle

  • issues resulting from using identity comparison ('==') where actually equals() should be called, and
  • the problem of invalid thread access in SWT.

Slides

Session details
Speaker(s): Session Type: Experience level:
Intermediate
Track: Tags:
Schedule info
Session Time Slot(s):
Grand Peninsula F - Tuesday, March 18, 2014 - 13:30 to 14:05

Comments