Summary: | [generics] [itds] AspectJ does not add proper access flag to bridge methods | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Dave Whittaker <dave> |
Component: | Compiler | Assignee: | AJDT-inbox <AJDT-inbox> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | aclement |
Version: | DEVELOPMENT | ||
Target Milestone: | 1.6.3 | ||
Hardware: | PC | ||
OS: | Mac OS X - Carbon (unsup.) | ||
Whiteboard: |
Description
Dave Whittaker
2008-10-10 16:59:18 EDT
test case created: import java.lang.reflect.Method; import java.util.*; interface Super<T> { public T getterA(); } public class Bridged implements Super<String> { public String getterA() { return ""; } // Print BRIDGE status of all getter* methods public static void main(String[] argv) { Method[] ms = Bridged.class.getMethods(); List results = new ArrayList(); for (int i = 0; i < ms.length; i++) { if (ms[i].getName().startsWith("getter")) { results.add(ms[i].getName()+"()"+ms[i].getReturnType().getName()+ " isBridged?"+((ms[i].getModifiers() & 0x0040) != 0)); } } Collections.sort(results); for (Iterator iterator = results.iterator(); iterator.hasNext();) { String entry = (String) iterator.next(); System.out.println(entry); } } } aspect X { public T Super<T>.getterB() { return null; } } --- Only when generic ITDs are used is the bridge method created without the BRIDGE (0x0040) flag set. Test and fix committed. First fix for 1.6.3 ! Cool. Does that mean the fix won't be available through the update site for a while though? i am about to put a new AspectJ into AJDT (the first dev build of AspectJ 1.6.3) - so it will be in AJDT within 24hours hopefully. |