From e6da507d852bc690e44e0fcec2304373e81d5fba Mon Sep 17 00:00:00 2001 From: hns Date: Fri, 27 Feb 2004 13:19:17 +0000 Subject: [PATCH] Fix HopObject cach property getter to do a Context.toObject(). Remove bogus getDefaultValue() implementation. --- src/helma/scripting/rhino/HopObject.java | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/helma/scripting/rhino/HopObject.java b/src/helma/scripting/rhino/HopObject.java index c03d5c44..3928f0fa 100644 --- a/src/helma/scripting/rhino/HopObject.java +++ b/src/helma/scripting/rhino/HopObject.java @@ -219,7 +219,12 @@ public class HopObject extends ScriptableObject implements Wrapper { checkNode(); - return node.getCacheNode(); + INode cache = node.getCacheNode(); + if (cache != null) { + return Context.toObject(node.getCacheNode(), core.global); + } + + return null; } /** @@ -930,20 +935,8 @@ public class HopObject extends ScriptableObject implements Wrapper { return NOT_FOUND; } - /** - * - * - * @param hint ... - * - * @return ... - */ - public Object getDefaultValue(Class hint) { - return (className != null) ? ("[HopObject " + className + "]") : "[HopObject]"; - } - - /** - * + * Return a string representation of this object * * @return ... */