AccountInfo: Implement toString
This makes the output in debug logs and stack traces easier to read. Change-Id: Ia463a5389b98962b5da8f749f29ec444b29b2736
This commit is contained in:
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
package com.google.gerrit.extensions.common;
|
package com.google.gerrit.extensions.common;
|
||||||
|
|
||||||
|
import com.google.common.base.MoreObjects;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
@@ -54,6 +55,16 @@ public class AccountInfo {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return MoreObjects.toStringHelper(this)
|
||||||
|
.add("id", _accountId)
|
||||||
|
.add("name", name)
|
||||||
|
.add("email", email)
|
||||||
|
.add("username", username)
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(
|
return Objects.hash(
|
||||||
|
|||||||
Reference in New Issue
Block a user