use of org.gradle.internal.serialize.ExceptionReplacingObjectInputStream in project gradle by gradle.
the class InProcessWorkerFactory method transferResultFromWorkerClassLoader.
private DefaultWorkResult transferResultFromWorkerClassLoader(Object result) throws IOException, ClassNotFoundException {
ByteArrayOutputStream resultBytes = new ByteArrayOutputStream();
ObjectOutputStream oos = new ExceptionReplacingObjectOutputStream(resultBytes);
try {
oos.writeObject(result);
} finally {
oos.close();
}
ObjectInputStream ois = new ExceptionReplacingObjectInputStream(new ByteArrayInputStream(resultBytes.toByteArray()), getClass().getClassLoader());
return (DefaultWorkResult) ois.readObject();
}
use of org.gradle.internal.serialize.ExceptionReplacingObjectInputStream in project gradle by gradle.
the class IsolatedClassloaderWorkerFactory method transferResultFromWorkerClassLoader.
private DefaultWorkResult transferResultFromWorkerClassLoader(Object result) throws IOException, ClassNotFoundException {
ByteArrayOutputStream resultBytes = new ByteArrayOutputStream();
ObjectOutputStream oos = new ExceptionReplacingObjectOutputStream(resultBytes);
try {
oos.writeObject(result);
} finally {
oos.close();
}
ObjectInputStream ois = new ExceptionReplacingObjectInputStream(new ByteArrayInputStream(resultBytes.toByteArray()), getClass().getClassLoader());
return (DefaultWorkResult) ois.readObject();
}
Aggregations