Duplicate :
|
|
Relates :
|
FULL PRODUCT VERSION : A DESCRIPTION OF THE PROBLEM : The javac compiler can't handle the usage of diamond notation <> with ?: conditional operator. The following code: List<String> list = false ? null : new ArrayList<>(); doesn't compile with error: incompatible types required: List<String> found: ArrayList<Object> REPRODUCIBILITY : This bug can be reproduced always.
|