http://sourceforge.net/tracker/index.php?func=detail&aid=1286607&group_id=119783&atid=684975
On 9/10/05, Arto Arffman <[EMAIL PROTECTED]> wrote:
I accidentally added same attribute modifier twice into same component. It caused an infinite loop. Took a while to find the reason for this.
AttributeModifiers are chained one to another:
public final Component add(final AttributeModifier modifier)
{
modifier.next = attributeModifiers;
attributeModifiers = modifier;
return this;
}
So if you add same component twice, its next would contain link to itself. Of course the chain can be also longer than two items (or one item in fact).
Fix is quite easy. Check existance before adding by going through the chain. Perhaps exception should be thrown?
/Arto
