Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions jdeserialize/src/jdeserialize.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,13 +224,13 @@ public Object read_FieldValue(fieldtype f, DataInputStream dis) throws IOExcepti
case OBJECT:
case ARRAY:
byte stc = dis.readByte();
if(f == fieldtype.ARRAY && stc != ObjectStreamConstants.TC_ARRAY) {
throw new IOException("array type listed, but typecode is not TC_ARRAY: " + hex(stc));
}
content c = read_Content(stc, dis, false);
if(c != null && c.isExceptionObject()) {
throw new ExceptionReadException(c);
}
if(f == fieldtype.ARRAY && !(c instanceof arrayobj)) {
throw new IOException("expected an array, but got something else!");
}
return c;
default:
throw new IOException("can't process type: " + f.toString());
Expand Down Expand Up @@ -627,7 +627,9 @@ public arrayobj read_newArray(DataInputStream dis) throws IOException {
throw new IOException("invalid name in array classdesc: " + cd.name);
}
arraycoll ac = read_arrayValues(cd.name.substring(1), dis);
return new arrayobj(handle, cd, ac);
arrayobj ao = new arrayobj(handle, cd, ac);
setHandle(handle, ao);
return ao;
}
public arraycoll read_arrayValues(String str, DataInputStream dis) throws IOException {
byte b = str.getBytes("UTF-8")[0];
Expand Down