Bug 69135

Summary: [1.5] Report unnecessary cast for parametrized containers
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Martin Aeschlimann CLA 2004-07-01 10:18:46 EDT
20040701

In the following code the cast to String could be marked as unnecessary.

        ArrayList<String> l= new ArrayList<String>();
        String string = (String) l.get(0);
Comment 1 Philipe Mulet CLA 2004-07-01 11:43:48 EDT
I am already getting the warning:
1. WARNING in X.java (at line 5)
	String string = (String) l.get(0);
                        ^^^^^^^^^^^^^^^^^
Unnecessary cast to type String for expression of type String