When I try to use the diamond operator as follows:
List<DateTimeZone> list = new ArrayList<>();
It works perfectly.
However, when I try this:
List<DateTimeZone> list = false ? null : new ArrayList<>();
It doesn't compile, messaging: "Incompatible types: required List, found ArrayList".
Why is that?