Hi all,
after moving to MyEclipse 6.0 from some 5.x version such piece of code started to be reported as Fatal Error:
final List<Class<? extends OwlThingBean>> asList = Arrays.asList( //
PersonalNameBean.class, //
EventBean.class, //
...
PersonBean.class, //
RelationshipBean.class, OwlThingBean.class);
The error is:
Type mismatch: cannot convert from List<Class<?>> to List<Class<? extends OwlThingBean>>
All elements in the collection being converted (but the last one) have OwlThingBean either directly above in type hierarchy or at least one step above. The problem is being caused by the last element – OwlThingBean itself. It apparently cannot be matched with <? extends OwlThingBean (itself)>… The strange thing is that:
it compiles with JDK 1.5.0_05 (the same as is set within Eclipse workspace as the only and default JRE)
it was NOT causing any errors in prior versions of MyEclipse (i THINK that it worked even in the MyEclipse 6.0 M1. It started with switch to MyEclipse 6.0 GA.
What is going on? Did I break the API of Generics (then why is it compiling from the command line or maven build process??)? Is there some internal compiler within Eclipse/MyEclipse that is having a bug?
I would REALLY appreciate any assistance.