Kengo's blog

Technical articles about original projects, JVM, Static Analysis and TypeScript.

How to migrate Java 7 with Guava to Java 8

replace Optional with java.util.Optional

  • replace import; with import java.util.Optional;
  • replace Optional.fromNull() with Optional.ofNull()
  • replace Optional.absent() with Optional.empty()
  • replace Optional.transform() with
  • replace Optional.or() with Optional.orElse()

replace FluentIterable with Stream

upgrade Lombok project to the latest version

1.12.6 didn't work with Eclipse Luna in my case, and 1.14.2 was OK.