Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static String loadFileFromClasspath(String location) {
String file = FilenameUtils.separatorsToUnix(location);

InputStream inputStream = ClasspathHelper.class.getResourceAsStream(file);

if(inputStream == null) {
inputStream = ClasspathHelper.class.getClassLoader().getResourceAsStream(file);
}
Expand All @@ -22,6 +22,10 @@ public static String loadFileFromClasspath(String location) {
inputStream = ClassLoader.getSystemResourceAsStream(file);
}

if(inputStream == null) {
inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(file);
}

if(inputStream != null) {
try {
return IOUtils.toString(inputStream);
Expand Down