You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "Danny Chen (Jira)" <ji...@apache.org> on 2021/08/26 13:02:00 UTC
[jira] [Resolved] (HUDI-2321) Use the caller classloader for
ReflectionUtils
[ https://issues.apache.org/jira/browse/HUDI-2321?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Danny Chen resolved HUDI-2321.
------------------------------
Assignee: Danny Chen
Resolution: Fixed
Fixed via master branch: 0f39137ba854a2f808e2108c6aa10f4260b00844
> Use the caller classloader for ReflectionUtils
> ----------------------------------------------
>
> Key: HUDI-2321
> URL: https://issues.apache.org/jira/browse/HUDI-2321
> Project: Apache Hudi
> Issue Type: Bug
> Components: configs
> Reporter: Zheng yunhong
> Assignee: Danny Chen
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.10.0
>
>
> Based on the discussion on stackoverflow: https://stackoverflow.com/questions/1771679/difference-between-threads-context-class-loader-and-normal-classloader
> The {{Thread.currentThread().getContextClassLoader()}} should never be used because the context classloader is not immutable, user can overwrite it when thread switches, it is also nullable.
> The objection here: https://stackoverflow.com/a/36228195 says the the {Thread.currentThread().getContextClassLoader()}} is a JDK design error and the context classloader is never suggested to be used. The API that needs classloader should ask the user to set up the right classloader.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)