Skip to content

Commit c20de16

Browse files
#patch: Load resources using ClassLoader in SnapshotProperties to improve JPMS compatibility. (#172)
1 parent 063a7c6 commit c20de16

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java-snapshot-testing-core/src/main/java/au/com/origin/snapshots/SnapshotProperties.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ public enum SnapshotProperties {
1616

1717
SnapshotProperties() {
1818
try {
19-
InputStream in = SnapshotProperties.class.getResourceAsStream("/snapshot.properties");
19+
InputStream in =
20+
SnapshotProperties.class.getClassLoader().getResourceAsStream("snapshot.properties");
2021
snapshotProperties.load(in);
2122
} catch (Exception e) {
2223
// It's ok, if the SnapshotConfig implementation attempts to get a property they will receive

0 commit comments

Comments
 (0)