Remove yang-test
[controller.git] / opendaylight / config / config-manager / src / main / java / org / opendaylight / controller / config / manager / impl / osgi / mapping / BindingContextProvider.java
index 8fc0da046843ab36c31f9f78f2798dd031f8ca5d..6cf831510bf086ba9faba27c7f5441019ee94824 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013 Cisco Systems, Inc. and others.  All rights reserved.
+ * Copyright (c) 2013, 2017 Cisco Systems, 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,
@@ -8,30 +8,33 @@
 package org.opendaylight.controller.config.manager.impl.osgi.mapping;
 
 import com.google.common.base.Preconditions;
-import org.opendaylight.yangtools.sal.binding.generator.api.ClassLoadingStrategy;
-import org.opendaylight.yangtools.sal.binding.generator.util.BindingRuntimeContext;
+import org.opendaylight.mdsal.binding.generator.api.ClassLoadingStrategy;
+import org.opendaylight.mdsal.binding.generator.util.BindingRuntimeContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaContextProvider;
 
 /**
- * Creates and initializes {@link BindingRuntimeContext}, which is used to resolve Identity classes from QName.
- * An instance of {@link BindingRuntimeContext} is available only after first schema context was successfully built.
+ * Creates and initializes {@link BindingRuntimeContext}, which is used to
+ * resolve Identity classes from QName. An instance of
+ * {@link BindingRuntimeContext} is available only after first schema context
+ * was successfully built.
  */
 // TODO move to yang runtime
 public class BindingContextProvider implements AutoCloseable {
 
     private BindingRuntimeContext current;
 
-    public synchronized void update(final ClassLoadingStrategy classLoadingStrategy, final SchemaContextProvider ctxProvider) {
+    public synchronized void update(final ClassLoadingStrategy classLoadingStrategy,
+            final SchemaContextProvider ctxProvider) {
         this.current = BindingRuntimeContext.create(classLoadingStrategy, ctxProvider.getSchemaContext());
     }
 
     public synchronized BindingRuntimeContext getBindingContext() {
-        Preconditions.checkState(current != null, "Binding context not yet initialized");
+        Preconditions.checkState(this.current != null, "Binding context not yet initialized");
         return this.current;
     }
 
     @Override
     public synchronized void close() throws Exception {
-        current = null;
+        this.current = null;
     }
 }