1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-06 08:35:26 +02:00

null attributes need to be allowed (in particular for delete() case).

This commit is contained in:
David McKnight 2006-11-09 16:25:05 +00:00
parent 4d68ac7d71
commit aa1f2c1034

View file

@ -757,24 +757,24 @@ public final class DataElement implements IDataElement
*/
public void setAttribute(int attributeIndex, String attribute)
{
if (attribute != null)
if ((attributeIndex == DE.A_NAME) && (getAttribute(DE.A_NAME).equals(getAttribute(DE.A_VALUE))))
{
if ((attributeIndex == DE.A_NAME) && (getAttribute(DE.A_NAME).equals(getAttribute(DE.A_VALUE))))
{
_attributes[DE.A_VALUE] = attribute;
}
else if (attributeIndex == DE.A_DEPTH)
{
_depth = Integer.parseInt(attribute);
}
else if (attributeIndex == DE.A_TYPE)
{
_descriptor = null;
}
_attributes[attributeIndex] = attribute;
_isUpdated = false;
_attributes[DE.A_VALUE] = attribute;
}
else if (attributeIndex == DE.A_DEPTH)
{
if (attribute != null)
_depth = Integer.parseInt(attribute);
else
_depth = 0;
}
else if (attributeIndex == DE.A_TYPE)
{
_descriptor = null;
}
_attributes[attributeIndex] = attribute;
_isUpdated = false;
}
/**