import java.util.concurrent.atomic.AtomicReference;
import org.junit.Test;
import org.opendaylight.controller.md.sal.binding.test.AbstractSchemaAwareTest;
+import org.opendaylight.mdsal.binding.dom.codec.gen.impl.DataObjectSerializerGenerator;
+import org.opendaylight.mdsal.binding.dom.codec.gen.impl.StreamWriterGenerator;
+import org.opendaylight.mdsal.binding.dom.codec.impl.BindingNormalizedNodeCodecRegistry;
import org.opendaylight.mdsal.binding.generator.impl.GeneratedClassLoadingStrategy;
import org.opendaylight.mdsal.binding.generator.util.JavassistUtils;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.TreeComplexUsesAugment;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.Top;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList;
import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelListKey;
-import org.opendaylight.yangtools.binding.data.codec.gen.impl.DataObjectSerializerGenerator;
-import org.opendaylight.yangtools.binding.data.codec.gen.impl.StreamWriterGenerator;
-import org.opendaylight.yangtools.binding.data.codec.impl.BindingNormalizedNodeCodecRegistry;
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
final CountDownLatch done = new CountDownLatch(1);
final AtomicReference<YangInstanceIdentifier> yangId = new AtomicReference<>();
final AtomicReference<RuntimeException> error = new AtomicReference<>();
- new Thread() {
- @Override
- public void run() {
- try {
- yangId.set(BindingNormalizedCodecTest.this.codec.toYangInstanceIdentifierBlocking(BA_TOP_LEVEL_LIST));
- } catch(final RuntimeException e) {
- error.set(e);
- } finally {
- done.countDown();
- }
+ new Thread(() -> {
+ try {
+ yangId.set(BindingNormalizedCodecTest.this.codec.toYangInstanceIdentifierBlocking(BA_TOP_LEVEL_LIST));
+ } catch(final RuntimeException e) {
+ error.set(e);
+ } finally {
+ done.countDown();
}
- }.start();
+ }).start();
Uninterruptibles.sleepUninterruptibly(500, TimeUnit.MILLISECONDS);
this.codec.onGlobalContextUpdated(this.context);
final CountDownLatch done = new CountDownLatch(1);
final AtomicReference<ImmutableBiMap<Method, SchemaPath>> retMap = new AtomicReference<>();
final AtomicReference<RuntimeException> error = new AtomicReference<>();
- new Thread() {
- @Override
- public void run() {
- try {
- retMap.set(BindingNormalizedCodecTest.this.codec.getRpcMethodToSchemaPath(OpendaylightTestRpcServiceService.class));
- } catch(final RuntimeException e) {
- error.set(e);
- } finally {
- done.countDown();
- }
+ new Thread(() -> {
+ try {
+ retMap.set(BindingNormalizedCodecTest.this.codec.getRpcMethodToSchemaPath(OpendaylightTestRpcServiceService.class));
+ } catch(final RuntimeException e) {
+ error.set(e);
+ } finally {
+ done.countDown();
}
- }.start();
+ }).start();
Uninterruptibles.sleepUninterruptibly(500, TimeUnit.MILLISECONDS);
this.codec.onGlobalContextUpdated(this.context);