}
objectOutputStream.writeObject(value);
break;
}
} catch (final IllegalAccessException illegalAccessException) {
throw new SerializationException(illegalAccessException);
} catch (final InvocationTargetException invocationTargetException) {
final Throwable cause = invocationTargetException.getCause();
if (cause instanceof Error) {
final Error error = (Error) cause;
throw new SerializationException(error);
}
if (cause instanceof RuntimeException) {
final RuntimeException runtimeException = (RuntimeException) cause;
throw new SerializationException(runtimeException);
}
throw new SerializationException(cause);
}
}