You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Stuart McCulloch (JIRA)" <ji...@apache.org> on 2009/07/02 18:53:47 UTC

[jira] Updated: (FELIX-1017) Generic types ignored when generating MANIFEST.MF

     [ https://issues.apache.org/jira/browse/FELIX-1017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart McCulloch updated FELIX-1017:
------------------------------------

    Fix Version/s: maven-bundle-plugin-2.0.1
         Assignee: Stuart McCulloch

Investigate during the next maintenance release - if the type is in the bytecode then the Bnd Tool should find it.
If the type does not exist in the bytecode (ie. due to type erasure) then need to find out why the exception occurs
as the class should only use the types mentioned in the bytecode.

If this requires a change to the Bnd Tool then we may need to push this out to the next feature release (2.1.0)

> Generic types ignored when generating MANIFEST.MF
> -------------------------------------------------
>
>                 Key: FELIX-1017
>                 URL: https://issues.apache.org/jira/browse/FELIX-1017
>             Project: Felix
>          Issue Type: Bug
>          Components: Maven Bundle Plugin
>    Affects Versions: maven-bundle-plugin-2.0.0
>            Reporter: Clovis Seragiotto
>            Assignee: Stuart McCulloch
>             Fix For: maven-bundle-plugin-2.0.1
>
>
> Generic information present in the bytecode is not considered when MANIFEST.MF is generated. In the following example, the package "a" is not included in the Import-Package list, which causes an Exception at runtime (TypeNotPresentException)
> 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
>            }
>        }
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.