fixed a bug that didn't let primitive values returned by a bean pass through

because of a classcastexception.
This commit is contained in:
stefanp 2002-07-31 15:57:25 +00:00
parent c5e1c05dfb
commit a4a0405241

View file

@ -32,6 +32,7 @@ public class ESBeanWrapper extends ESWrapper {
public ESValue getProperty(String propertyName, int hash) throws EcmaScriptException {
try {
ESValue val = super.getProperty (propertyName, hash);
if (val instanceof ESWrapper) {
Object theObject = ((ESWrapper)val).getJavaObject ();
if (val instanceof ESWrapper && theObject instanceof INode) {
return eval.getNodeWrapper ((INode) theObject);
@ -40,9 +41,9 @@ public class ESBeanWrapper extends ESWrapper {
if (theObject instanceof SystemProperties && super.getJavaObject () instanceof ApplicationBean)
wrapper.setReadonly(true);
return wrapper;
} else {
return val;
}
}
return val;
} catch (Exception rte) {
return ESNull.theNull;
}