From 7143d2aab4386e9de3ef9cb7e9984a88575c5f19 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: 68d7bca4bcbc7241f3f31e669dcae78ac62319bb --- .../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