Skip to content

Default Class Loader is Thread.currentThread().getContextClassLoader(); #3730

@d-jeffery

Description

@d-jeffery

Hi,

I was just wondering for what reason the preference is to set the default classloader to be the current thread, instead of the classloader that loaded the current class? Would it not make more sense to delegate directly to the classloader of Class, instead of the current thread, unless specified otherwise?

https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/common/Classes.java?source=cc#L48-L60

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions