hi,
i find that when felix installing a bundle, if the bundle referred to some
other bundle's exported Annotation, and if the Annotation class is not
accessible(for example the annotation class is deleted) , felix omit the
Annotation.
i am not sure if this is a bug, or the JVM runs in this way, but it is
definitely not reasonable. i waste much time on it.
Here is the test,
public class TestLoadAnnotation {
@Test
public void testLoad() throws Exception{
Felix f = new Felix(new HashMap());
f.init(); f.start();
Bundle bundle =
f.getBundleContext().installBundle("file:///home/chi/workspace/profile/target/profile-0.0.1-SNAPSHOT-package.jar");
bundle.start();
BundleActivator activator =
FelixHelper.getBundleActivator(bundle);
System.out.println(activator.getClass().getClassLoader());
Assert.assertTrue(0 !=
activator.getClass().getAnnotations().length);
}
}
and the profile bundle's activator definition.
@App("profile")
public class Activator implements BundleActivator{...}
i checked the class file of Activator, and there is this runtime visible
@App annotation. why the annotation is missing?
--
View this message in context:
http://old.nabble.com/Is-is-a-bug-to-omit-the-Annotation-class--tp27173344p27173344.html
Sent from the Apache Felix - Dev mailing list archive at Nabble.com.