From 6409747f1792f6f7170818636e0d02cfa860b43d Mon Sep 17 00:00:00 2001 From: Zsombor Date: Sun, 13 Jul 2008 18:27:42 -0600 Subject: [PATCH] add Properties.getProperty(String,String) --- classpath/java/util/Properties.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/classpath/java/util/Properties.java b/classpath/java/util/Properties.java index 06c3b0b07b..310665567f 100644 --- a/classpath/java/util/Properties.java +++ b/classpath/java/util/Properties.java @@ -37,6 +37,14 @@ public class Properties extends Hashtable { return (String)get(key); } + public String getProperty(String key, String defaultValue) { + String value = (String) get(key); + if (value == null) { + return defaultValue; + } + return value; + } + public void setProperty(String key, String value) { put(key, value); }