stefanseifert commented on PR #31: URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/31#issuecomment-1759279603
> > i'm not so fond of having to place and explicit @retention(RetentionPolicy.RUNTIME) to the annotation class, though - changing the production code only for unit test purposes is always a red flag for me. > > I had to convince myself to get over the same kind of resistance to it. But it is an unavoidable necessity if we want to use the config types as annotations, unless we want to get into the business of rewriting bytecode. I haven't been able to come up with any reason why using runtime retention for config annotations would be unsafe or insecure, or have any other kind of observable effect on the code that actually goes to production. yes, i also think it's not doing any harm - those config annotations are normally not exported on the bundle. i'm also fine with it in this context, as there are other (also less elegantly) alternatives if a developer strictly does not want to apply the retention policy. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
