1486 |
Field f = getField (klass, field_name); |
Field f = getField (klass, field_name); |
1487 |
ObjectStreamField of = new ObjectStreamField(f.getName(), f.getType()); |
ObjectStreamField of = new ObjectStreamField(f.getName(), f.getType()); |
1488 |
|
|
1489 |
if (of.getTypeString() == null || |
/* if of is primitive something went wrong |
1490 |
!of.getTypeString().equals(type_code)) |
* in the check for primitive classes in writeFields. |
1491 |
|
*/ |
1492 |
|
if (of.isPrimitive()) |
1493 |
throw new InvalidClassException |
throw new InvalidClassException |
1494 |
("invalid type code for " + field_name + " in class " + klass.getName()); |
("invalid type code for " + field_name + " in class " + klass.getName() + " : object stream field is primitive"); |
1495 |
|
|
1496 |
|
if (!of.getTypeString().equals(type_code)) |
1497 |
|
throw new InvalidClassException |
1498 |
|
("invalid type code for " + field_name + " in class " + klass.getName() + " : object stream field " + of + " has type string " + of.getTypeString() + " instead of " + type_code); |
1499 |
|
|
1500 |
Object o = f.get (obj); |
Object o = f.get (obj); |
1501 |
// FIXME: We should check the type_code here |
// FIXME: We should check the type_code here |