[
https://issues.apache.org/jira/browse/SLING-3683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14040609#comment-14040609
]
Konrad Windszus commented on SLING-3683:
----------------------------------------
[[email protected]] Thanks for spotting this. There is currently not a
real test which tests for an annotation which cannot be used for injection, but
it should be easy to derive from the already existing tests at
https://github.com/apache/sling/blob/trunk/bundles/extensions/models/impl/src/test/java/org/apache/sling/models/impl/InjectorSpecificAnnotationTest.java.
> Sling Models: ModelAdapterFactory mixes up annotationProcessor in
> injectFieldOrMethod method
> --------------------------------------------------------------------------------------------
>
> Key: SLING-3683
> URL: https://issues.apache.org/jira/browse/SLING-3683
> Project: Sling
> Issue Type: Bug
> Components: Extensions
> Affects Versions: Sling Models Implementation 1.0.6
> Reporter: Stefan Seifert
> Priority: Minor
> Attachments: 140620_SLING-3683_annotationProcessor.patch
>
>
> the method AdapterFactory.injectFieldOrMethod gets an annotationProcessor
> from the injectors if they implement the InjectAnnotationProcessorFactory.
> currently, if a injector does not implement this interface, the instance
> assigned to the annotationProcessor may be re-used from the previous injector
> which is not intended.
> patch attached.
> not tested, is there already a unit test where a test for this can should be
> added?
--
This message was sent by Atlassian JIRA
(v6.2#6252)