APISonar


java.util.ConcurrentModificationException.ConcurrentModificationException

> java > util > ConcurrentModificationException > ConcurrentModificationException
java APIs util APIs ConcurrentModificationException APIs ConcurrentModificationException APIs

Example 1
void checkValid() {
		if (invalid) {
			throw new ConcurrentModificationException();
		}
	}
Example 2
protected void checkForComod() throws ConcurrentModificationException {
        if(_modCount != _list._modCount) {
            throw new ConcurrentModificationException();
        }
    }
Example 3
public static ConcurrentModificationException
            newConcurrentModificationException(String message) {
        return new ConcurrentModificationException(formatMessage(0, message));
    }
Example 4
private void assertNoConcurrentModification() {
        if (iterating) {
            throw new ConcurrentModificationException();
        }
    }
Example 5
private void validateIteratorState( long iteratorModCount )
    {
        if ( iteratorModCount != modCount )
        {
            throw new ConcurrentModificationException();
        }
    }
Example 6
public void test_ConstructorLjava_lang_String() {
        // Test for method
        // java.util.ConcurrentModificationException(java.lang.String)
        String errorMessage = "This is an error message";
        try {
            // This is here to stop "unreachable code" unresolved problem
            if (true)
                throw new ConcurrentModificationException(errorMessage);
        } catch (ConcurrentModificationException e) {
            assertTrue("Exception thrown without error message", e.getMessage()
                    .equals(errorMessage));
            return;
        }
        fail("Failed to throw expected ConcurrentModificationException");
    }
Example 7
public boolean hasNext() {
        if (histogram.getTotalCount() != savedHistogramTotalRawCount) {
            throw new ConcurrentModificationException();
        }
        return (totalCountToCurrentIndex < arrayTotalCount);
    }
Example 8
private static <T> T rand(Collection<? extends T> c) {
        if (c == null)
            throw new IllegalArgumentException();

        int n = ThreadLocalRandom.current().nextInt(c.size());

        int i = 0;

        for (T t : c) {
            if (i++ == n)
                return t;
        }

        throw new ConcurrentModificationException();
    }
Example 9
private static void policyError(String message)
    {
        throw new ConcurrentModificationException(message) ;
    }
Example 10
private void checkDeleted() {
		if (invalid) {
			throw new ConcurrentModificationException("AddressSetPropertyMap has been deleted.");
		}
	}
Example 11
public void remove() {
        // TODO Auto-generated method stub
        throw new ConcurrentModificationException();
    }
Example 12
public Resource next() {
		if (cursor >= resources.size()) {
			throw new ConcurrentModificationException();
		}
		this.cursor++;
		return this;
	}
Example 13
public int getNumberOfConcurrentModificationExceptionsInLog(
      String[] excludeExpList) throws IOException {
    return getNumberOfExceptionsInLog(new ConcurrentModificationException(),
        excludeExpList);
  }
Example 14
public Node next() {
        if (expectedModCount != node.usageModCount()) {
            throw new ConcurrentModificationException();
        }
        return super.next();
    }
Example 15
public void testBitmapFactoryThrowsAnException() {
    whenBitmapFactoryDecodeStream()
        .thenAnswer(mBitmapFactoryDefaultAnswer)
        .thenThrow(new ConcurrentModificationException());
    try {
      mArtDecoder.decodeFromEncodedImage(mEncodedImage, DEFAULT_BITMAP_CONFIG, null);
    } finally {
      verify(mBitmapPool).release(mBitmap);
    }
  }
Example 16
protected void checkState() {
    if (state != sc.getState()) {
      throw new ConcurrentModificationException("Scene changed for Hierarchy!");
    }
  }
Example 17
public int nextInt() {
        if ( m_modCount != m_table.getModificationCount() )
            throw new ConcurrentModificationException();
        m_cur = m_rows.nextInt();
        return m_cur;
    }
Example 18
@Override public boolean hasNext() {
        boolean hasNext = delegate.hasNext();

        if (!hasNext ^ expCnt == 0)
            throw new ConcurrentModificationException(eMsg);

        return hasNext;
    }
Example 19
public void checkAccessingFromOwnerThread() {
        if (owner != Thread.currentThread()) {
            throw new ConcurrentModificationException(hh.h().toIdentityString() +
                    ": Context shouldn't be accessed from multiple threads");
        }
    }
Example 20
public void test_messageAndCause() {
        Throwable cause = new Throwable("cause msg");
        assertMessageAndCause(null, null, new ConcurrentModificationException());
        assertMessageAndCause("msg", null, new ConcurrentModificationException("msg"));
        assertMessageAndCause("msg", cause, new ConcurrentModificationException("msg", cause));
        assertMessageAndCause("msg", null, new ConcurrentModificationException("msg", null));
        assertMessageAndCause(null, null, new ConcurrentModificationException((Throwable) null));
        // cause.toString() is something like "java.lang.Throwable: cause msg"
        assertMessageAndCause(cause.toString(), cause, new ConcurrentModificationException(cause));
    }
Example 21
private synchronized void checkConsumer() {
    if (currentConsumer != null) {
      throw new ConcurrentModificationException("The "+
          currentConsumer.getName() +" thread is consuming the queue.");
    }
  }
Example 22
void checkForComodification() {
        if (rootModCount != rootTokenList.modCount())
            throw new ConcurrentModificationException(
                    "Caller uses obsolete TokenSequenceList: expectedModCount=" + rootModCount + // NOI18N
                    " != modCount=" + rootTokenList.modCount()
            );
    }
Example 23
public Iterator<T> iterator() {
        if (inUse) {
            throw new ConcurrentModificationException();
        }

        inUse = true;
        return Iterators.unmodifiableIterator(this);
    }
Example 24
public final Object[] pollAll() {
        final int size = size();
        Object[] a = new Object[size];
        for (int i = 0; i < size; i ++) {
            E product = poll();
            if (product == null) {
                throw new ConcurrentModificationException();
            }
            a[i] = product;
        }
        return a;
    }
Example 25
private void checkModCount(int match) {
        if (modCnt != match)
            throw new ConcurrentModificationException("Mod count mismatch [expected=" + match +
                ", actual=" + modCnt + ']');

        modCnt++;
    }