Bug 416146 - Cannot compile a generic class implementing Serializable
Summary: Cannot compile a generic class implementing Serializable
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.8.0.M1   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-29 09:51 EDT by Frank Pavageau CLA
Modified: 2014-03-19 06:44 EDT (History)
0 users

See Also:


Attachments
Project to reproduce the problem (1.22 KB, application/x-bzip)
2013-08-29 09:51 EDT, Frank Pavageau CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Pavageau CLA 2013-08-29 09:51:16 EDT
Created attachment 234957 [details]
Project to reproduce the problem

The attached project makes ajc crash and generate an ajcore file:
/.../serializable-and-generics/src/main/java/MyClass.java:0::0 Internal compiler error: java.lang.IllegalStateException: Can't ask to parameterize a member of non-generic type: MyClass  kind(raw) at org.aspectj.weaver.ResolvedMemberImpl.parameterizedWith(ResolvedMemberImpl.java:759)

MyClass is just a class with a type parameter that also implements Serializable. If you comment out "implements Serializable", the problem goes away.

Run "mvn clean package" to reproduce the problem, or call ajc yourself if you prefer, since it's a simple project with one class and one aspect.
Comment 1 Frank Pavageau CLA 2014-03-19 06:44:12 EDT
The problem seems to be fixed by 1.8.0.RC1, if I correctly called ajc manually. I do end up with .class files, so I guess it's OK.