Skip to content

Commit

Permalink
Remove unnecessary field declaration in AccountLinkAdapter
Browse files Browse the repository at this point in the history
  • Loading branch information
bivashy committed Nov 4, 2023
1 parent 66ab717 commit e196b06
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@
import me.mastercapexd.auth.database.model.AccountLink;

public class AccountLinkAdapter extends LinkUserTemplate {
private final LinkUserInfo linkUserInfo;

public AccountLinkAdapter(AccountLink accountLink, Account account) {
super(findLinkType(accountLink), account, LinkUserInfo.of(LinkUserIdentificator.ofParsed(accountLink.getLinkUserId())));
this.linkUserInfo = LinkUserInfo.of(LinkUserIdentificator.ofParsed(accountLink.getLinkUserId()), accountLink.isLinkEnabled());
super(findLinkType(accountLink), account, LinkUserInfo.of(LinkUserIdentificator.ofParsed(accountLink.getLinkUserId()), accountLink.isLinkEnabled()));
}

private static LinkType findLinkType(AccountLink accountLink) {
Expand All @@ -23,8 +21,4 @@ private static LinkType findLinkType(AccountLink accountLink) {
.orElseThrow(() -> new IllegalArgumentException("Link type " + accountLink.getLinkType() + " not exists!"));
}

@Override
public LinkUserInfo getLinkUserInfo() {
return linkUserInfo;
}
}

0 comments on commit e196b06

Please sign in to comment.