ArrayIndexOutOfBoundsException being thrown by NEffect.getEffectElement()

0 views
Skip to first unread message

DaveC

unread,
Jul 6, 2010, 5:18:42 AM7/6/10
to GWT-FX
Hi,

Found this issue recently where getEffectElement() throws an Exception
if the EffectElement hasn't been set --> it probably should return
null...

Cheers,
Dave

Adam T

unread,
Aug 4, 2010, 2:02:06 PM8/4/10
to GWT-FX
Thanks Dave, added as defect #146, and fixed in code as follows:

/**
* Returns the first element this effect is applied to, unless this
effect
* is added to an {@link org.adamtacy.client.ui.NEffectPanel}, in
which case
* that panel's Element is returned.
* See defect #146 to ensure null is returned if no effect element
set yet.
*/
public Element getEffectElement() {
Element toReturn = null;
if (!effectElements.isEmpty())effectElements.get(0);
if (thePanel != null)
toReturn = thePanel.getElement();
return toReturn;
}

//Adam
Reply all
Reply to author
Forward
0 new messages