Yuta HIGUCHI
Committed by Ray Milkey

Simplify ConnectPoint#toString format

for ease of reading logs.

Change-Id: I981cf877eb53f64e77fdef48bca30625942bc8f2
......@@ -15,8 +15,6 @@
*/
package org.onosproject.net;
import com.google.common.base.MoreObjects;
import java.util.Objects;
import static com.google.common.base.Preconditions.checkArgument;
......@@ -166,10 +164,7 @@ public class ConnectPoint {
@Override
public String toString() {
return MoreObjects.toStringHelper(this)
.add("elementId", elementId)
.add("portNumber", portNumber)
.toString();
return elementId + "/" + portNumber;
}
}
......
......@@ -123,7 +123,7 @@ public class LinkKeyTest {
LinkKey k1 = LinkKey.linkKey(SRC1, DST1);
String k1String = k1.toString();
assertThat(k1String, allOf(containsString("LinkKey{"),
containsString("src=ConnectPoint{elementId=1, portNumber=1}"),
containsString("dst=ConnectPoint{elementId=2, portNumber=1}")));
containsString("src=1/1"),
containsString("dst=2/1}")));
}
}
......