}
CommandServerSerializationStreamReader streamReader = new CommandServerSerializationStreamReader();
if (decoder.getThrownValue() != null) {
streamReader.prepareToRead(Collections.singletonList(decoder.getThrownValue()));
try {
throw new RemoteException((Throwable) streamReader.readObject());
} catch (ClassCastException e) {
throw new SerializationException(
"The remote end threw something other than a Throwable", e);
} catch (SerializationException e) {
throw new IncompatibleRemoteServiceException(