Skip to content

Commit

Permalink
Improve formatting and simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
ripcurlx committed Jul 19, 2021
1 parent 4321f20 commit ca02610
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,13 @@ public static int addFormForBuyer(GridPane gridPane, int gridRow,
return gridRow;
}

public CapitualForm(PaymentAccount paymentAccount, AccountAgeWitnessService accountAgeWitnessService, CapitualValidator capitualValidator,
InputValidator inputValidator, GridPane gridPane, int gridRow, CoinFormatter formatter) {
public CapitualForm(PaymentAccount paymentAccount,
AccountAgeWitnessService accountAgeWitnessService,
CapitualValidator capitualValidator,
InputValidator inputValidator,
GridPane gridPane,
int gridRow,
CoinFormatter formatter) {
super(paymentAccount, accountAgeWitnessService, inputValidator, gridPane, gridRow, formatter);
this.capitualAccount = (CapitualAccount) paymentAccount;
this.capitualValidator = capitualValidator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import javax.inject.Inject;

public class CapitualValidator extends InputValidator {
private RegexValidator regexValidator;
private final RegexValidator regexValidator;

@Inject
public CapitualValidator(RegexValidator regexValidator) {
Expand All @@ -18,8 +18,7 @@ public CapitualValidator(RegexValidator regexValidator) {

@Override
public ValidationResult validate(String input) {
ValidationResult result = regexValidator.validate(input);

return result;
return regexValidator.validate(input);
}
}

0 comments on commit ca02610

Please sign in to comment.