Skip to content

Commit b64f999

Browse files
committed
Code cleanup, no need for reflection for emptying loaded config properties
1 parent b787cb5 commit b64f999

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

modules/core-test-module/src/main/java/testutil/ConfigLoaderTestHelper.java

+2-5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import java.lang.reflect.Modifier;
88
import java.util.HashMap;
99
import java.util.Map;
10+
import java.util.Properties;
1011

1112
/**
1213
* Test helper that can empty any properties loaded by the ConfigLoader.
@@ -28,11 +29,7 @@ private static Field makeAccessible(Field field)
2829
}
2930

3031
public static void clearConfigProperties() {
31-
try {
32-
setResolvedProperties(new HashMap<Property, Object>());
33-
} catch (Exception e) {
34-
throw new AssertionError(e.getMessage(), e);
35-
}
32+
ConfigLoader.loadProperties(new Properties(), false);
3633
}
3734

3835
public static void restoreOriginalConfigProperties() {

0 commit comments

Comments
 (0)