BUG-2283 Fix close order when reconfiguring config modules.
[controller.git] / opendaylight / config / yang-test / src / main / java / org / opendaylight / controller / config / yang / test / impl / NetconfTestImplModuleStub.txt
index 4b5b78f70a5602232a4ad4b6dc46d9c6319b2076..7e155e05c71ee5e8eb9c0507733c1da6c41b0683 100644 (file)
@@ -1 +1,7 @@
-        return org.opendaylight.controller.config.yang.test.util.NetconfTestImplModuleUtil.registerRuntimeBeans(this);
+        final AutoCloseable runtime = org.opendaylight.controller.config.yang.test.util.NetconfTestImplModuleUtil.registerRuntimeBeans(this);
+        return new org.opendaylight.controller.config.yang.test.impl.CheckedAutoCloseable() {
+            @Override
+            public synchronized void close() throws Exception {
+                runtime.close();
+            }
+        };
\ No newline at end of file