mirror of
https://github.com/google/nomulus
synced 2026-04-18 15:25:15 +00:00
Don't allow null in BillingEvent.setFlags()
It's better that it always takes a non-null ImmutableSet, which may either be empty or contain elements. That way the ugliness of nullness is contained just to the entity class itself, and all other code that interacts with it can always be assured of having a real set to deal with. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=132066238
This commit is contained in:
@@ -157,7 +157,9 @@ public class DomainCreateFlow extends DomainCreateOrAllocateFlow {
|
||||
.setBillingTime(now.plus(isAnchorTenant()
|
||||
? registry.getAnchorTenantAddGracePeriodLength()
|
||||
: registry.getAddGracePeriodLength()))
|
||||
.setFlags(isAnchorTenant() ? ImmutableSet.of(BillingEvent.Flag.ANCHOR_TENANT) : null)
|
||||
.setFlags(isAnchorTenant()
|
||||
? ImmutableSet.of(BillingEvent.Flag.ANCHOR_TENANT)
|
||||
: ImmutableSet.<BillingEvent.Flag>of())
|
||||
.setParent(historyEntry)
|
||||
.build();
|
||||
ofy().save().entity(createEvent);
|
||||
|
||||
Reference in New Issue
Block a user