-
Type:
Bug
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: 8, 8-repo-lambda
-
Component/s: tools
-
b82
-
Verified
The following program:
import java.util.*;
class Test {
public static void main(List<String> args) {
main(new ArrayList<String>());
}
}
Will show a warning telling the user that a dimaond operator could be used. The warning will be displayed regardless of the source level - on the other hand, while it's ok to use diamond in JDK 8 (thanks to improved type inference) it's not ok to do so in JDK 7.
import java.util.*;
class Test {
public static void main(List<String> args) {
main(new ArrayList<String>());
}
}
Will show a warning telling the user that a dimaond operator could be used. The warning will be displayed regardless of the source level - on the other hand, while it's ok to use diamond in JDK 8 (thanks to improved type inference) it's not ok to do so in JDK 7.