We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1b15655 + ad3cdbf commit 0ccb15fCopy full SHA for 0ccb15f
client/src/main/java/org/asynchttpclient/config/AsyncHttpClientConfigHelper.java
@@ -47,6 +47,13 @@ private Properties parsePropertiesFile(String file) {
47
try (InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(file)) {
48
if (is != null) {
49
props.load(is);
50
+ } else {
51
+ //Try loading from this class classloader instead, e.g. for OSGi environments.
52
+ try(InputStream is2 = this.getClass().getClassLoader().getResourceAsStream(file)) {
53
+ if (is2 != null) {
54
+ props.load(is2);
55
+ }
56
57
}
58
} catch (IOException e) {
59
throw new IllegalArgumentException("Can't parse file", e);
0 commit comments