[jboss-dev-forums] [JBoss Microcontainer Development] - Re: BeanAnnotationAdapter/AnnotationPlugin

kabir.khan@jboss.com do-not-reply at jboss.com
Fri Nov 27 11:53:36 EST 2009


https://jira.jboss.org/jira/browse/JBKERNEL-64

On Monday, I'll try to get rid of this from AbstractAnnotationPlugin.apply/cleanAnnotation()

  |    public final void applyAnnotation(T info, MetaData retrieval, MetaDataVisitor visitor) throws Throwable
  |    {
  |       boolean trace = log.isTraceEnabled();
  |       
  |       if (isCleanupOnly() == false)
  |       {
  |          Class<C> annotationClass = getAnnotation();
  |          C annotation = retrieval.getAnnotation(annotationClass);
  |          if (annotation == null)
  |          {
  |             if (trace)
  |                log.trace("No annotation: " + annotationClass.getName());
  |             return;
  |          }
  |          if (isMetaDataAlreadyPresent(info, annotation, visitor.getControllerContext()))
  | ...
  | 
by changing it to

  |    public final void applyAnnotation(T info, C annotation, MetaData retrieval, MetaDataVisitor visitor) throws Throwable
  |    {
  |       boolean trace = log.isTraceEnabled();
  |       
  |          if (isMetaDataAlreadyPresent(info, annotation, visitor.getControllerContext()))
  | ...
  | 
Since this is now driven by the existing annotations the check is pointless

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267830#4267830

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267830



More information about the jboss-dev-forums mailing list