Bug 105049

Summary: [1.5][compiler] Compiler doesn't warn about unchecked cast to non-reifiable array type
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.2 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Markus Keller CLA 2005-07-25 12:37:48 EDT
N20050725-0010

import java.util.List;
class Bug<E> {
    void method(Object o) {
        if (o instanceof List<E>[]) { //incorrect: bug 104695
            List<E>[] es= (List<E>[]) o; //unchecked
        }
    }
}

The cast to (List<E>[]) should be marked as unchecked cast.
Comment 1 Philipe Mulet CLA 2006-03-06 18:29:20 EST
Works as expected in latest.
Added GenericTypeTest#test0955