cid#1326440 Dereference null return value
...replacing implicit NullPointerException with explicit RuntimeException Change-Id: I14dfe81a6a05d33cb311a6274c085ea0dcf95692
This commit is contained in:
parent
670c2b3ca9
commit
74a18f64ee
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user