Permalink
Browse files

Simplified clearing of a system property

  • Loading branch information...
1 parent 178f27c commit d4ec56d0f57f3a9a9b1ff7fbfe1790c155d0ee39 @marcphilipp committed Oct 6, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 junit-rules/src/main/java/org/junit/rules/ext/SystemProperties.java
@@ -15,7 +15,7 @@ public SystemProperties set(String key, String value) {
return this;
}
- public SystemProperties unset(String key) {
+ public SystemProperties clear(String key) {
set(key, null);
return this;
}
@@ -44,7 +44,7 @@ private void backup(String key) {
private void put(String key, String value) {
if (value == null) {
- System.getProperties().remove(key);
+ System.clearProperty(key);
} else {
System.setProperty(key, value);
}

0 comments on commit d4ec56d

Please sign in to comment.