alshabib

Merge branch 'master' of ssh://gerrit.onlab.us:29418/onos-next

...@@ -4,6 +4,8 @@ import org.onlab.onos.event.AbstractEvent; ...@@ -4,6 +4,8 @@ import org.onlab.onos.event.AbstractEvent;
4 import org.onlab.onos.net.Device; 4 import org.onlab.onos.net.Device;
5 import org.onlab.onos.net.Port; 5 import org.onlab.onos.net.Port;
6 6
7 +import static com.google.common.base.MoreObjects.toStringHelper;
8 +
7 /** 9 /**
8 * Describes infrastructure device event. 10 * Describes infrastructure device event.
9 */ 11 */
...@@ -109,4 +111,12 @@ public class DeviceEvent extends AbstractEvent<DeviceEvent.Type, Device> { ...@@ -109,4 +111,12 @@ public class DeviceEvent extends AbstractEvent<DeviceEvent.Type, Device> {
109 return port; 111 return port;
110 } 112 }
111 113
114 + @Override
115 + public String toString() {
116 + if (port == null) {
117 + return super.toString();
118 + }
119 + return toStringHelper(this).add("time", time()).add("type", type())
120 + .add("subject", subject()).add("port", port).toString();
121 + }
112 } 122 }
......