Summary: | [generics][itds] ArrayIndexOutOfBoundsException - Generics in privileged aspects | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | William Ono <wmono> |
Component: | Compiler | Assignee: | Adrian Colyer <adrian.colyer> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | DEVELOPMENT | ||
Target Milestone: | 1.5.0 M3 | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Whiteboard: |
Description
William Ono
2005-06-08 19:49:29 EDT
Fails on the latest compiler like this: Unexpected error messages: error at Vector<Object> myV = dc.getV(); TracingAspect.java:5:0::0 Type mismatch: cannot convert from Vector<E> to Vector<Object> Test created in Ajc150Tests.java but commented out for now ... The problem here is that AjcMemberMaker.privilegedAccessForMethod() is losing the information about the parameterized type Vector<Object> and defaulting to the generic type Vector<E>. Fundamentally, creation of a TypeX from a generic signature isn't working - it will let a signature through but ignore the generics information, rather than storing it as part of the TypeX object. I've fixed the TypeX processing to actually process generic information. So now, if you call: TypeX.forSignature(Ljava/util/Map<Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>;" you will get this kind of structure to your returned TypeX: TypeX: sig=Ljava/util/Map<Ljava/util/List<Ljava/lang/String;>;Ljava/lang/String;>; parameterized=true #params=2 param1: TypeX: sig=Ljava/util/List<Ljava/lang/String;>; parameterized=true #params=1 param1: TypeX: sig=Ljava/lang/String; parameterized=false #params=0 param2: TypeX: sig=Ljava/lang/String; parameterized=false #params=0 this *may* help other generics tests to start working ! Fix checked in, waiting on build before closing. Fix available, see aspectj download page: aspectj-DEVELOPMENT-20050614164300.jar |