summaryrefslogtreecommitdiffstats
path: root/libjava/java/util/Vector.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java/util/Vector.java')
-rw-r--r--libjava/java/util/Vector.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/libjava/java/util/Vector.java b/libjava/java/util/Vector.java
index cd0a763a3aa..06d2ebefe02 100644
--- a/libjava/java/util/Vector.java
+++ b/libjava/java/util/Vector.java
@@ -178,7 +178,6 @@ public class Vector extends AbstractList
*/
public synchronized void ensureCapacity(int minCapacity)
{
- modCount++;
if (elementData.length >= minCapacity)
return;
@@ -459,7 +458,7 @@ public class Vector extends AbstractList
public synchronized void addElement(Object obj)
{
if (elementCount == elementData.length)
- ensureCapacity(++elementCount);
+ ensureCapacity(elementCount + 1);
modCount++;
elementData[elementCount++] = obj;
}
OpenPOWER on IntegriCloud