From 07102aefad77f1338e8e7f357996bbf40bdca9dc Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 17 Sep 2007 08:10:27 -0600 Subject: [PATCH] System.setProperty() should return the previous value of the property, if any --- classpath/java/lang/System.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/classpath/java/lang/System.java b/classpath/java/lang/System.java index 26e4b63e8c..1817392ee0 100644 --- a/classpath/java/lang/System.java +++ b/classpath/java/lang/System.java @@ -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);