[jboss-user] [JBoss Microcontainer Development] New message: "Re: AnnotatedElementMetaDataLoader component metadata optimization"

Kabir Khan do-not-reply at jboss.com
Wed Feb 17 05:35:01 EST 2010


User development,

A new message was posted in the thread "AnnotatedElementMetaDataLoader component metadata optimization":

http://community.jboss.org/message/526739#526739

Author  : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com

Message:
--------------------------------------------------------------
Both of these fixes give problems when running the kernel tests.
 
Returning null gives a few errors similar to the ones in MDR's tests, i.e. always expecting component metadata to be non-null in AnnotatedMethodTestCase and AnnotatedConstructorTestCase. This one line fix in AnnotatedMethodTestCase (and similar in AnnotatedConstructorTestCase) solves the problem and all the tests in kernel modules pass.
 
   private Annotation[] getComponentMetaData(KernelControllerContext context, Signature signature)
   {
      KernelMetaDataRepository repository = context.getKernel().getMetaDataRepository();
      MetaData metaData = repository.getMetaData(context);
      MetaData component = metaData.getComponentMetaData(signature);
      if (component == null)
         return new Annotation[0];
      return component.getAnnotations();
   }

 
 
Returning NullAnnotatedElementMetaDataLoader.INSTANCE gives loads of errors in the jboss-kernel project, but they might be due to my NullAEMDL making some wrong assumptions, so I'll have a look at that.

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/526739#526739




More information about the jboss-user mailing list