mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8272236: Improve serial forms for transport
Reviewed-by: bchristi, rhalade, smarks
This commit is contained in:
parent
aa28430bdd
commit
3adc111766
1 changed files with 7 additions and 0 deletions
|
@ -2566,6 +2566,13 @@ public class ObjectInputStream
|
|||
throw new InternalError();
|
||||
}
|
||||
clear();
|
||||
// Check that an object follows the TC_EXCEPTION typecode
|
||||
byte tc = bin.peekByte();
|
||||
if (tc != TC_OBJECT &&
|
||||
tc != TC_REFERENCE) {
|
||||
throw new StreamCorruptedException(
|
||||
String.format("invalid type code: %02X", tc));
|
||||
}
|
||||
return (IOException) readObject0(Object.class, false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue