@Test @SuppressWarnings("unchecked") public void testRemove() throws Exception { OsgiServiceCollection collection = createCollection("(a=b)"); collection.startTracking(); ServiceRegistration registration = registry.registerService( Collection.class.getName(), new ArrayList<Object>(), new Hashtable(Collections.singletonMap("a", "b"))); assertThat(collection.isEmpty(), equalTo(false)); assertThat(collection.size(), equalTo(1)); registration.unregister(); assertThat(collection.isEmpty(), equalTo(true)); assertThat(collection.size(), equalTo(0)); }
@Override public boolean remove(Object o) { throw new UnsupportedOperationException(); }
OsgiServiceCollection implements Collection<E> { @Override public boolean remove(Object o) { throw new UnsupportedOperationException(); } }
OsgiServiceCollection implements Collection<E> { @Override public boolean remove(Object o) { throw new UnsupportedOperationException(); } OsgiServiceCollection(BundleContext bundleContext, String filter, ClassLoader fallbackClassLoader,
             OsgiProxyCreator proxyCreator);  OsgiServiceCollection(BundleContext bundleContext, String filter, ClassLoader fallbackClassLoader,
             OsgiProxyCreator proxyCreator, DynamicCollection<E> backed); }
OsgiServiceCollection implements Collection<E> { @Override public boolean remove(Object o) { throw new UnsupportedOperationException(); } OsgiServiceCollection(BundleContext bundleContext, String filter, ClassLoader fallbackClassLoader,
             OsgiProxyCreator proxyCreator);  OsgiServiceCollection(BundleContext bundleContext, String filter, ClassLoader fallbackClassLoader,
             OsgiProxyCreator proxyCreator, DynamicCollection<E> backed); void startTracking(); void stopTracking(); @Override Iterator<E> iterator(); @Override int size(); @Override String toString(); @Override boolean remove(Object o); @Override boolean removeAll(Collection c); @Override boolean add(Object o); @Override boolean addAll(Collection c); @Override void clear(); @Override boolean retainAll(Collection c); @Override boolean contains(Object o); @Override boolean containsAll(Collection c); @Override boolean isEmpty(); @Override Object[] toArray(); @SuppressWarnings("SuspiciousToArrayCall") @Override T[] toArray(T[] array); }
OsgiServiceCollection implements Collection<E> { @Override public boolean remove(Object o) { throw new UnsupportedOperationException(); } OsgiServiceCollection(BundleContext bundleContext, String filter, ClassLoader fallbackClassLoader,
             OsgiProxyCreator proxyCreator);  OsgiServiceCollection(BundleContext bundleContext, String filter, ClassLoader fallbackClassLoader,
             OsgiProxyCreator proxyCreator, DynamicCollection<E> backed); void startTracking(); void stopTracking(); @Override Iterator<E> iterator(); @Override int size(); @Override String toString(); @Override boolean remove(Object o); @Override boolean removeAll(Collection c); @Override boolean add(Object o); @Override boolean addAll(Collection c); @Override void clear(); @Override boolean retainAll(Collection c); @Override boolean contains(Object o); @Override boolean containsAll(Collection c); @Override boolean isEmpty(); @Override Object[] toArray(); @SuppressWarnings("SuspiciousToArrayCall") @Override T[] toArray(T[] array);  }