mirror of
https://github.com/google/nomulus.git
synced 2025-06-27 14:54:51 +02:00
Fix @VisibleForTesting given the newly deployed enforcement
Generated code is now also covered by @VisibleForTesting, including Dagger @Inject This CL is a cleanup of auto-generated code by ghm@ from the Error Prone team ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=228748874
This commit is contained in:
parent
8bde7285bf
commit
c74ffd7559
15 changed files with 11 additions and 24 deletions
|
@ -16,7 +16,6 @@ package google.registry.model.contact;
|
|||
|
||||
import static google.registry.util.CollectionUtils.nullToEmptyImmutableCopy;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.googlecode.objectify.annotation.Embed;
|
||||
import google.registry.model.Buildable;
|
||||
|
@ -84,7 +83,6 @@ public class Disclose extends ImmutableObject {
|
|||
return type;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public static PostalInfoChoice create(PostalInfo.Type type) {
|
||||
PostalInfoChoice instance = new PostalInfoChoice();
|
||||
instance.type = type;
|
||||
|
@ -93,7 +91,6 @@ public class Disclose extends ImmutableObject {
|
|||
}
|
||||
|
||||
/** A builder for {@link Disclose} since it is immutable. */
|
||||
@VisibleForTesting
|
||||
public static class Builder extends Buildable.Builder<Disclose> {
|
||||
public Builder setNames(ImmutableList<PostalInfoChoice> names) {
|
||||
getInstance().name = names;
|
||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.model.domain;
|
|||
|
||||
import static google.registry.util.PreconditionsUtils.checkArgumentNotNull;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.googlecode.objectify.Key;
|
||||
import com.googlecode.objectify.annotation.Embed;
|
||||
import com.googlecode.objectify.annotation.Index;
|
||||
|
@ -57,7 +56,6 @@ public class DesignatedContact extends ImmutableObject {
|
|||
REGISTRANT;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public static DesignatedContact create(Type type, Key<ContactResource> contact) {
|
||||
DesignatedContact instance = new DesignatedContact();
|
||||
instance.type = type;
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
package google.registry.model.domain.secdns;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.googlecode.objectify.annotation.Embed;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import javax.xml.bind.DatatypeConverter;
|
||||
|
@ -76,7 +75,6 @@ public class DelegationSignerData
|
|||
return digest;
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
public static DelegationSignerData create(
|
||||
int keyTag, int algorithm, int digestType, byte[] digest) {
|
||||
DelegationSignerData instance = new DelegationSignerData();
|
||||
|
|
|
@ -100,7 +100,6 @@ public class Address extends ImmutableObject implements Jsonifiable {
|
|||
}
|
||||
|
||||
/** A builder for constructing {@link Address}. */
|
||||
@VisibleForTesting
|
||||
public static class Builder<T extends Address> extends Buildable.Builder<T> {
|
||||
|
||||
public Builder() {}
|
||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.model.eppcommon;
|
|||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import google.registry.model.Buildable;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
|
@ -66,7 +65,6 @@ public class PhoneNumber extends ImmutableObject {
|
|||
}
|
||||
|
||||
/** A builder for constructing {@link PhoneNumber}. */
|
||||
@VisibleForTesting
|
||||
public static class Builder<T extends PhoneNumber> extends Buildable.Builder<T> {
|
||||
@Override
|
||||
public T build() {
|
||||
|
|
|
@ -129,6 +129,14 @@ public abstract class PollMessage extends ImmutableObject
|
|||
super(instance);
|
||||
}
|
||||
|
||||
/**
|
||||
* Manually set the ID for testing or in special circumstances.
|
||||
*
|
||||
* <p>In general the ID is auto-created, and there should be no need to set it manually.
|
||||
*
|
||||
* <p>This is only here for testing and for one special situation in which we're making a new
|
||||
* poll message to replace an existing one, so it has to have the same ID.
|
||||
*/
|
||||
public B setId(Long id) {
|
||||
getInstance().id = id;
|
||||
return thisCastToDerived();
|
||||
|
|
|
@ -562,7 +562,6 @@ public class Registry extends ImmutableObject implements Buildable {
|
|||
* domain renewal, and all derived costs (i.e. autorenews, transfers, and the per-domain part of a
|
||||
* restore cost).
|
||||
*/
|
||||
@VisibleForTesting
|
||||
public Money getStandardRenewCost(DateTime now) {
|
||||
return renewBillingCostTransitions.getValueAtTime(now);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue