Apache OpenOffice (AOO) Bugzilla – Issue 47179
XMultiComponentFactory.createInstanceWithContext returns null with non-existant service
Last modified: 2013-07-30 02:16:20 UTC
After discussion on the api mailing list, it was determined that, while it would be preferable to throw an exception here, it must be kept this way for historical reasons. But, this is not documented. Also, it will apparently return null under other circumstances (although I do not know which). This also applies to XMultiServiceFactory, XSingleComponentFactory, XSingleServiceFactory.
All we can do here is to document THAT a null value can happen, but not really, WHEN it can happen. This would only be possible in the varying implementations. not at the interface.
Shouldn't the interface specify under what conditions an implemetation can return a null and force implementations to comply with this specification?
It should, but not afterwards. There are already implementations which handle this differently. That's the problem when people just blindly implement specs, without any feedback. It's too late.
I understand your point. I look forward to seeing the null documented (as you said, that it can happen, but not the conditions which can cause it). Thanks, Mike
so should XMultiComponentFactory.idl get an update?
Reset assignee on issues not touched by assignee in more than 2000 days.