Require XComponentContext.getServiceManager to throw instead of returning null

This is such a fatal error that there is probably no point in trying to handle
it, so allow to simplify client code by removing the requirement to check for a
null return value.

Simplified some client code accordingly (modules configmgr and ure, and the code
generated by cppumaker and javamaker).

Change-Id: I51c0b270ec73409374f7439a47ee061407a46e31
This commit is contained in:
Stephan Bergmann
2012-09-17 16:56:19 +02:00
parent 6e78fd18c9
commit 543158edba
12 changed files with 56 additions and 134 deletions

View File

@@ -40,7 +40,8 @@ Includes::Includes(
TypeManager const & manager, codemaker::Dependencies const & dependencies,
bool hpp):
m_manager(manager), m_map(dependencies.getMap()), m_hpp(hpp),
m_includeAny(dependencies.hasAnyDependency()), m_includeReference(false),
m_includeCassert(false), m_includeAny(dependencies.hasAnyDependency()),
m_includeReference(false),
m_includeSequence(dependencies.hasSequenceDependency()),
m_includeType(dependencies.hasTypeDependency()),
m_includeCppuMacrosHxx(false), m_includeCppuUnotypeHxx(false),
@@ -155,6 +156,9 @@ void Includes::dump(FileStream & out, rtl::OString const * companionHdl) {
}
}
out << "#include \"sal/config.h\"\n";
if (m_includeCassert) {
out << "\n#include <cassert>\n";
}
if (companionHdl) {
out << "\n";
dumpInclude(out, *companionHdl, false);