Bug 327134 - Cant suppress raw types warning in a pointcut
Summary: Cant suppress raw types warning in a pointcut
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 1.6.12   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-06 12:12 EDT by Peter Zeltins CLA
Modified: 2011-04-28 11:37 EDT (History)
1 user (show)

See Also:


Attachments

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