Switch to Class.getResourceAsStream with a relative path

IMPLEMENTATION NOTE: Class.getResourceAsStream uses a *relative* path by
default, in contrast to Classloader.getResourceAsStream, which uses an
*absolute* one. This is not clearly documented in the JDK, only
noticeable by the absence of the word "absolute" in
Class.getResourceAsStream javadocs. For more details, see
https://www.baeldung.com/java-class-vs-classloader-getresource.

Because we expect the properties file to be in the same directory/package
as this class, the relative path comes in handy and as a bonus is also
relocation-friendly (think Maven Shade).
2 files changed