[
https://issues.apache.org/jira/browse/FLINK-3313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15130353#comment-15130353
]
ASF GitHub Bot commented on FLINK-3313:
---------------------------------------
Github user StephanEwen commented on a diff in the pull request:
https://github.com/apache/flink/pull/1577#discussion_r51717545
--- Diff:
flink-core/src/main/java/org/apache/flink/util/InstantiationUtil.java ---
@@ -298,6 +299,21 @@ public static void writeObjectToConfig(Object o,
Configuration config, String ke
return baos.toByteArray();
}
}
+
+ /**
+ * Clones the given serializable object using Java serialization.
+ *
+ * @param obj Object to clone
+ * @param classLoader class loader to use to deserialize the object
+ * @param <T> Type of the object to clone
+ * @return Cloned object
+ * @throws IOException
+ * @throws ClassNotFoundException
+ */
+ public static <T extends Serializable> T clone(T obj, ClassLoader
classLoader) throws IOException, ClassNotFoundException {
--- End diff --
I think we can drop the classloader here and simply use the classloader of
the original object:
`return deserializeObject(serializedObject,
obj.getClass().getClassLoader());`
> Kafka08ITCase.testOneSourceMultiplePartitions fails with EOFException
> ---------------------------------------------------------------------
>
> Key: FLINK-3313
> URL: https://issues.apache.org/jira/browse/FLINK-3313
> Project: Flink
> Issue Type: Bug
> Components: Kafka Connector
> Reporter: Robert Metzger
> Assignee: Till Rohrmann
> Labels: test-stability
>
> The deserialization has recently been modified:
> https://github.com/apache/flink/commit/92efcd34a5da2bccb07666f2c647974ea3e7c94f
> this is the log:
> https://s3.amazonaws.com/archive.travis-ci.org/jobs/106401688/log.txt
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)