I wonder if someone could explain the following weirdness to me. I\'m using Java 8 update 11.
Given this method
private T runFun(Function
If explicitly adding looks ugly then as a workaround you can replace with orElseGet()
orElseGet()
.orElseGet(() -> throw new RunTimeException("foo"));