Community
Participate
Working Groups
Build ID: M20080221-1800 Steps To Reproduce: 1. i'm estending existing classes with additional methods and a LinkdHashSet which contains "Name" objects. private LinkedHashSet<Name> Nameable.nameSet = new LinkedHashSet<Name>(); 2. everything works fine until i export the project to jar and use the jar file in another project. if i do so i get following error message: can't override java.util.LinkedHashSet<Name> Nameable.getNames() with java.util.LinkedHashSet Name.getNames() return types don't match 3. if i remove the type at the LinkedHashSet that it looks like this: private LinkedHashSet Nameable.nameSet = new LinkedHashSet(); it works but then there are the ugly warnings and it is not typesafe. More information:
Created attachment 105870 [details] jar file that includes a aspectJ project to extend classes with Names to test you can use the naming.jar in a new project. create a empty class that implements "Nameable". the errors messages should appear in eclipse. if you remove the type for the LinkedHashSet in the jar file it works, but with warnings and not typesafe.
Are you really on AspectJ 1.5.2? Or are you on AJDT 1.5.2? The latest AspectJ (1.6.1rc1) includes many fixes, one of which addresses exactly the error you describe. This AspectJ is included in the current AJDT dev builds for Eclipse 3.3. Please try out the latest AJDT/AspectJ and see if that fixes your issue.
use this update site in eclipse and it works... http://download.eclipse.org/tools/ajdt/33/dev/update
Thanks to Andy