From a758a479d7840001c99fd2416524cdb2ea6d19d3 Mon Sep 17 00:00:00 2001 From: hns Date: Wed, 18 Jun 2003 16:09:37 +0000 Subject: [PATCH] Return string representation if hint is null in getDefaultValue. --- src/helma/scripting/rhino/MapWrapper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helma/scripting/rhino/MapWrapper.java b/src/helma/scripting/rhino/MapWrapper.java index ad9d9573..4a4fcc2b 100644 --- a/src/helma/scripting/rhino/MapWrapper.java +++ b/src/helma/scripting/rhino/MapWrapper.java @@ -197,7 +197,7 @@ public class MapWrapper extends ScriptableObject { } public Object getDefaultValue(Class hint) { - if (hint == String.class) { + if (hint == null || hint == String.class) { return map == null ? "{}" : map.toString(); } return super.getDefaultValue(hint);