Fix wrong initial value.

For myGenesisOutputNames we check for null not Optional.empty as empty is a valid case and we do not
want to wrap the optional field into another Optional.
Also myCompensationRequestNames is using a null check and gets reset to null instead of an
empty set as the empty set is a valid case as well.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
HenrikJannsen 2022-11-07 12:08:44 -05:00
parent 5799fb27eb
commit 78d3fd8d44
No known key found for this signature in database
GPG key ID: 02AA2BAE387C8307

View file

@ -55,8 +55,8 @@ public class BurningManPresentationService implements DaoStateListener {
private final Map<String, BurningManCandidate> burningManCandidatesByName = new HashMap<>();
private final Set<ReimbursementModel> reimbursements = new HashSet<>();
private Optional<Long> averageDistributionPerCycle = Optional.empty();
private Set<String> myCompensationRequestNames;
private Optional<Set<String>> myGenesisOutputNames = Optional.empty();
private Set<String> myCompensationRequestNames = null;
private Optional<Set<String>> myGenesisOutputNames = null;
@Inject
public BurningManPresentationService(DaoStateService daoStateService,