PropertyFile coercion bugfix
authoradam <adam@megacz.com>
Sat, 8 May 2004 07:51:34 +0000 (07:51 +0000)
committeradam <adam@megacz.com>
Sat, 8 May 2004 07:51:34 +0000 (07:51 +0000)
darcs-hash:20040508075134-5007d-683ff12e5b8e5d552ccf2bbf9de0b3a00f66e8f8.gz

src/org/ibex/js/PropertyFile.java

index 4e8542f..c60e43d 100644 (file)
@@ -20,6 +20,7 @@ public class PropertyFile extends JS {
         public String coerceToString()  { return (String)p.get(prefix.substring(0, prefix.length() - 1)); }
         public Enumeration keys() throws JSExn { throw new JSExn("PropertyFile.keys() not supported"); }
         public Object get(Object key) throws JSExn {
+            if (toString(key).equals("")) return coerceToString();
             Object ret = p.get(prefix + escape(toString(key)));
             if (ret != null) return ret;
             return new Minion(prefix + escape(toString(key)) + ".");