Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1698

Spurious warnings from AnnotatedTypeValidator

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.2.3.Final
    • 2.1.2.Final
    • None
    • None

      I'm using EntityRepositories from DeltaSpike Data in WildFly. On every startup, my server log is flooded with warnings of the following kind:

       WELD-001117: Member (org.apache.deltaspike.core.util.metadata.builder.AnnotatedMethodImpl@48c67fe1) 
      does not belong to the actual class hierarchy of the annotatedType 
      (org.apache.deltaspike.core.util.metadata.builder.AnnotatedTypeImpl@241940c4)
      

      The warning is issued by AnnotatedTypeValidator.checkMembersBelongToHierarchy(), and the root cause is that the AnnotatedMember is a method from an interface of the AnnotatedType but not from a superclass.

      (In fact, generating synthetic implementations for methods from interfaces or abstract classes is the main point of DeltaSpike Data.)

      So I suggest that the hierarchy check should also consider all interfaces of the class and its superclasses.

      Moreover, the usability of the warning message could be improved by printing the real member names, replacing AnnotatedMember.toString() by AnnotatedMember.getJavaMember().getName() etc.

              mkouba@redhat.com Martin Kouba
              hwellmann.de Harald Wellmann (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: