@SuppressWarnings("unchecked")
    public static <T> T deserializeObject(byte[] bytes, ClassLoader cl, boolean isFailureTolerant)
            throws IOException, ClassNotFoundException {

        return deserializeObject(new ByteArrayInputStream(bytes), cl, isFailureTolerant);
    }
Utility class to create instances from class objects and checking failure reasons.

<p>Copied from Flink project.</p>
inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/util/InstantiationUtil.java