Bug 228291 - [1.5][compiler] Incorrect unsafe warning for casting complex but static types.
Summary: [1.5][compiler] Incorrect unsafe warning for casting complex but static types.
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3.2   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 3.4 RC1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-22 17:52 EDT by Rafi Rubin CLA
Modified: 2008-05-13 09:44 EDT (History)
3 users (show)

See Also:


Attachments
Simple class to demonstrate the behavior (275 bytes, text/plain)
2008-04-22 17:52 EDT, Rafi Rubin CLA
no flags Details
Proposed patch (5.92 KB, patch)
2008-05-06 06:14 EDT, Philipe Mulet CLA
no flags Details | Diff
Patch for 3.3.x (6.99 KB, patch)
2008-05-06 09:12 EDT, Philipe Mulet CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rafi Rubin CLA 2008-04-22 17:52:53 EDT
Created attachment 97103 [details]
Simple class to demonstrate the behavior

Given a class that extends (or implements) another typed class, but the typing relationship is a little more complex (a<T> extends Vector<Collection<T>> in the example), eclipse warns about casting where it shouldn't.

I've confirmed the attached class compiles without warning with sun javac, but reports a warning.
Comment 1 Philipe Mulet CLA 2008-05-06 06:14:24 EDT
Created attachment 98777 [details]
Proposed patch
Comment 2 Philipe Mulet CLA 2008-05-06 07:06:05 EDT
Added GenericTypeTest#test1315.
Released for 3.4RC1
Fixed
Comment 3 Philipe Mulet CLA 2008-05-06 09:12:42 EDT
Created attachment 98828 [details]
Patch for 3.3.x
Comment 4 Philipe Mulet CLA 2008-05-06 09:13:34 EDT
Released to 3.3.x maintenance branch.
Comment 5 David Audel CLA 2008-05-13 09:44:40 EDT
Verified for 3.4RC1 using I20080510-2000