Enforce nonnegative costs for TLDs#3139
Conversation
CydeWeys
left a comment
There was a problem hiding this comment.
@CydeWeys made 1 comment.
Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion (waiting on gbrodman).
core/src/main/java/google/registry/tools/ConfigureTldCommand.java line 168 at r1 (raw file):
} // Enforce any builder restrictions, e.g. "no negative fees" newTld = newTld.asBuilder().build();
This is weird. It makes more sense to me to move all the verification to another method that you call here, and then call it from within the build() method as well.
gbrodman
left a comment
There was a problem hiding this comment.
@gbrodman made 1 comment.
Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion (waiting on CydeWeys).
core/src/main/java/google/registry/tools/ConfigureTldCommand.java line 168 at r1 (raw file):
Previously, CydeWeys (Ben McIlwain) wrote…
This is weird. It makes more sense to me to move all the verification to another method that you call here, and then call it from within the
build()method as well.
Done.
CydeWeys
left a comment
There was a problem hiding this comment.
@CydeWeys made 1 comment and resolved 1 discussion.
Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion (waiting on gbrodman).
core/src/main/java/google/registry/model/tld/Tld.java line 817 at r2 (raw file):
} public void validateState() {
Worth adding a short Javadoc here, as this is a public method. (And also this is different from other ImmutableObjects.)
Note: we remove the checks in the setters because we check them all in the build method instead (and the setters are only called in tests).
gbrodman
left a comment
There was a problem hiding this comment.
@gbrodman made 1 comment.
Reviewable status: 0 of 6 files reviewed, 1 unresolved discussion (waiting on CydeWeys).
core/src/main/java/google/registry/model/tld/Tld.java line 817 at r2 (raw file):
Previously, CydeWeys (Ben McIlwain) wrote…
Worth adding a short Javadoc here, as this is a public method. (And also this is different from other ImmutableObjects.)
Done.
CydeWeys
left a comment
There was a problem hiding this comment.
@CydeWeys resolved 1 discussion.
Reviewable status: 0 of 6 files reviewed, all discussions resolved.
CydeWeys
left a comment
There was a problem hiding this comment.
@CydeWeys reviewed 6 files and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on gbrodman).
This change is