mirror of
https://github.com/google/nomulus.git
synced 2025-07-20 09:46:03 +02:00
Make name and address fields required on Registrar
The absence of these fields causes RDE failures, so they are in effect required on any functioning registry system. We are currently experiencing problems in sandbox caused by null values on these fields. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=155474895
This commit is contained in:
parent
5313ca58d6
commit
ef1487cb57
18 changed files with 460 additions and 272 deletions
|
@ -21,12 +21,10 @@ import static com.google.common.html.HtmlEscapers.htmlEscaper;
|
|||
import com.google.common.base.Function;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.base.Supplier;
|
||||
import com.google.common.collect.FluentIterable;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Ordering;
|
||||
import google.registry.model.eppcommon.Address;
|
||||
import google.registry.model.registrar.Registrar;
|
||||
import google.registry.util.Idn;
|
||||
import google.registry.xml.UtcDateTimeAdapter;
|
||||
import java.util.Arrays;
|
||||
|
@ -45,13 +43,6 @@ abstract class WhoisResponseImpl implements WhoisResponse {
|
|||
/** ICANN problem reporting URL appended to all WHOIS responses. */
|
||||
private static final String ICANN_REPORTING_URL = "https://www.icann.org/wicf/";
|
||||
|
||||
private static final Registrar EMPTY_REGISTRAR = new Supplier<Registrar>() {
|
||||
@Override
|
||||
public Registrar get() {
|
||||
// Use Type.TEST here to avoid requiring an IANA ID (the type does not appear in WHOIS).
|
||||
return new Registrar.Builder().setType(Registrar.Type.TEST).build();
|
||||
}}.get();
|
||||
|
||||
/** The time at which this response was created. */
|
||||
private final DateTime timestamp;
|
||||
|
||||
|
@ -196,11 +187,4 @@ abstract class WhoisResponseImpl implements WhoisResponse {
|
|||
|
||||
/** An emitter that needs no special logic. */
|
||||
static class BasicEmitter extends Emitter<BasicEmitter> {}
|
||||
|
||||
/** Returns the registrar for this client id, or an empty registrar with null values. */
|
||||
static Registrar getRegistrar(@Nullable String clientId) {
|
||||
return Optional
|
||||
.fromNullable(clientId == null ? null : Registrar.loadByClientId(clientId))
|
||||
.or(EMPTY_REGISTRAR);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue