Always return empty array for propery enumerations on HopObject prototypes.

This is to stop prototype properties from showing up in HopObject proprerty
enumerations. HopObject.getAllIds() can be used to get a prototypes properties.
This commit is contained in:
hns 2005-01-14 13:46:53 +00:00
parent 5cc104466c
commit e3d8976274

View file

@ -910,7 +910,10 @@ public class HopObject extends ScriptableObject implements Wrapper, PropertyReco
*/
public Object[] getIds() {
if (node == null) {
return super.getIds();
// HopObject prototypes always return an empty array in order not to
// pollute actual HopObjects properties. Call getAllIds() to get
// a list of properties from a HopObject prototype.
return new Object[0];
}
checkNode();