Summary: | [1.5] no compiler warnings for types in Collection's <T> T[] toArray(T[] a) | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | mike andrews <mikea> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | RESOLVED INVALID | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.1 | ||
Target Milestone: | 3.1 M5 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
mike andrews
2004-11-21 08:14:21 EST
Why would it generate an error ? FYI the following code also compiles ok with javac. import java.util.*; public class X { void foo() { Set<X> set = new HashSet<X>(); Object[] array = new Object[set.size()]; set.toArray(array); } } |