cid#1326440 Dereference null return value
...replacing implicit NullPointerException with explicit RuntimeException Change-Id: I14dfe81a6a05d33cb311a6274c085ea0dcf95692
This commit is contained in:
@@ -112,6 +112,10 @@ final class Unmarshal {
|
|||||||
public TypeDescription readType() {
|
public TypeDescription readType() {
|
||||||
int b = read8Bit();
|
int b = read8Bit();
|
||||||
TypeClass typeClass = TypeClass.fromInt(b & 0x7F);
|
TypeClass typeClass = TypeClass.fromInt(b & 0x7F);
|
||||||
|
if (typeClass == null) {
|
||||||
|
throw new RuntimeException(
|
||||||
|
"Reading TYPE with bad type class " + (b & 0x7F));
|
||||||
|
}
|
||||||
if (TypeDescription.isTypeClassSimple(typeClass)) {
|
if (TypeDescription.isTypeClassSimple(typeClass)) {
|
||||||
return TypeDescription.getTypeDescription(typeClass);
|
return TypeDescription.getTypeDescription(typeClass);
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user