Remove deprecated SchemaRepository.createSchemaContextFactory()
[yangtools.git] / yang / yang-model-util / src / main / java / org / opendaylight / yangtools / yang / model / repo / util / AbstractSchemaRepository.java
index e02ac79b5b786f803216e5925d673c791932dda6..3c3b4ab222e2bbd0a77a5465f23c6690574ed454 100644 (file)
@@ -25,12 +25,11 @@ import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
-import javax.annotation.Nonnull;
 import javax.annotation.concurrent.GuardedBy;
 import org.opendaylight.yangtools.yang.model.repo.api.MissingSchemaSourceException;
 import org.opendaylight.yangtools.yang.model.repo.api.SchemaRepository;
-import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceFilter;
 import org.opendaylight.yangtools.yang.model.repo.api.SchemaSourceRepresentation;
 import org.opendaylight.yangtools.yang.model.repo.api.SourceIdentifier;
 import org.opendaylight.yangtools.yang.model.repo.spi.PotentialSchemaSource;
@@ -43,9 +42,8 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Abstract base class for {@link SchemaRepository} implementations. It handles registration
- * and lookup of schema sources, subclasses need only to provide their own
- * {@link #createSchemaContextFactory(SchemaSourceFilter)} implementation.
+ * Abstract base class for {@link SchemaRepository} implementations. It handles registration and lookup of schema
+ * sources, subclasses need only to provide their own {@link #createSchemaContextFactory()} implementation.
  */
 @Beta
 public abstract class AbstractSchemaRepository implements SchemaRepository, SchemaSourceRegistry {
@@ -63,7 +61,7 @@ public abstract class AbstractSchemaRepository implements SchemaRepository, Sche
      * Schema source listeners.
      */
     @GuardedBy("this")
-    private final Collection<SchemaListenerRegistration> listeners = new ArrayList<>();
+    private final List<SchemaListenerRegistration> listeners = new ArrayList<>();
 
     @SuppressWarnings("unchecked")
     private static <T extends SchemaSourceRepresentation> ListenableFuture<T> fetchSource(
@@ -83,8 +81,8 @@ public abstract class AbstractSchemaRepository implements SchemaRepository, Sche
     }
 
     @Override
-    public <T extends SchemaSourceRepresentation> ListenableFuture<T> getSchemaSource(
-            @Nonnull final SourceIdentifier id, @Nonnull final Class<T> representation) {
+    public <T extends SchemaSourceRepresentation> ListenableFuture<T> getSchemaSource(final SourceIdentifier id,
+            final Class<T> representation) {
         final ArrayList<AbstractSchemaSourceRegistration<?>> sortedSchemaSourceRegistrations;
 
         synchronized (this) {
@@ -119,7 +117,7 @@ public abstract class AbstractSchemaRepository implements SchemaRepository, Sche
 
             @Override
             @SuppressWarnings("checkstyle:parameterName")
-            public void onFailure(@Nonnull final Throwable t) {
+            public void onFailure(final Throwable t) {
                 LOG.trace("Skipping notification for encountered source {}, fetching source failed", id, t);
             }
         }, MoreExecutors.directExecutor());