Bug 104529

Summary: @SuppressWarnings( "unchecked" ) is not ignoring type safety checks
Product: [Tools] AspectJ Reporter: Eric Berry <eric_berry>
Component: CompilerAssignee: Adrian Colyer <adrian.colyer>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: 1.5.0 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Eric Berry CLA 2005-07-20 12:46:55 EDT
AJDT is ignoring the @SuppressWarnings( "unchecked" ) annotation.  It is giving 
me a type safety warning when I don't specify the type when declaring a generic 
even though I have the @SuppressWarnings( "unchecked" ) annotation specified.
Comment 1 Matt Chapman CLA 2005-07-29 09:48:13 EDT
Passing over to compiler
Comment 2 Adrian Colyer CLA 2005-08-01 04:06:59 EDT
We should just be picking up this functionality from the underlying JDT
compiler. I'll check it out as part of the M3 release...
Comment 3 Adrian Colyer CLA 2005-08-19 15:21:58 EDT
Fixed by upgrade to latest JDT compiler level. 

This program: 

import java.util.*;
public class pr104529 {
	
	void unsuppressed() {
		List<String> l = new ArrayList();
	}
	
	@SuppressWarnings("unchecked")
	void suppressed() {
		List<Double> l = new ArrayList();
	}
	
}

compiled with:

ajc -1.5 -warn:+unchecked pr104529.aj

gives an unchecked error for the assignment in unsuppressed() and not for the
assignment in suppressed()