Allow access to static fields from javascript.
This commit is contained in:
parent
40b85a3838
commit
e42ce0ae46
1 changed files with 4 additions and 3 deletions
|
@ -338,9 +338,10 @@ public class ESWrapper extends ESObject {
|
||||||
return noPropertyMarker;
|
return noPropertyMarker;
|
||||||
}
|
}
|
||||||
int modifiers = fld.getModifiers();
|
int modifiers = fld.getModifiers();
|
||||||
if ((theObject == null) != Modifier.isStatic(modifiers)) {
|
// ALLOW ACCESS TO STATIC FIELDS. HW, 2001-11-27
|
||||||
throw new EcmaScriptException("Field mode (static) not correct for "+ propertyName);
|
// if ((theObject == null) != Modifier.isStatic(modifiers)) {
|
||||||
}
|
// throw new EcmaScriptException("Field mode (static) not correct for "+ propertyName);
|
||||||
|
// }
|
||||||
if (!Modifier.isPublic(modifiers)) {
|
if (!Modifier.isPublic(modifiers)) {
|
||||||
throw new EcmaScriptException("Field "+ propertyName + " not public");
|
throw new EcmaScriptException("Field "+ propertyName + " not public");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue