mirror of
https://github.com/corda/corda.git
synced 2024-12-29 09:18:58 +00:00
System.setProperty() should return the previous value of the property, if any
This commit is contained in:
parent
dc9ae3d269
commit
07102aefad
@ -63,15 +63,17 @@ public abstract class System {
|
||||
}
|
||||
}
|
||||
|
||||
public static void setProperty(String name, String value) {
|
||||
public static String setProperty(String name, String value) {
|
||||
for (Property p = properties; p != null; p = p.next) {
|
||||
if (p.name.equals(name)) {
|
||||
String oldValue = p.value;
|
||||
p.value = value;
|
||||
return;
|
||||
return oldValue;
|
||||
}
|
||||
}
|
||||
|
||||
properties = new Property(name, value, properties);
|
||||
return null;
|
||||
}
|
||||
|
||||
private static native String getProperty(int code);
|
||||
|
Loading…
Reference in New Issue
Block a user