From 23a47a6f6303291193df28cb33486b6d2d5ccf4f Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Thu, 29 Aug 2013 16:56:00 -0400 Subject: [PATCH] added ability to remove a property (for test cases) Former-commit-id: b2388ddb516b2f5b32f54398c11fc0c00990c9c8 --- .../java/org/owasp/dependencycheck/utils/Settings.java | 10 ++++++++++ 1 file changed, 10 insertions(+) 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