Java 8 ConcurrentModificationException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Java 8 ConcurrentModificationException class.

This code example shows how to use the following methods:
      list.remove(lastRet);
      if (lastRet < cursor)
        cursor--;
      lastRet = -1;
    } catch (IndexOutOfBoundsException e) {
      throw new ConcurrentModificationException();
    } 
    if (sourceRecord != null) {
      ((OObjectProxyMethodHandler) sourceRecord.getHandler()).setDirty();
    } 
  } 
 
  public String getFetchPlan() {
    return fetchPlan;
  } 
 
  public void setFetchPlan(String fetchPlan) {
    this.fetchPlan = fetchPlan;
  } 
} 
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    if (pageIndex > 0) {
      // ITERATE INSIDE THE NODE 
      pageIndex--;
    } else { 
      if (tree.modCount != expectedModCount)
        throw new ConcurrentModificationException();
 
      next = OMVRBTree.predecessor(next);
      pageIndex = next != null ? next.getSize() - 1 : -1;
    } 
 
    lastReturned = next;
    return next;
  } 
 
  @SuppressWarnings("unchecked") 
  public T update(final T iValue) {
    if (lastReturned == null)
      throw new IllegalStateException();
    if (tree.modCount != expectedModCount)
7
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
            } 
        } 
 
        final void checkForComodification() { 
            if (modCount != expectedModCount)
                throw new ConcurrentModificationException();
        } 
 
    } 
     
} 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
            // END android-changed 
        } 
 
        void checkConcurrentMod() throws ConcurrentModificationException { 
            if (expectedModCount != associatedMap.modCount) {
                throw new ConcurrentModificationException();
            } 
        } 
 
        public E next() { 
            // BEGIN android-changed 
            // inline checkConcurrentMod() 
            if (expectedModCount != associatedMap.modCount) {
                throw new ConcurrentModificationException();
            } 
            if (!hasNext()) { 
                throw new NoSuchElementException();
            } 
 
            Entry<VT> result;
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
                throw new NoSuchElementException();
            @SuppressWarnings("unchecked") E result = (E) elements[cursor];
            // This check doesn't catch all possible comodifications, 
            // but does catch the ones that corrupt traversal 
            if (tail != fence || result == null)
                throw new ConcurrentModificationException();
            lastRet = cursor;
            cursor = (cursor + 1) & (elements.length - 1);
            return result;
        } 
 
        @Override 
        public void remove() { 
            if (lastRet < 0)
                throw new IllegalStateException();
            if (delete(lastRet)) { // if left-shifted, undo increment in next()
                cursor = (cursor - 1) & (elements.length - 1);
                fence = tail;
            } 
            lastRet = -1;
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
     * Returns the next table row. 
     * @see prefuse.util.collections.LiteralIterator#nextInt() 
     */ 
    public int nextInt() { 
        if ( m_modCount != m_table.getModificationCount() )
            throw new ConcurrentModificationException();
        m_cur = m_rows.nextInt();
        return m_cur;
    } 
 
    /** 
     * @see java.util.Iterator#hasNext() 
     */ 
    public boolean hasNext() { 
        return m_rows.hasNext();
    } 
 
    /** 
     * Remove the current row, deleting it from the table. 
     * @see java.util.Iterator#remove() 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
            return valid;
        } 
 
        public E next() { 
            if (modCount != expectedModCount) {
                throw new ConcurrentModificationException();
            } 
 
            int i = index;
            if (i >= size) {
                throw new NoSuchElementException();
            } 
 
            if (i >= data.length) {
                throw new ConcurrentModificationException();
            } 
 
            index = i + 1;
            return (E) data[lastRet = i];
        } 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
        final Entry nextEntry() { 
            if (!hasNext()) 
                throw new NoSuchElementException();
            if (modCount != expectedModCount)
                throw new ConcurrentModificationException();
            lastReturned = next;
            next = reverse ? predecessor(next) : successor(next);
            /// XXX DEBUG 
            if ( lastReturned == NIL ) {
                System.err.println("Encountered NIL in iteration!");
            } 
            return lastReturned;
        } 
 
        public Object next() {
            return nextEntry(); 
        } 
 
        public void remove() { 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
     * 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();
            _hash.removeAt(_index);
        } 
        finally { 
            _hash.reenableAutoCompaction( false );
        } 
 
        _expectedSize--;
    } 
 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
     * 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();
            _hash.removeAt( _index );
        } 
        finally { 
            _hash.reenableAutoCompaction( false );
        } 
 
        _expectedSize--;
    } 
 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Java 8 ConcurrentModificationException Methods: