Bug 104529 - @SuppressWarnings( "unchecked" ) is not ignoring type safety checks
Summary: @SuppressWarnings( "unchecked" ) is not ignoring type safety checks
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5.0 M3   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-20 12:46 EDT by Eric Berry CLA
Modified: 2005-08-19 15:21 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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()