summaryrefslogtreecommitdiffstats
path: root/libjava/gnu/xml/dom/DomNode.java
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-29 20:10:21 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>2005-03-29 20:10:21 +0000
commit7fb7568e63c3fe14af521de4699cb37898923ca7 (patch)
tree82c3d1612d87f4c67ff20739155d3645617ed760 /libjava/gnu/xml/dom/DomNode.java
parent6e24b1408dea233f0e2d38c84187fcb5a3778a93 (diff)
downloadppe42-gcc-7fb7568e63c3fe14af521de4699cb37898923ca7.tar.gz
ppe42-gcc-7fb7568e63c3fe14af521de4699cb37898923ca7.zip
2005-03-26 Chris Burdess <dog@gnu.org>
* gnu/xml/dom/DomNode.java (notifyNode): grow listener array as required. 2005-03-13 Michael Koch <konqueror@gmx.de> * gnu/xml/aelfred2/XmlParser.java: Fixed typo. 2005-03-11 Chris Burdess <dog@gnu.org> * gnu/xml/aelfred2/SAXDriver.java: Corrected bug handling URI warnings. 2005-02-27 Chris Burdess <dog@gnu.org> * gnu/xml/aelfred2/JAXPFactory.java, gnu/xml/aelfred2/SAXDriver.java, gnu/xml/aelfred2/XmlParser.java, gnu/xml/aelfred2/XmlReader.java: Applied GNU Classpath source code formatting conventions. Replaced arrays of Object with struct-like classes for easier maintainability. Made SAXDriver.stringInterning package private to allow access from XmlParser inside the loop without a method call overhead. 2005-03-11 Chris Burdess <dog@gnu.org> * gnu/xml/aelfred2/SAXDriver.java: Corrected bug handling URI warnings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@97200 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/gnu/xml/dom/DomNode.java')
-rw-r--r--libjava/gnu/xml/dom/DomNode.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/libjava/gnu/xml/dom/DomNode.java b/libjava/gnu/xml/dom/DomNode.java
index 20a62c53ba5..f763adf995a 100644
--- a/libjava/gnu/xml/dom/DomNode.java
+++ b/libjava/gnu/xml/dom/DomNode.java
@@ -1686,13 +1686,16 @@ public abstract class DomNode
{
continue;
}
- if (count < notificationSet.length)
+ if (count >= notificationSet.length)
{
- notificationSet[count++] = rec;
+ // very simple growth algorithm
+ int len = Math.max(notificationSet.length, 1);
+ ListenerRecord[] tmp = new ListenerRecord[len * 2];
+ System.arraycopy(notificationSet, 0, tmp, 0,
+ notificationSet.length);
+ notificationSet = tmp;
}
- else
- // XXX fire up some cheap growth algorithm
- throw new RuntimeException("Event notification set size exceeded");
+ notificationSet[count++] = rec;
}
// Notify just those listeners
OpenPOWER on IntegriCloud