Status: New Owner: ---- CC: anquetil...@gmail.com Labels: Type-Defect Priority-Medium Component-VerveineJ Milestone-4.7
New issue 868 by tu...@tudorgirba.com: VerveineJ does not set the container of a ParameterizedType correctly http://code.google.com/p/moose-technology/issues/detail?id=868
Consider this case:
---ACalssUsedAsArgumentType.java package packageDefiningArgumentType; public class ACalssUsedAsArgumentType { }
---UserClass.java package userPackage; import packageDefiningArgumentType.*; public class userClass { public void m() { new ArrayList<ACalssUsedAsArgumentType>();} }
VerveineJ sets the container of the ParameterizedType to be userPackage.userClass.m(). This is wrong.
The issue gets even worse when we have multiple users of the same type. For example, if we also get: ---SecondUserClass.java package secondUserPackage; import packageDefiningArgumentType.*; public class SecondUserClass { public void m() { new ArrayList<ACalssUsedAsArgumentType>();} }
... with the current setup, we will get only one ParameterizedType, but we do not know which container we will end up with (the first or the second method).
To fix the situation we have two options: 1. Continue to have only one instance of ParameterizedType and have the container point to the container of the ParameterizableClass. 2. Have multiple instances for ParameterizedTypes and keep the rest as it is.
I think I prefer 1.