Add Change#toString(), after all these years
Change-Id: I1540070212dd4ba494db624d98c00297798da2ae
This commit is contained in:
@@ -598,4 +598,14 @@ public final class Change {
|
|||||||
public void setTopic(String topic) {
|
public void setTopic(String topic) {
|
||||||
this.topic = topic;
|
this.topic = topic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new StringBuilder(getClass().getSimpleName())
|
||||||
|
.append('{').append(changeId)
|
||||||
|
.append(" (").append(changeKey).append("), ")
|
||||||
|
.append("dest=").append(dest).append(", ")
|
||||||
|
.append("status=").append(status).append('}')
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -656,7 +656,13 @@ public class ChangeData {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return MoreObjects.toStringHelper(this).addValue(getId()).toString();
|
MoreObjects.ToStringHelper h = MoreObjects.toStringHelper(this);
|
||||||
|
if (change != null) {
|
||||||
|
h.addValue(change);
|
||||||
|
} else {
|
||||||
|
h.addValue(legacyId);
|
||||||
|
}
|
||||||
|
return h.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class ChangedLines {
|
public static class ChangedLines {
|
||||||
|
|||||||
Reference in New Issue
Block a user