paul-bjorkstrand commented on issue #17: SLING-8706 - Injections for java.util.Optional<> should be automatically optional URL: https://github.com/apache/sling-org-apache-sling-models-impl/pull/17#issuecomment-554768731 My concern with this impl that it only applies to `@ValueMapValue` injections, and not other injectors (`@ChildResource` or `@RequestAttribute` to name a couple, not to mention the custom ones out there). I wonder if there is a way to make `Optional<..>` work for all injectors, without the need to modify each individual injector. It will likely require a change to `ModelAdapterFactory.internalCreateModel(..)` that detects `Optional<..>` and does a recursive call. with the type extracted from the field's generic params.
---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
