Sho SHIMIZU
Committed by Gerrit Code Review

Remove API deprecated in Falcon

Change-Id: Ie73d2fcbb79342e1808f78d9c0e75d6ebc540207
......@@ -53,32 +53,6 @@ public class DefaultDriver implements Driver {
* Creates a driver with the specified name.
*
* @param name driver name
* @param parent optional parent driver
* @param manufacturer device manufacturer
* @param hwVersion device hardware version
* @param swVersion device software version
* @param behaviours device behaviour classes
* @param properties properties for configuration of device behaviour classes
* @deprecated 1.5.0 Falcon Release
*/
@Deprecated
public DefaultDriver(String name, Driver parent, String manufacturer,
String hwVersion, String swVersion,
Map<Class<? extends Behaviour>, Class<? extends Behaviour>> behaviours,
Map<String, String> properties) {
this.name = checkNotNull(name, "Name cannot be null");
this.parents = parent == null ? null : Lists.newArrayList(parent);
this.manufacturer = checkNotNull(manufacturer, "Manufacturer cannot be null");
this.hwVersion = checkNotNull(hwVersion, "HW version cannot be null");
this.swVersion = checkNotNull(swVersion, "SW version cannot be null");
this.behaviours = copyOf(checkNotNull(behaviours, "Behaviours cannot be null"));
this.properties = copyOf(checkNotNull(properties, "Properties cannot be null"));
}
/**
* Creates a driver with the specified name.
*
* @param name driver name
* @param parents optional parent drivers
* @param manufacturer device manufacturer
* @param hwVersion device hardware version
......
......@@ -15,6 +15,7 @@
*/
package org.onosproject.net.driver;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import org.junit.Test;
......@@ -35,7 +36,7 @@ public class DefaultDriverTest {
TestBehaviourTwoImpl.class),
ImmutableMap.of("foo", "bar"));
DefaultDriver ddc = new DefaultDriver("foo.bar", ddp, "Circus", "lux", "1.2a",
DefaultDriver ddc = new DefaultDriver("foo.bar", ImmutableList.of(ddp), "Circus", "lux", "1.2a",
ImmutableMap.of(),
ImmutableMap.of("foo", "bar"));
assertEquals("incorrect name", "foo.bar", ddc.name());
......@@ -88,4 +89,4 @@ public class DefaultDriverTest {
assertTrue("incorrect toString", ddc.toString().contains("Circus"));
}
}
\ No newline at end of file
}
......
......@@ -19,6 +19,7 @@ package org.onosproject.codec.impl;
import java.util.ArrayList;
import java.util.Map;
import com.google.common.collect.ImmutableList;
import org.junit.Test;
import org.onosproject.net.driver.Behaviour;
import org.onosproject.net.driver.DefaultDriver;
......@@ -53,7 +54,7 @@ public class DriverCodecTest {
"HW1.2.3", "SW1.2.3",
behaviours,
properties);
DefaultDriver child = new DefaultDriver("child", parent, "Acme",
DefaultDriver child = new DefaultDriver("child", ImmutableList.of(parent), "Acme",
"HW1.2.3.1", "SW1.2.3.1",
behaviours,
properties);
......