diff --git a/dependency-check-core/src/main/java/org/owasp/dependencycheck/utils/Settings.java b/dependency-check-core/src/main/java/org/owasp/dependencycheck/utils/Settings.java index bc48db645..1f1024745 100644 --- a/dependency-check-core/src/main/java/org/owasp/dependencycheck/utils/Settings.java +++ b/dependency-check-core/src/main/java/org/owasp/dependencycheck/utils/Settings.java @@ -309,6 +309,16 @@ public final class Settings { return System.getProperty(key, INSTANCE.props.getProperty(key)); } + /** + * Removes a property from the local properties collection. This is mainly + * used in test cases. + * + * @param key the property key to remove + */ + public static void removeProperty(String key) { + INSTANCE.props.remove(key); + } + /** * Returns an int value from the properties file. If the value was specified * as a system property or passed in via the -Dprop=value argument - this