1 Reply Latest reply on Jul 25, 2010 5:34 AM by Stuart Douglas

    Odd behaviour with weld-extensions on the classpath

    Alen Vrečko Newbie

      Hi,


      while making a custom extension for Weld/CDI there is something odd when weld-extensions.jar is on the classpath:


      public <T> void processAnotated(@Observes ProcessAnnotatedType<T> event, BeanManager manager) {
         System.out.println("processAnnotated: " + event.getAnnotatedType().getClass());
      



      Sometimes all annotated types are of type AnnotatedTypeImpl while on other runs of the program they are of WeldClassImpl.


      I can't help but think there is something bad lurking in the background.


      If using alpha3 version - when WeldClassImpl is chosen Weld cannot see changes set via event.setAnnotatedType() while if AnnotatedTypeImpl it works. Weld can see changes in the latest build of weld-extensions but still sometimes I see WeldClassImpl other times AnnotatedTypeImpl.


      Just wanted to point this out. Gives me the creeps.


      Cheers
      Alen