Skip to content

Commit

Permalink
Ch**ckstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed Dec 29, 2024
1 parent d7b6e81 commit 25bd912
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ public class IBANValidatorTest {
*/
private static final String IBAN_REGISTRY = "iban_registry_v99.txt";
private static final Charset IBAN_REGISTRY_CHARSET = Charset.forName("windows-1252");
private static final int MS_PER_DAY = 1000*60*60*24;
private static final int MS_PER_DAY = 1000 * 60 * 60 * 24;
private static final long MAX_AGE_DAYS = 180; // how old registry can get (approx 6 months)



// It's not clear whether IBANs can contain lower case characters
Expand Down Expand Up @@ -369,13 +369,13 @@ static Collection<Arguments> ibanRegistrySourceExamples() throws Exception {
for (int i = 1; i < country.size(); i++) {
result.add(Arguments.of(country.get(i), electronicExample.get(i)));
final String mmyy = lastUpdateDate.get(i);
final Date dt = DateValidator.getInstance().validate(mmyy,"MMM-yy",Locale.ROOT);
final Date dt = DateValidator.getInstance().validate(mmyy, "MMM-yy", Locale.ROOT);
if (dt.after(lastDate)) {
lastDate = dt;
lastUpdated = mmyy;
}
}
final long age = (new Date().getTime() - lastDate.getTime())/MS_PER_DAY;
final long age = (new Date().getTime() - lastDate.getTime()) / MS_PER_DAY;
if (age > MAX_AGE_DAYS) { // not necessarily a failure
System.out.println("WARNING: expected recent last update date, but found: " + lastUpdated);
}
Expand Down

0 comments on commit 25bd912

Please sign in to comment.