2009/3/31 <[email protected]>
> > this is because you don't actually need it at runtime
> In fact, I do. Even without Eclipse I realized that I got errors because
> the generic information is required at runtime.
well as you have a simple standalone testcase that demonstrates this
please open a JIRA issue and attach it - and feel free to also attach a
suggested patch to bnd :)
this would drastically increase the chance of this being fixed, because
otherwise you'll have to wait for me to get round to making a testcase,
implementing a fix, and finally negotiating the patch with Peter
[ FYI, I am currently between jobs, so no-one is paying me to actively
work on this - issues with testcases therefore get priority, especially
if they also contain patches... ]
Here a simplified example:
>
> package b;
>
> import java.lang.reflect.*;
> import a.A;
>
> public class B {
> java.util.List<A> list;
>
> public static void main(String[] args) {
> for(Field f : B.class.getDeclaredFields()) {
> ParameterizedType type = (ParameterizedType)f.getGenericType();
> for(Type t : type.getActualTypeArguments()) {
> System.out.println(t); // <---
> java.lang.TypeNotPresentException: Type a.A not present
> }
> }
> }
> }
>
> I knew about the "workaround"; I wrote the e-mail to the user list after I
> explicitely added the third package, just to be sure that there is not
> better way...
>
> -- clovis
>
> ______________________________________
> Diese E-Mail kann vertrauliche und geschuetzte Informationen enthalten.
> Wenn diese E-Mail nicht für Sie bestimmt ist, bitten wir Sie, uns
> unverzueglich zu informieren und sie zu loeschen.
>
> This e-mail message may contain information, which is confidential and
> protected. If you are not the intended recipient of this message, we ask you
> to inform us immediately and delete the message afterwards.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
Cheers, Stuart