Skip to content
Snippets Groups Projects
Commit eec4579d authored by Lukas Stadler's avatar Lukas Stadler
Browse files

intern names during attribute updates

parent bfa89573
No related branches found
No related tags found
No related merge requests found
......@@ -246,14 +246,14 @@ public abstract class UpdateAttributes extends RBuiltinNode {
if (attrName == null) {
throw RError.error(this, RError.Message.ATTRIBUTES_NAMED);
}
if (attrName.equals(RRuntime.CLASS_ATTR_KEY)) {
if (RRuntime.CLASS_ATTR_KEY.equals(attrName)) {
Object attrValue = operand.getDataAt(i);
if (attrValue == null) {
throw RError.error(this, RError.Message.SET_INVALID_CLASS_ATTR);
}
attrObj.setClassAttr(UpdateAttr.convertClassAttrFromObject(attrValue));
} else {
attrObj.setAttr(attrName, operand.getDataAt(i));
attrObj.setAttr(attrName.intern(), operand.getDataAt(i));
}
}
return obj;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment