Skip to content

Commit

Permalink
Merge pull request #1976 from swagger-api/revert-1969-1968
Browse files Browse the repository at this point in the history
Revert "Add fallback to Thread Context Class Loader for resource loading"
  • Loading branch information
gracekarina authored Sep 23, 2023
2 parents 4213f7f + 41dc277 commit 5108367
Showing 1 changed file with 1 addition and 5 deletions.
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,10 +22,6 @@ 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

0 comments on commit 5108367

Please sign in to comment.