Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-30327

[GSS](8.1.0.GA) WELD-2815 - AnnotatedTypes#createTypeId doesn't handle array annotation values properly

XMLWordPrintable

      While creating an ID for annotated types, Weld will try to create a String representation that contains type, methods, c-tors and all of their annotations.
      However, the annotation values can be misrepresented if there are any arrays in them.

      An example is trying to create this ID for a type that uses @Produces(MediaType.APPLICATION_JSON) which has an array value in it.
      Weld will create an ID that ends with something like this: ...@jakarta.ws.rs.Produces(value=[Ljava.lang.String;@60f33f97)]();}

      This then interferes with any hash code and equals that the ID might be used for.

      Fix is to take into consideration these values and write them out into the final String.
      A draft can be seen here - https://github.com/weld/core/compare/5.1...manovotn:core:fixAnnotatedTypeIdCreation?expand=1

              rhn-support-ivassile Ilia Vassilev
              rhn-support-aogburn Aaron Ogburn
              Vojtěch Šalbaba Vojtěch Šalbaba
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: