if ((orb == null) ||
!(orb instanceof com.sun.corba.se.spi.orb.ORB)) {
throw new StreamCorruptedException(
"Default data must be read first");
}
ORBVersion clientOrbVersion =
((com.sun.corba.se.spi.orb.ORB)orb).getORBVersion();
// Fix Date interop bug. For older versions of the ORB don't do
// anything for readData(). Before this used to throw
// StreamCorruptedException for older versions of the ORB where
// calledDefaultWriteObject always returns true.
if ((ORBVersionFactory.getPEORB().compareTo(clientOrbVersion) <= 0) ||
(clientOrbVersion.equals(ORBVersionFactory.getFOREIGN()))) {
// XXX I18N and logging needed.
throw new StreamCorruptedException("Default data must be read first");
}
}