Quantcast
Channel: Kengo's blog
Viewing all articles
Browse latest Browse all 157

How to migrate Java 7 with Guava to Java 8

$
0
0

replace Optional with java.util.Optional

  • replace import com.google.common.base.Optional; with import java.util.Optional;
  • replace Optional.fromNull() with Optional.ofNull()
  • replace Optional.absent() with Optional.empty()
  • replace Optional.transform() with Optional.map()
  • 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.


Viewing all articles
Browse latest Browse all 157

Trending Articles