fixed a bug that didn't let primitive values returned by a bean pass through
because of a classcastexception.
This commit is contained in:
parent
c5e1c05dfb
commit
a4a0405241
1 changed files with 19 additions and 18 deletions
|
@ -32,6 +32,7 @@ public class ESBeanWrapper extends ESWrapper {
|
||||||
public ESValue getProperty(String propertyName, int hash) throws EcmaScriptException {
|
public ESValue getProperty(String propertyName, int hash) throws EcmaScriptException {
|
||||||
try {
|
try {
|
||||||
ESValue val = super.getProperty (propertyName, hash);
|
ESValue val = super.getProperty (propertyName, hash);
|
||||||
|
if (val instanceof ESWrapper) {
|
||||||
Object theObject = ((ESWrapper)val).getJavaObject ();
|
Object theObject = ((ESWrapper)val).getJavaObject ();
|
||||||
if (val instanceof ESWrapper && theObject instanceof INode) {
|
if (val instanceof ESWrapper && theObject instanceof INode) {
|
||||||
return eval.getNodeWrapper ((INode) theObject);
|
return eval.getNodeWrapper ((INode) theObject);
|
||||||
|
@ -40,9 +41,9 @@ public class ESBeanWrapper extends ESWrapper {
|
||||||
if (theObject instanceof SystemProperties && super.getJavaObject () instanceof ApplicationBean)
|
if (theObject instanceof SystemProperties && super.getJavaObject () instanceof ApplicationBean)
|
||||||
wrapper.setReadonly(true);
|
wrapper.setReadonly(true);
|
||||||
return wrapper;
|
return wrapper;
|
||||||
} else {
|
|
||||||
return val;
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return val;
|
||||||
} catch (Exception rte) {
|
} catch (Exception rte) {
|
||||||
return ESNull.theNull;
|
return ESNull.theNull;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue