Eliminate XtendHelper and SchemaLock 53/68553/3
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 23 Feb 2018 15:43:04 +0000 (16:43 +0100)
committerRobert Varga <nite@hq.sk>
Sun, 25 Feb 2018 18:48:49 +0000 (18:48 +0000)
These classes are not used anywhere, eliminate them.

Change-Id: If3e726219b8a5e62a2138a3d98bc1ebd7d86a405
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/mdsal/binding/generator/impl/SchemaLock.java [deleted file]
binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/mdsal/binding/generator/util/XtendHelper.java [deleted file]
binding/mdsal-binding-generator-impl/src/test/java/org/opendaylight/mdsal/binding/generator/util/XtendHelperTest.java [deleted file]

diff --git a/binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/mdsal/binding/generator/impl/SchemaLock.java b/binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/mdsal/binding/generator/impl/SchemaLock.java
deleted file mode 100644 (file)
index 4998b92..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * Copyright (c) 2014 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,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.mdsal.binding.generator.impl;
-
-interface SchemaLock {
-    void waitForSchema(Class<?> cls);
-}
diff --git a/binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/mdsal/binding/generator/util/XtendHelper.java b/binding/mdsal-binding-generator-impl/src/main/java/org/opendaylight/mdsal/binding/generator/util/XtendHelper.java
deleted file mode 100644 (file)
index 4e21834..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (c) 2014 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,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.mdsal.binding.generator.util;
-
-import java.util.List;
-import org.opendaylight.yangtools.yang.model.api.TypeDefinition;
-import org.opendaylight.yangtools.yang.model.api.type.UnionTypeDefinition;
-
-public final class XtendHelper {
-    private XtendHelper() {
-        throw new UnsupportedOperationException("Utility class should not be instantiated");
-    }
-
-    @SuppressWarnings({"rawtypes","unchecked"})
-    public static Iterable<TypeDefinition> getTypes(final UnionTypeDefinition definition) {
-        return (List) definition.getTypes();
-    }
-}
diff --git a/binding/mdsal-binding-generator-impl/src/test/java/org/opendaylight/mdsal/binding/generator/util/XtendHelperTest.java b/binding/mdsal-binding-generator-impl/src/test/java/org/opendaylight/mdsal/binding/generator/util/XtendHelperTest.java
deleted file mode 100644 (file)
index b49f7b0..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (c) 2016 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,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.mdsal.binding.generator.util;
-
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import org.junit.Test;
-import org.opendaylight.yangtools.yang.model.api.type.UnionTypeDefinition;
-
-public class XtendHelperTest {
-
-    @Test
-    public void getTypesTest() throws Exception {
-        final UnionTypeDefinition unionTypeDefinition = mock(UnionTypeDefinition.class);
-        doReturn(null).when(unionTypeDefinition).getTypes();
-        XtendHelper.getTypes(unionTypeDefinition);
-        verify(unionTypeDefinition).getTypes();
-    }
-
-    @Test(expected = UnsupportedOperationException.class)
-    public void privateConstructTest() throws Throwable {
-        final Constructor<XtendHelper> constructor = XtendHelper.class.getDeclaredConstructor();
-        constructor.setAccessible(true);
-        try {
-            constructor.newInstance();
-        } catch (InvocationTargetException e) {
-            throw e.getCause();
-        }
-    }
-}
\ No newline at end of file