Package java.util

Examples of java.util.ConcurrentModificationException


         * @exception NoSuchElementException if there is no element left in the map
         */
        public int key()
            throws ConcurrentModificationException, NoSuchElementException {
            if (referenceCount != count) {
                throw new ConcurrentModificationException();
            }
            if (current < 0) {
                throw new NoSuchElementException();
            }
            return keys[current];
View Full Code Here


         * @exception NoSuchElementException if there is no element left in the map
         */
        public double value()
            throws ConcurrentModificationException, NoSuchElementException {
            if (referenceCount != count) {
                throw new ConcurrentModificationException();
            }
            if (current < 0) {
                throw new NoSuchElementException();
            }
            return values[current];
View Full Code Here

         */
        public void advance()
            throws ConcurrentModificationException, NoSuchElementException {

            if (referenceCount != count) {
                throw new ConcurrentModificationException();
            }

            // advance on step
            current = next;

View Full Code Here

                     */
                    item.commit();
                } else {
                    queryDelegate.rollback();
                    refresh();
                    throw new ConcurrentModificationException(
                            "Item with the ID '" + item.getId()
                                    + "' has been externally modified.");
                }
            }
            /* Perform buffered additions */
 
View Full Code Here

            try {
                queryDelegate.beginTransaction();
                if (queryDelegate.storeRow(changedItem) == 0) {
                    queryDelegate.rollback();
                    refresh();
                    throw new ConcurrentModificationException(
                            "Item with the ID '" + changedItem.getId()
                                    + "' has been externally modified.");
                }
                queryDelegate.commit();
                if (notificationsEnabled) {
View Full Code Here

        return next != null;
    }

    final Entry<K,V> nextEntry() {
        if (modCount != expectedModCount)
            throw new ConcurrentModificationException();
        Entry<K,V> e = next;
        if (e == null)
            throw new NoSuchElementException();

        if ((next = e.next) == null) {
View Full Code Here

    public void remove() {
        if (current == null)
            throw new IllegalStateException();
        if (modCount != expectedModCount)
            throw new ConcurrentModificationException();
        Object k = current.key;
        current = null;
        QuickHashMap.this.removeEntryForKey(k);
        expectedModCount = modCount;
    }
View Full Code Here

   * @return number of times exception in log file.
   * @throws IOException
   */
  public int getNumberOfConcurrentModificationExceptionsInLog(
      String[] excludeExpList) throws IOException {
    return getNumberOfExceptionsInLog(new ConcurrentModificationException(),
        excludeExpList);
  }
View Full Code Here

    // Don't need flowControl in case Inspector doesn't implement Lifecycle,
    // however is handy not to expect it == null inside internalInspect*
    // XXX Once there's need to make this class thread-safe,
    // shall move flowControl to thread-local state.
    if (flowControl != null) {
      throw new ConcurrentModificationException("HgBundle is in use and not thread-safe yet");
    }
    flowControl = new Lifecycle.BasicCallback();
    final Lifecycle lifecycle = Adaptable.Factory.getAdapter(inspector, Lifecycle.class, null);
    if (lifecycle != null) {
      lifecycle.start(-1, flowControl, flowControl);
View Full Code Here

      return (E) array[i++];
    }
   
    private void checkForModification() {
      if (startModCount != modCount) {
        throw new ConcurrentModificationException();
      }
    }
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.