mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Enforce nullness consistency on EppResponse.set...() methods
The callsites were inconsistent between whether they were passing empty list or null, and many of the ones that were passing null were not correctly annotated with @Nullable. I'm now going with empty list throughout except for the final step where the actual field that will be transformed into XML is set, where it is coerced to null to avoid an empty element in the XML output. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=139340837
This commit is contained in:
parent
4d2e0941f3
commit
5368489987
10 changed files with 27 additions and 24 deletions
|
@ -408,7 +408,7 @@ public final class DomainTransferRequestFlow implements TransactionalFlow {
|
|||
private ImmutableList<FeeTransformResponseExtension> createResponseExtensions(Money renewCost,
|
||||
FeeTransferCommandExtension feeTransfer) {
|
||||
return feeTransfer == null
|
||||
? null
|
||||
? ImmutableList.of()
|
||||
: ImmutableList.of(feeTransfer.createResponseBuilder()
|
||||
.setCurrency(renewCost.getCurrencyUnit())
|
||||
.setFees(ImmutableList.of(Fee.create(renewCost.getAmount(), FeeType.RENEW)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue