Hi! I've changed the implementation of Stack methods to rely on the Vector public method (which could be overridden in the subclasses) instead of relying on the internal Vector data (elementData, elementCount, modCount). The RI uses (as the tests show) the same implementation approach. Hopefully, this doesn't result in a considerable performance loss.
ChangeLog entries: * java/util/Stack.java: Update the internal implementation comment. (pop()): Use Vector methods (which could be overridden in a Stack subclass) instead of manipulating Vector internal data directly. (peek()): Likewise. (search(Object)): Likewise. (pop()): Remove unnecessary SuppressWarnings annotation. (peek()): Likewise. (empty()): Call size(); remove unnecessary synchronized.
classpath-ivmai-19.diff
Description: Binary data