Package java.util

Examples of java.util.ConcurrentModificationException


            return false;
        } else if (nextNode != null) {
            return true;
        } else {
            if (currentNode instanceof OMNode && ((OMNode)currentNode).getParent() != currentParent) {
                throw new ConcurrentModificationException("The current node has been removed using a method other than Iterator#remove()");
            }
            nextNode = getNextNode(currentNode);
            noMoreNodes = nextNode == null;
            return !noMoreNodes;
        }
View Full Code Here


            return false;
        } else if (nextNode != null) {
            return true;
        } else {
            if (currentNode.getParent() != currentParent) {
                throw new ConcurrentModificationException("The current node has been removed using a method other than Iterator#remove()");
            }
            nextNode = getNextNode(currentNode);
            noMoreNodes = nextNode == null;
            return !noMoreNodes;
        }
View Full Code Here

     * will leave the underlying data structure in a confused
     * state.
     */
    public void remove() {
        if ( _expectedSize != _hash.size() ) {
            throw new ConcurrentModificationException();
        }

        // Disable auto compaction during the remove. This is a workaround for bug 1642768.
        try {
            _hash.tempDisableAutoCompaction();
View Full Code Here

     *          collection's size has been modified since the iterator was
     *          created.
     */
    protected final int nextIndex() {
        if ( _expectedSize != _hash.size() ) {
            throw new ConcurrentModificationException();
        }

        Object[] set = _object_hash._set;
        int i = _index;
        while ( i-- > 0 && ( set[i] == TObjectHash.FREE || set[i] == TObjectHash.REMOVED ) ) {
View Full Code Here

     *          if the underlying collection's
     *          size has been modified since the iterator was created.
     */
    protected final int nextIndex() {
        if ( _expectedSize != _hash.size() ) {
            throw new ConcurrentModificationException();
        }

        byte[] states = _hash._states;
        int i = _index;
        while ( i-- > 0 && ( states[i] != TPrimitiveHash.FULL ) ) {
View Full Code Here

     * will leave the underlying data structure in a confused
     * state.
     */
    public void remove() {
        if (_expectedSize != _hash.size()) {
            throw new ConcurrentModificationException();
        }

        // Disable auto compaction during the remove. This is a workaround for bug 1642768.
        try {
            _hash.tempDisableAutoCompaction();
View Full Code Here

                // For either of these conditions to exist, the backing set
                // would have to have been concurrently modified, since we
                // wouldn't normally iterate over a key that isn't mapped to a
                // value
                if (values == null || values.size() == 0)
                    throw new ConcurrentModificationException(
                        "Expected at least one value mapped to " + getKey());
                values.remove(getValue());
                values.add(value);
                return super.setValue(value);
            }
View Full Code Here

      try {
        lastRet = false;
        BiomeInfoSet.this.remove(--cursor);
        expectedModCount = modCount;
      } catch (IndexOutOfBoundsException e) {
        throw new ConcurrentModificationException();
      }
    }
View Full Code Here

      }
    }

    protected final void checkForComodification() {
      if (BiomeInfoSet.this.modCount != expectedModCount)
        throw new ConcurrentModificationException();
    }
View Full Code Here

    }

    @Override
    public void incrementSize(long expected) {
        if (size + 1 != expected)
            throw new ConcurrentModificationException("size: " + (size + 1) + ", expected: " + expected + ", Have you updated the chronicle without thread safety?");
        assert size == 0 || getIndexData(size) > 0 : "Failed to set the index at " + size + " was 0.";

        size++;
        appendingThread = null;
    }
View Full Code Here

TOP

Related Classes of java.util.ConcurrentModificationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.