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

Commit 8657667

Browse files
author
yamamoto_taku
committed
Let the ClassLoader which had loaded ourself - instead of system one - load the YAML resource.
This is for use with application containers, Android, etc. where non-default ClassLoader should be used.
1 parent 351b837 commit 8657667

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/com/twitter/Regex.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ private static String join(Collection<?> col, String delim) {
2525

2626
private static final Yaml yaml = new Yaml();
2727
private static final Map tlds = (Map)yaml.load(
28-
ClassLoader.getSystemResourceAsStream("tld_lib.yml")
28+
Regex.class.getClassLoader().getResourceAsStream("tld_lib.yml")
2929
);
3030
private static final List gTlds = (List)tlds.get("generic");
3131
private static final List cTlds = (List)tlds.get("country");

0 commit comments

Comments
 (0)