@Test public void testLockUpgradeAttempt() { DebugList<String> list = new DebugList<>(); list.getReadWriteLock().readLock().lock(); try { list.getReadWriteLock().writeLock().lock(); } catch( IllegalStateException ex ) { assertEquals( "DebugList detected an attempt to acquire a writeLock from " + "a thread already owning a readLock (deadlock)", ex.getMessage() ); } }
@Override public ReadWriteLock getReadWriteLock() { return delegate.getReadWriteLock(); }
DebugList extends AbstractEventList<E> { @Override public ReadWriteLock getReadWriteLock() { return delegate.getReadWriteLock(); } }
DebugList extends AbstractEventList<E> { @Override public ReadWriteLock getReadWriteLock() { return delegate.getReadWriteLock(); } DebugList(); private  DebugList(ListEventPublisher publisher, DebugReadWriteLock debugReadWriteLock); }
DebugList extends AbstractEventList<E> { @Override public ReadWriteLock getReadWriteLock() { return delegate.getReadWriteLock(); } DebugList(); private  DebugList(ListEventPublisher publisher, DebugReadWriteLock debugReadWriteLock); boolean isLockCheckingEnabled(); void setLockCheckingEnabled(boolean lockCheckingEnabled); Set<Thread> getSanctionedReaderThreads(); Set<Thread> getSanctionedWriterThreads(); DebugList<E> createNewDebugList(); @Override ReadWriteLock getReadWriteLock(); @Override ListEventPublisher getPublisher(); @Override E get(int index); @Override int size(); @Override boolean contains(Object object); @Override boolean containsAll(Collection<?> collection); @Override boolean equals(Object object); @Override int hashCode(); @Override int indexOf(Object object); @Override int lastIndexOf(Object object); @Override boolean isEmpty(); @Override void forEach(Consumer<? super E> action); @Override Object[] toArray(); @Override T[] toArray(T[] array); @Override String toString(); @Override boolean add(E value); @Override boolean remove(Object toRemove); @Override boolean removeIf(Predicate<? super E> filter); @Override boolean addAll(Collection<? extends E> values); @Override boolean addAll(int index, Collection<? extends E> values); @Override boolean removeAll(Collection<?> values); @Override boolean retainAll(Collection<?> values); @Override void replaceAll(UnaryOperator<E> operator); @Override void sort(Comparator<? super E> c); @Override void clear(); @Override E set(int index, E value); @Override void add(int index, E value); @Override E remove(int index); @Override void dispose(); }
DebugList extends AbstractEventList<E> { @Override public ReadWriteLock getReadWriteLock() { return delegate.getReadWriteLock(); } DebugList(); private  DebugList(ListEventPublisher publisher, DebugReadWriteLock debugReadWriteLock); boolean isLockCheckingEnabled(); void setLockCheckingEnabled(boolean lockCheckingEnabled); Set<Thread> getSanctionedReaderThreads(); Set<Thread> getSanctionedWriterThreads(); DebugList<E> createNewDebugList(); @Override ReadWriteLock getReadWriteLock(); @Override ListEventPublisher getPublisher(); @Override E get(int index); @Override int size(); @Override boolean contains(Object object); @Override boolean containsAll(Collection<?> collection); @Override boolean equals(Object object); @Override int hashCode(); @Override int indexOf(Object object); @Override int lastIndexOf(Object object); @Override boolean isEmpty(); @Override void forEach(Consumer<? super E> action); @Override Object[] toArray(); @Override T[] toArray(T[] array); @Override String toString(); @Override boolean add(E value); @Override boolean remove(Object toRemove); @Override boolean removeIf(Predicate<? super E> filter); @Override boolean addAll(Collection<? extends E> values); @Override boolean addAll(int index, Collection<? extends E> values); @Override boolean removeAll(Collection<?> values); @Override boolean retainAll(Collection<?> values); @Override void replaceAll(UnaryOperator<E> operator); @Override void sort(Comparator<? super E> c); @Override void clear(); @Override E set(int index, E value); @Override void add(int index, E value); @Override E remove(int index); @Override void dispose();  }