mirror of
https://github.com/google/nomulus
synced 2026-01-03 19:54:18 +00:00
Remove toString() method on Result.Code and fix metrics recording
We almost certainly had intended to record a String representation of the numeric Code all along, but a bad toString() method on the enum resulted in the wrong thing happening. This is more evidence of why overriding toString() on enums is bad. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=133583683
This commit is contained in:
@@ -150,11 +150,6 @@ public class Result extends ImmutableObject {
|
||||
public boolean isSuccess() {
|
||||
return code < 2000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("{code:'%s', msg:'%s', msgLang:'%s'}", code, msg, msgLang);
|
||||
}
|
||||
}
|
||||
|
||||
/** The result code for this result. This is always present. */
|
||||
|
||||
Reference in New Issue
Block a user