summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-02-24 11:20:39 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-02-24 11:33:50 +0100
commit1629228b7b7c77dcbdedbd5acb403e6ea0492247 (patch)
tree6749c129eecbf8c8ce1365ab57f150a873d68c4a
parentd79ce8ba8f9e2411ab70b5c9d2ea0bb6b4f4e84e (diff)
cid#1326391: Dereference null return value
...replacing implicit NullPointerException with explicit IOException Change-Id: I673c836c64e141a7a3e4b40fca0922feee26bd03
-rw-r--r--jurt/com/sun/star/lib/uno/protocols/urp/urp.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/urp.java b/jurt/com/sun/star/lib/uno/protocols/urp/urp.java
index 5e7b3288866c..3033481d17b1 100644
--- a/jurt/com/sun/star/lib/uno/protocols/urp/urp.java
+++ b/jurt/com/sun/star/lib/uno/protocols/urp/urp.java
@@ -398,14 +398,16 @@ public final class urp implements IProtocol {
return readRequest(funId, sync);
}
- private UrpMessage readShortRequest(int header) {
+ private UrpMessage readShortRequest(int header) throws IOException {
int funId = (header & HEADER_FUNCTIONID14) != 0
? ((header & HEADER_FUNCTIONID) << 8) | unmarshal.read8Bit()
: header & HEADER_FUNCTIONID;
return readRequest(funId, false);
}
- private UrpMessage readRequest(int functionId, boolean forcedSynchronous) {
+ private UrpMessage readRequest(int functionId, boolean forcedSynchronous)
+ throws IOException
+ {
boolean internal = PROPERTIES_OID.equals(inL1Oid);
// inL1Oid may be null in XInstanceProvider.getInstance("")
XCurrentContext cc =
@@ -415,6 +417,10 @@ public final class urp implements IProtocol {
new Type(XCurrentContext.class))
: null;
IMethodDescription desc = inL1Type.getMethodDescription(functionId);
+ if (desc == null) {
+ throw new IOException(
+ "read URP request with unsupported function ID " + functionId);
+ }
ITypeDescription[] inSig = desc.getInSignature();
ITypeDescription[] outSig = desc.getOutSignature();
Object[] args = new Object[inSig.length];