Skip to content

Commit

Permalink
Merge pull request #2566 from alphagov/PP-7226-codeql-changes-to-conn…
Browse files Browse the repository at this point in the history
…ector

PP-7226 CodeQL Changes
  • Loading branch information
rory malcolm authored Sep 28, 2020
2 parents 036c211 + 0f2acc1 commit 5d33474
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ public boolean equals(Object obj) {
Objects.equals(email, charge.email);
}

@Override
public int hashCode() {
return Objects.hash(externalId, amount, status, externalStatus, gatewayTransactionId, corporateSurcharge,
refundAvailabilityStatus, reference, description, createdDate, email, gatewayAccountId,
paymentGatewayName, historic);
}

public String getExternalStatus() {
return externalStatus;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static StripePayoutStatus fromString(String status) {
return stat;
}
}
throw new IllegalArgumentException(format("Stripe payout status not recognized: [{}]", status));
throw new IllegalArgumentException(format("Stripe payout status not recognized: [%s]", status));
}

public Optional<Class<? extends PayoutEvent>> getEventClass() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,10 @@ public boolean equals(Object obj) {
Objects.equals(chargeExternalId, refund.chargeExternalId) &&
Objects.equals(gatewayTransactionId, refund.gatewayTransactionId);
}

@Override
public int hashCode() {
return Objects.hash(externalId, amount, userExternalId, userEmail, gatewayTransactionId, chargeExternalId,
externalStatus, historic);
}
}

0 comments on commit 5d33474

Please sign in to comment.