Bug 207758 - [1.5][compiler] Unused SupressWarnings detection should consider more error situations
Summary: [1.5][compiler] Unused SupressWarnings detection should consider more error s...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-29 07:32 EDT by Philipe Mulet CLA
Modified: 2007-12-11 12:02 EST (History)
0 users

See Also:


Attachments
work in progress (19.13 KB, patch)
2007-10-29 13:37 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 Philipe Mulet CLA 2007-10-29 07:32:11 EDT
In the following code, an unused @SuppressWarnings is detected, though it is a consequence of the other compile error. It shouldn't be diagnosed until the error is resolved.

import java.util.List;
public class X {
	void foo() {
		ArrayList al = null;
		@SuppressWarnings("unchecked")
		List<String> ls = al;
	}
}
Comment 1 Philipe Mulet CLA 2007-10-29 13:37:10 EDT
Also, on tuning side, when raised to an ERROR, the warning shouldn't be suppressable with @SuppressWarnings("all")
Comment 2 Philipe Mulet CLA 2007-10-29 13:37:48 EDT
Created attachment 81477 [details]
work in progress
Comment 3 Philipe Mulet CLA 2007-10-30 12:30:29 EDT
Added AnnotationTest#test235-238
Comment 4 Philipe Mulet CLA 2007-11-02 07:26:49 EDT
Released for 3.4M4.
Fixed
Comment 5 Kent Johnson CLA 2007-12-11 12:02:34 EST
Verified for 3.4M4 using build I20071210-1800.