Remove deprecated MD-SAL APIs
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / test / java / org / opendaylight / controller / md / sal / binding / test / SchemaContextSingleton.java
diff --git a/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/test/SchemaContextSingleton.java b/opendaylight/md-sal/sal-binding-broker/src/test/java/org/opendaylight/controller/md/sal/binding/test/SchemaContextSingleton.java
deleted file mode 100644 (file)
index 06763bc..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (c) 2016 Red Hat, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.md.sal.binding.test;
-
-import org.opendaylight.yangtools.yang.model.api.SchemaContext;
-
-/**
- * {@link SchemaContext} singleton holder (static).
- *
- * <p>This is useful in scenarios such as unit tests, but not OSGi environments,
- * where there is a flat classpath and thus really only one single
- * SchemaContext.
- *
- * @author Michael Vorburger
- * @deprecated This class should not be used, as it pollutes the classpath.
- */
-@Deprecated
-public final class SchemaContextSingleton {
-
-    private static SchemaContext staticSchemaContext;
-
-    public static synchronized SchemaContext getSchemaContext(final Supplier<SchemaContext> supplier) throws Exception {
-        if (staticSchemaContext == null) {
-            staticSchemaContext = supplier.get();
-        }
-        return staticSchemaContext;
-    }
-
-    private SchemaContextSingleton() {
-
-    }
-
-    @FunctionalInterface
-    public interface Supplier<T> {
-        T get() throws Exception;
-    }
-}