mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Fix message for SuperordinateDomainInPendingDeleteException
The StatusProhibitsOperationException superclass constructor just wants a raw message to return to the client, so we should pass it an explanation rather than just the superordinate domain name. In fact, I think the superordinate domain name isn't really necessary since it should be obvious from the hostname in the create/update request what the superordinate domain would be. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=156747185
This commit is contained in:
parent
fb21946366
commit
9ee9229456
3 changed files with 5 additions and 6 deletions
|
@ -134,16 +134,15 @@ public class HostFlowUtils {
|
||||||
DomainResource superordinateDomain) throws EppException {
|
DomainResource superordinateDomain) throws EppException {
|
||||||
if ((superordinateDomain != null)
|
if ((superordinateDomain != null)
|
||||||
&& superordinateDomain.getStatusValues().contains(StatusValue.PENDING_DELETE)) {
|
&& superordinateDomain.getStatusValues().contains(StatusValue.PENDING_DELETE)) {
|
||||||
throw new SuperordinateDomainInPendingDeleteException(
|
throw new SuperordinateDomainInPendingDeleteException();
|
||||||
superordinateDomain.getFullyQualifiedDomainName());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Superordinate domain for this hostname is in pending delete. */
|
/** Superordinate domain for this hostname is in pending delete. */
|
||||||
static class SuperordinateDomainInPendingDeleteException
|
static class SuperordinateDomainInPendingDeleteException
|
||||||
extends StatusProhibitsOperationException {
|
extends StatusProhibitsOperationException {
|
||||||
public SuperordinateDomainInPendingDeleteException(String domainName) {
|
public SuperordinateDomainInPendingDeleteException() {
|
||||||
super(domainName);
|
super("Superordinate domain for this hostname is in pending delete");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -184,7 +184,7 @@ public class HostCreateFlowTest extends ResourceFlowTestCase<HostCreateFlow, Hos
|
||||||
clock.advanceOneMilli();
|
clock.advanceOneMilli();
|
||||||
thrown.expect(
|
thrown.expect(
|
||||||
SuperordinateDomainInPendingDeleteException.class,
|
SuperordinateDomainInPendingDeleteException.class,
|
||||||
"example.tld");
|
"Superordinate domain for this hostname is in pending delete");
|
||||||
runFlow();
|
runFlow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -781,7 +781,7 @@ public class HostUpdateFlowTest extends ResourceFlowTestCase<HostUpdateFlow, Hos
|
||||||
clock.advanceOneMilli();
|
clock.advanceOneMilli();
|
||||||
thrown.expect(
|
thrown.expect(
|
||||||
SuperordinateDomainInPendingDeleteException.class,
|
SuperordinateDomainInPendingDeleteException.class,
|
||||||
"example.tld");
|
"Superordinate domain for this hostname is in pending delete");
|
||||||
runFlow();
|
runFlow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue