In setAttributes(int,...) mask out unused attributes bits in the same as setAttributes(String,...) does

This commit is contained in:
igor%mir2.org 2002-04-16 07:24:50 +00:00
parent 634531d68c
commit ab6d7edc2f

View File

@ -467,6 +467,8 @@ public abstract class ScriptableObject implements Scriptable, Serializable,
int attributes)
throws PropertyException
{
final int mask = READONLY | DONTENUM | PERMANENT;
attributes &= mask; // mask out unused bits
Slot slot = getSlot(null, index, false);
if (slot == null) {
throw PropertyException.withMessage0("msg.prop.not.found");