From a19a01d19b3ff02a05aa012d207d4f1662640bbb Mon Sep 17 00:00:00 2001 From: hns Date: Tue, 14 May 2002 16:41:35 +0000 Subject: [PATCH] Call getNodeProperty() instead of getProperty() in NodeGet to avoid retrieving prototype functions. Fixed skinpath conversion to Java array. --- src/helma/scripting/fesi/HopExtension.java | 26 ++++++++++++++++------ 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/src/helma/scripting/fesi/HopExtension.java b/src/helma/scripting/fesi/HopExtension.java index 69777ff7..be0a8653 100644 --- a/src/helma/scripting/fesi/HopExtension.java +++ b/src/helma/scripting/fesi/HopExtension.java @@ -198,7 +198,10 @@ public class HopExtension { esv = thisObject.getProperty (i); } else { String name = arguments[0].toString (); - esv = thisObject.getProperty (name, name.hashCode ()); + // call esNodeProperty() method special to ESNode because we want to avoid + // retrieving prototype functions when calling hopobject.get(). + ESNode esn = (ESNode) thisObject; + esv = esn.getNodeProperty (name); } return (esv); } @@ -581,12 +584,21 @@ public class HopExtension { // if res.skinpath is set, transform it into an array of java objects // (strings for directory names and INodes for internal, db-stored skinsets) ResponseTrans res = fesi.getResponse(); - Object[] skinpath = new Object[0]; - if (res.skinpath != null && res.skinpath instanceof ArrayPrototype) { - ArrayPrototype array = (ArrayPrototype) res.skinpath; - skinpath = new Object[array.size()]; - for (int i=0; i