Add getMostRecentAddress with throwing a UnsupportedOperationException to make sure the old field is not used anymore from any client.

Signed-off-by: HenrikJannsen <boilingfrog@gmx.com>
This commit is contained in:
HenrikJannsen 2023-05-17 13:08:34 +07:00
parent 95023216ec
commit bf325938d5
No known key found for this signature in database
GPG Key ID: 02AA2BAE387C8307

View File

@ -79,6 +79,11 @@ public class BurningManCandidate {
return isBugfix6699Activated ? receiverAddress : mostRecentAddress;
}
public Optional<String> getMostRecentAddress() {
// Lombok getter is set for class, so we would get a getMostRecentAddress but want to ensure it's not accidentally used.
throw new UnsupportedOperationException("getMostRecentAddress must not be used. Use getReceiverAddress instead.");
}
public void addBurnOutputModel(BurnOutputModel burnOutputModel) {
if (burnOutputModels.contains(burnOutputModel)) {
return;