Summary: | It should be possible to get rid of the warning in clone() w/generics | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Oyvind Harboe <oyvind.harboe> |
Component: | Core | Assignee: | JDT-Core-Inbox <jdt-core-inbox> |
Status: | RESOLVED WORKSFORME | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | ||
Version: | 3.1 | ||
Target Milestone: | 3.1 M4 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Oyvind Harboe
2004-11-09 05:50:35 EST
Remove parameterization from cast type, since the compiler tells you it is irrelevant at runtime. import java.util.ArrayList; public class X { public void bar() { ArrayList<Byte> x=new ArrayList<Byte>(); ArrayList<Byte> y=(ArrayList)x.clone(); } } Not a bug, also javac -Xlint issues a similar warning. |