Java One 2015

by
Tags: , , ,

Java One 2015 is over. Here are some of my favorite things, from across multiple sessions.

this is an implied parameter to parameterless methods so toString can be re-written as

class MyClass {
  @Override
  public String toString(MyClass this) {
    return "test";
  }
}

This allows an annotation to be applied to this.
For example if we create an annotation about money

@Target(ElementType.PARAMETER)
@Retention(RetentionPolicy.RUNTIME)
public @interface Dough {
}
class MyClass {
  @Override
  public String toString(@Dough MyClass this) {
    return "test";
  }
}

Shining a ray of light on source code is the CheckerFramework which has useful annotations such as @NonNull and @Immutable. And mathematical backing to guarantee that certain types of errors will not be present.

A microbenchmark suite has been added to java 9, and is a favorite of me and my friends. It allows more accurate benchmarking of JVM code.

HTTP/2 is not far away now. Already implemented in major browsers, it changes the way client applications need to be deployed. It is binary so Wireshark 2 is now required for debugging. And make sure not to use monolithic files. So don’t combine js or css files, it will slow things down.

Sewing the java world together is jshell the new java REPL (Read-Eval-Print Loop) and is now live in the jdk (current build 91). Making trying out features and learning easier.

Putting your fingers in your ears and saying la-la-la-la is not good security. But that is what can happen by leaving the dependent jars un-updated. Is there a security hole? dependency-check will let you know.

Finally, while relaxing and sipping tea, it might be time to see if there will be any major issues upgrading to java 9. Running jdeps -jdkinternals will help you find out.

And that brings us back to…

D’oh, that’s all there is.