Hi Ray,

You are right that this is still WIP to a certain degree.
And I think your expectation is correct, so it would be great if you could
provide some fixes for these!

Cheers,

David

On 7 February 2017 at 10:04, Raymond Auge <[email protected]> wrote:

> Hello DavidB,
>
> I'm using the converter in the CDI work I'm doing and I'm noting a strange
> behaviour in converting Annotations (qualifiers) to Maps. Basically it
> looks like the converter is following all methods of the annotation type,
> rather than only the declared method:
>
> In other words, if I start with an Annotation like so:
>
>     public @interface ComplexEnoughKey {
>         String value();
>     }
>
> used as:
>
> @ComplexEnoughKey("fum")
>
> Using the converter like so:
>
> Map<String, String> map = _converter.convert(annotation).to(new
> TypeReference<Map<String, String>>(){});
>
> I'm getting a map like this:
>
> {hashCode=1335732849, annotationType=interface
> org.apache.aries.cdi.test.beans.BeanWithReference$ComplexEnoughKey,
> [email protected]$
> ComplexEnoughKey(value=fum),
> value=fum}
>
> I was expecting:
>
> {value=fum}
>
> Shouldn't annotations only use the
> annotation.annotationType().getDeclaredMethods()?
>
> Also, I don't see any name mangling happening. I thought that was part of
> the standard rules.
>
> Do I chalk all this up to "work in progress"? If so I can send some PRs
> with fixes for the above.
>
> Sincerely,
> - Ray
>
  • [converter] Raymond Auge
    • Re: [converter] David Bosschaert

Reply via email to