From 06685adbec95c8f5e9588293cadd6defa276fbdf Mon Sep 17 00:00:00 2001 From: hns Date: Mon, 29 Mar 2004 14:53:23 +0000 Subject: [PATCH] Re-add a simple getDefaultValue implementation to prevent runtime errors. --- src/helma/scripting/rhino/HopObject.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/helma/scripting/rhino/HopObject.java b/src/helma/scripting/rhino/HopObject.java index 3928f0fa..eccf37e6 100644 --- a/src/helma/scripting/rhino/HopObject.java +++ b/src/helma/scripting/rhino/HopObject.java @@ -160,6 +160,17 @@ public class HopObject extends ScriptableObject implements Wrapper { return className; } + /** + * Return a primitive representation for this object. + * FIXME: We always return a string representation. + * + * @param hint the type hint + * @return the default value for the object + */ + public Object getDefaultValue(Class hint) { + return toString(); + } + /** * *