| [news.eclipse.tools.jdt] Re: Useless cast |
Hi, i found out that eclipse do not emit a warning for this code:
Vector<Integer> v= m.surligne;
if (v!=null) for (int u = 0; u<v.size();u++) if (((Integer) v.get(u))==1) // <= here foo(u);
Should i report a bug ?
Yes, please file it against JDT Core and post the bug number here.
Simpler test case:
void test() {
Vector<Integer> v= new Vector(1);
if (((Integer) v.get(0))==1) // <= here
System.out.println();
}
Dani