xwiki/xwiki-commons — comment on commit 7deda9c10f35ad7056e928cecc298269616aabe3
File: xwiki-commons-core/xwiki-commons-component/xwiki-commons-component-default/src/main/java/org/xwiki/component/embed/GenericProvider.java line 65
By dgervalle:

Well, from my reading, it seems to me that they mostly say that you should avoid optional components. There is not many UC, and you always has the possibility to provide a "void" component in place of null. Something that a provider could do as well. So, like with @Inject, I think that provider get method should always succeed, or it is a fatal runtime error. Else, your code will be bloated by try...catch or null checking.