#1367 - Modularized project cannot locate ebean.properties file on Java 10

This commit is contained in:
rob bygrave
2018-05-21 00:29:04 +12:00
parent f6d8c8b618
commit 85d3caf079
@@ -37,7 +37,7 @@ class LoadContext {
InputStream is = null;
if (source == Loader.Source.RESOURCE) {
is = getClass().getResourceAsStream("/" + resourcePath);
is = resourceStream(resourcePath);
if (is != null) {
loadedResources.add(resourcePath);
}
@@ -56,6 +56,15 @@ class LoadContext {
return is;
}
private InputStream resourceStream(String resourcePath) {
InputStream is = getClass().getResourceAsStream("/" + resourcePath);
if (is == null) {
// search the module path for top level resource
is = ClassLoader.getSystemResourceAsStream(resourcePath);
}
return is;
}
/**
* Add a property entry.
*/