Examples of ConcurrentModificationException


Examples of java.util.ConcurrentModificationException

            @Override public E next () {
                checkForComodification();
                int ii = _cursor;
                if (ii >= _size) throw new NoSuchElementException();
                Object[] data = _data;
                if (ii >= data.length) throw new ConcurrentModificationException();
                _cursor = ii + 1;
                @SuppressWarnings("unchecked") E elem = (E) data[_lastRet = ii];
                return elem;
            }

            @Override public void remove () {
                if (_lastRet < 0) throw new IllegalStateException();
                checkForComodification();
                try {
                    DestroyableList.this.remove(_lastRet);
                    _cursor = _lastRet;
                    _lastRet = -1;
                    _exModCount = _modCount;
                } catch (IndexOutOfBoundsException ex) {
                    throw new ConcurrentModificationException();
                }
            }

            final void checkForComodification() {
                if (_modCount != _exModCount) throw new ConcurrentModificationException();
            }

            protected int _cursor;       // index of next element to return
            protected int _lastRet = -1; // index of last element returned; -1 if no such
            protected int _exModCount = _modCount;
View Full Code Here

Examples of org.candlepin.common.exceptions.ConcurrentModificationException

    protected final void flush() {
        try {
            getEntityManager().flush();
        }
        catch (OptimisticLockException e) {
            throw new ConcurrentModificationException(getConcurrentModificationMessage(),
                e);
        }
    }
View Full Code Here

Examples of org.nasutekds.server.admin.client.ConcurrentModificationException

    validateRelationDefinition(r);
    Driver ctx = getDriver();
    try {
      return ctx.managedObjectExists(path.child(r));
    } catch (ManagedObjectNotFoundException e) {
      throw new ConcurrentModificationException();
    }
  }
View Full Code Here

Examples of org.wso2.carbon.registry.core.exceptions.ConcurrentModificationException

                    e.getMessage();
            log.error(msg, e);
            if (msg.toLowerCase().contains("lock")) {
                // there can be deadlocks due to concurrent modifications, which we need to handle
                // separately.
                throw new ConcurrentModificationException(msg, e);
            } else {
                throw new RegistryException(msg, e);
            }
        } finally {
            try {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.