Community
Participate
Working Groups
Methods of the style <T> T get() are not safely implementable (other than returning null), because they promise to return whichever type the caller chooses, with no information available at the callee. Candidate for an optional warning. Parameterized return types like <T> List<T> emptyList() are borderline, since with additional knowledge about the return value, it _may_ be safe to assume an arbitrary type argument (in particular when the instance does not support any methods mentioning T). Mildly related: bug 58657.
Bulk move out of 4.8