Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 327134

Summary: Cant suppress raw types warning in a pointcut
Product: [Tools] AspectJ Reporter: Peter Zeltins <peter>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aclement
Version: unspecified   
Target Milestone: 1.6.12   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Peter Zeltins CLA 2010-10-06 12:12:17 EDT
Build Identifier: I20100608-0911

Generic type used in a pointcut and bound to target() or this() must omit actual type name and thus causes 'raw type must be parametrized' compiler warning. @SuppressAJWarning or @SuppressWarning annotations does not turn it off

Reproducible: Always

Steps to Reproduce:
Code snippets:

pointcut IVOListUpdate(IVOList list):
		&& target(list) && call(void updateList(*));

public interface IVOList<T extends IValueObject> extends List<T>, Externalizable, Serializable {

	
	void updateList(List<T> newList);
	
}

public interface IValueObject extends Comparable<IValueObject>, Serializable {
}
Comment 1 Andrew Clement CLA 2011-04-28 11:37:04 EDT
Because AspectJ is based on an older JDT compiler, you needed to use @SuppressWarnings("unchecked") - since the old compiler did not distinguish between raw type refs and unchecked conversions, using 'unchecked' to cover both.

However, yesterday I backported the recent JDT changes and so @SuppressWarnings("rawtypes") will now work with 1.6.12 dev builds.