Community
Participate
Working Groups
In eclipse 3.1M4 the following code should report an unecessary cast but it doesn't. It seems that it only doesn't find it if it is in ternary operator: -------------- import java.util.ArrayList; import java.util.List; public class A { public String method() { List<String> l = new ArrayList<String>(); return l == null ? null : (String) l.get(0); } } ------------------------------------------
Conditional expression currently do not support unnecessary cast diagnosis.
defer for now
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.