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:
mcilwain 2016-11-16 09:25:44 -08:00 committed by Ben McIlwain
parent 4d2e0941f3
commit 5368489987
10 changed files with 27 additions and 24 deletions

View file

@ -439,7 +439,7 @@ public class DomainCreateFlow implements TransactionalFlow {
private ImmutableList<FeeTransformResponseExtension> createResponseExtensions(
FeeCreateCommandExtension feeCreate, EppCommandOperations commandOperations) {
return (feeCreate == null)
? null
? ImmutableList.of()
: ImmutableList.of(createFeeCreateResponse(feeCreate, commandOperations));
}