protected final Object replaceObject(Object obj) throws IOException {
  if ((obj instanceof Remote) && !(obj instanceof RemoteStub)) {
    Target target=ObjectTable.getTarget((Remote)obj);
    if (target != null) {
      return target.getStub();
    }
  }
  return obj;
}

protected final Object replaceObject ( Object obj ) throws IOException { if ( ( obj instanceof Remote ) && ! ( obj instanceof RemoteStub ) ) { Target target = ObjectTable . getTarget ( ( Remote ) obj ) ; if ( target != null ) { return target . getStub ( ) ; } } return obj ; }
checks for objects that are instances of java . rmi . remote that need to be serialized as proxy objects .
