1686 |
{ |
{ |
1687 |
continue; |
continue; |
1688 |
} |
} |
1689 |
if (count < notificationSet.length) |
if (count >= notificationSet.length) |
1690 |
{ |
{ |
1691 |
notificationSet[count++] = rec; |
// very simple growth algorithm |
1692 |
|
int len = Math.max(notificationSet.length, 1); |
1693 |
|
ListenerRecord[] tmp = new ListenerRecord[len * 2]; |
1694 |
|
System.arraycopy(notificationSet, 0, tmp, 0, |
1695 |
|
notificationSet.length); |
1696 |
|
notificationSet = tmp; |
1697 |
} |
} |
1698 |
else |
notificationSet[count++] = rec; |
|
// XXX fire up some cheap growth algorithm |
|
|
throw new RuntimeException("Event notification set size exceeded"); |
|
1699 |
} |
} |
1700 |
|
|
1701 |
// Notify just those listeners |
// Notify just those listeners |