handle org.mozilla.rhino.NativeString as string in HopObject.put().

This commit is contained in:
hns 2003-06-23 15:21:39 +00:00
parent 6109f475f0
commit b67b75c3b4

View file

@ -468,6 +468,8 @@ public class HopObject extends ScriptableObject {
if ("Date".equals(s.getClassName())) { if ("Date".equals(s.getClassName())) {
node.setDate(name, new Date((long) ScriptRuntime.toNumber(s))); node.setDate(name, new Date((long) ScriptRuntime.toNumber(s)));
} else if ("String".equals(s.getClassName())) {
node.setString(name, ScriptRuntime.toString(s));
} else if (s instanceof MapWrapper) { } else if (s instanceof MapWrapper) {
node.setJavaObject(name, ((MapWrapper) s).unwrap()); node.setJavaObject(name, ((MapWrapper) s).unwrap());
} else if (s instanceof HopObject) { } else if (s instanceof HopObject) {