Replace System.getProperties().remove(x) with System.clearProperty(x)
This commit migrates to the not-so-new System.clearProperty() method introduced in Java 1.5.
This commit is contained in:
@@ -73,7 +73,7 @@ class ResourceEditorTests {
|
||||
assertThat(resolved.getFilename()).isEqualTo("foo");
|
||||
}
|
||||
finally {
|
||||
System.getProperties().remove("test.prop");
|
||||
System.clearProperty("test.prop");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ class ResourceEditorTests {
|
||||
assertThat(resolved.getFilename()).isEqualTo("foo-${bar}");
|
||||
}
|
||||
finally {
|
||||
System.getProperties().remove("test.prop");
|
||||
System.clearProperty("test.prop");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ class ResourceEditorTests {
|
||||
});
|
||||
}
|
||||
finally {
|
||||
System.getProperties().remove("test.prop");
|
||||
System.clearProperty("test.prop");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class ResourceArrayPropertyEditorTests {
|
||||
assertThat(resources[0].getFilename()).isEqualTo("foo");
|
||||
}
|
||||
finally {
|
||||
System.getProperties().remove("test.prop");
|
||||
System.clearProperty("test.prop");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class ResourceArrayPropertyEditorTests {
|
||||
editor.setAsText("${test.prop}-${bar}"));
|
||||
}
|
||||
finally {
|
||||
System.getProperties().remove("test.prop");
|
||||
System.clearProperty("test.prop");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ class SystemPropertyUtilsTests {
|
||||
assertThat(resolved).isEqualTo("bar");
|
||||
}
|
||||
finally {
|
||||
System.getProperties().remove("test.prop");
|
||||
System.clearProperty("test.prop");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ class SystemPropertyUtilsTests {
|
||||
assertThat(resolved).isEqualTo("bar");
|
||||
}
|
||||
finally {
|
||||
System.getProperties().remove("test.prop");
|
||||
System.clearProperty("test.prop");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class SystemPropertyUtilsTests {
|
||||
assertThat(resolved).isEqualTo("bar");
|
||||
}
|
||||
finally {
|
||||
System.getProperties().remove("test.prop");
|
||||
System.clearProperty("test.prop");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ class SystemPropertyUtilsTests {
|
||||
assertThat(resolved).isEqualTo("bar");
|
||||
}
|
||||
finally {
|
||||
System.getProperties().remove("test.prop");
|
||||
System.clearProperty("test.prop");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -122,8 +122,8 @@ class SystemPropertyUtilsTests {
|
||||
assertThat(resolved).isEqualTo("foo=baz");
|
||||
}
|
||||
finally {
|
||||
System.getProperties().remove("test.prop");
|
||||
System.getProperties().remove("bar");
|
||||
System.clearProperty("test.prop");
|
||||
System.clearProperty("bar");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user