mirror of
https://github.com/google/nomulus.git
synced 2025-07-25 20:18:34 +02:00
Mark actualCustomStringRepresentation() as @ForOverride.
The intention (from []is: - actualAsString() is the method that people call. - actualCustomStringRepresentation() is the method that people override. Fortunately, no one actually calls actualCustomStringRepresentation(), aside from some tests that call it to test a subject's implementation. That's easy enough to work around by extracting a method. (Arguably @ForOverride should permit calls from tests in some cases (now that Error Prone knows how to identify test code). But it's not entirely clear, since, e.g., people shouldn't be testing Converter.doForward(null) because the method can never be invoked that way. Some discussion here: []Tested: global TAP [] RELNOTES=Marked `actualCustomStringRepresentation()` as `@ForOverride`. To retrieve the string representation, call `actualAsString()`. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=185672328
This commit is contained in:
parent
b0cbc0f60d
commit
220f7589f5
2 changed files with 2 additions and 2 deletions
|
@ -53,7 +53,7 @@ abstract class AbstractEppResourceSubject
|
|||
}
|
||||
|
||||
@Override
|
||||
public String actualCustomStringRepresentation() {
|
||||
protected String actualCustomStringRepresentation() {
|
||||
return String.format(
|
||||
"%s with foreign key '%s'",
|
||||
actual().getClass().getSimpleName(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue