Skip to content
This repository was archived by the owner on Sep 18, 2021. It is now read-only.

Don't rely on getSystemResourceAsStream to retrieve tld_lib.yml #74

Merged
merged 1 commit into from
Nov 19, 2014

Conversation

MtFootFrontier
Copy link
Contributor

Let the ClassLoader which has loaded ourself load the YAML resource instead.
This is vital for environments such as application containers, Android, etc. where non-default ClassLoader should be used.

…- load the YAML resource.

This is for use with application containers, Android, etc. where non-default ClassLoader should be used.
@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling 8657667 on uv-beluga:adaptive_classloader into 351b837 on twitter:master.

@jakl
Copy link
Contributor

jakl commented Nov 19, 2014

Thanks!

jakl added a commit that referenced this pull request Nov 19, 2014
Don't rely on getSystemResourceAsStream to retrieve tld_lib.yml
@jakl jakl merged commit f19da87 into twitter-archive:master Nov 19, 2014
@ralph-tice
Copy link

This call is relatively expensive in my profiling, would it be crazy to cache the getClassLoader result for future instantiations of this class?

@MtFootFrontier
Copy link
Contributor Author

It is static field so initialization will happen only once:
caching the result of getClassLoader() here makes no sence IMO.

@ralph-tice
Copy link

Sorry, I thought private would possibly scope the variable to the class instance specifically & I was looking at a different invocation of getClassLoader than the one from twitter-text. Thanks for your time!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants