kevinmost
09/22/2016, 4:02 PMUnit
is basically Void
, but the Java compiler doesn't know that. What it sees is "I need to provide a lambda that returns an instance of some type that some 3rd-party library is providing". In this case being Unit, of course, so you'd use Unit.INSTANCE
.