forked from amazingfate/loongoffice
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:
@ -19,7 +19,6 @@
|
||||
package test.codemaker.javamaker.java15;
|
||||
|
||||
import com.sun.star.lang.XMultiComponentFactory;
|
||||
import com.sun.star.uno.DeploymentException;
|
||||
import com.sun.star.uno.XComponentContext;
|
||||
import complexlib.ComplexTestCase;
|
||||
|
||||
@ -69,18 +68,18 @@ public final class Test extends ComplexTestCase {
|
||||
}
|
||||
|
||||
public XMultiComponentFactory getServiceManager() {
|
||||
return null;
|
||||
throw new com.sun.star.uno.RuntimeException();
|
||||
}
|
||||
};
|
||||
try {
|
||||
Service.create(context);
|
||||
failed();
|
||||
} catch (DeploymentException e) {}
|
||||
} catch (com.sun.star.uno.RuntimeException e) {}
|
||||
try {
|
||||
Service.create(
|
||||
context, false, (byte) 1, (short) 2, Integer.valueOf(4));
|
||||
failed();
|
||||
} catch (DeploymentException e) {}
|
||||
} catch (com.sun.star.uno.RuntimeException e) {}
|
||||
}
|
||||
|
||||
private static final class Ifc implements XIfc {
|
||||
|
||||
Reference in New Issue
Block a user