@Test(expected = AssertionError.class) public void removing_null_filter_from_chain() throws Exception { m_chain.remove_filter(null); }
public synchronized void remove_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_true(m_filters.contains(f)); int idx = m_filters.indexOf(f); EventFilter prev = null; if (idx != (m_filters.size() - 1)) { prev = m_filters.get(idx + 1); } if (prev != null) { prev.unlock(m_filters); prev.connect(null); prev.connect(f.connected()); prev.lock(m_filters); } f.unlock(m_filters); f.connect(null); m_filters.remove(f); }
EventFilterChain implements EventSink { public synchronized void remove_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_true(m_filters.contains(f)); int idx = m_filters.indexOf(f); EventFilter prev = null; if (idx != (m_filters.size() - 1)) { prev = m_filters.get(idx + 1); } if (prev != null) { prev.unlock(m_filters); prev.connect(null); prev.connect(f.connected()); prev.lock(m_filters); } f.unlock(m_filters); f.connect(null); m_filters.remove(f); } }
EventFilterChain implements EventSink { public synchronized void remove_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_true(m_filters.contains(f)); int idx = m_filters.indexOf(f); EventFilter prev = null; if (idx != (m_filters.size() - 1)) { prev = m_filters.get(idx + 1); } if (prev != null) { prev.unlock(m_filters); prev.connect(null); prev.connect(f.connected()); prev.lock(m_filters); } f.unlock(m_filters); f.connect(null); m_filters.remove(f); } EventFilterChain(EventSink sink); }
EventFilterChain implements EventSink { public synchronized void remove_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_true(m_filters.contains(f)); int idx = m_filters.indexOf(f); EventFilter prev = null; if (idx != (m_filters.size() - 1)) { prev = m_filters.get(idx + 1); } if (prev != null) { prev.unlock(m_filters); prev.connect(null); prev.connect(f.connected()); prev.lock(m_filters); } f.unlock(m_filters); f.connect(null); m_filters.remove(f); } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchronized void add_filter(EventFilter f); synchronized void remove_filter(EventFilter f); synchronized void clear(); @Override synchronized void sink(BusData data); synchronized EventFilterChainInfo info(); }
EventFilterChain implements EventSink { public synchronized void remove_filter(EventFilter f) { Ensure.not_null(f); Ensure.is_true(m_filters.contains(f)); int idx = m_filters.indexOf(f); EventFilter prev = null; if (idx != (m_filters.size() - 1)) { prev = m_filters.get(idx + 1); } if (prev != null) { prev.unlock(m_filters); prev.connect(null); prev.connect(f.connected()); prev.lock(m_filters); } f.unlock(m_filters); f.connect(null); m_filters.remove(f); } EventFilterChain(EventSink sink); synchronized EventSink chain_sink(); synchronized List<EventFilter> filters(); synchronized void add_filter(EventFilter f); synchronized void remove_filter(EventFilter f); synchronized void clear(); @Override synchronized void sink(BusData data); synchronized EventFilterChainInfo info();  }