From 74a18f64eebc8f6f66d64e439e152c6cdf9d76db Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 23 Feb 2016 17:28:43 +0100 Subject: [PATCH] cid#1326440 Dereference null return value ...replacing implicit NullPointerException with explicit RuntimeException Change-Id: I14dfe81a6a05d33cb311a6274c085ea0dcf95692 --- jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java b/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java index 48d7630dd7e2..93a56b460b21 100644 --- a/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java +++ b/jurt/com/sun/star/lib/uno/protocols/urp/Unmarshal.java @@ -112,6 +112,10 @@ final class Unmarshal { public TypeDescription readType() { int b = read8Bit(); TypeClass typeClass = TypeClass.fromInt(b & 0x7F); + if (typeClass == null) { + throw new RuntimeException( + "Reading TYPE with bad type class " + (b & 0x7F)); + } if (TypeDescription.isTypeClassSimple(typeClass)) { return TypeDescription.getTypeDescription(typeClass); } else {