From 9d9a90ccd4639eba5547fdd4c2c4137aa8189ad7 Mon Sep 17 00:00:00 2001 From: Madhura Bhave Date: Mon, 15 Jun 2020 09:22:14 -0700 Subject: [PATCH] Polish --- .../releasescripts/bintray/BintrayService.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ci/images/releasescripts/src/main/java/io/spring/concourse/releasescripts/bintray/BintrayService.java b/ci/images/releasescripts/src/main/java/io/spring/concourse/releasescripts/bintray/BintrayService.java index cc133121f0..1d38472e26 100644 --- a/ci/images/releasescripts/src/main/java/io/spring/concourse/releasescripts/bintray/BintrayService.java +++ b/ci/images/releasescripts/src/main/java/io/spring/concourse/releasescripts/bintray/BintrayService.java @@ -73,11 +73,11 @@ public class BintrayService { this.restTemplate = builder.build(); } - public boolean isDistributionComplete(ReleaseInfo releaseInfo, Set requiredDigets, Duration timeout) { - return isDistributionComplete(releaseInfo, requiredDigets, timeout, Duration.ofSeconds(20)); + public boolean isDistributionComplete(ReleaseInfo releaseInfo, Set requiredDigests, Duration timeout) { + return isDistributionComplete(releaseInfo, requiredDigests, timeout, Duration.ofSeconds(20)); } - public boolean isDistributionComplete(ReleaseInfo releaseInfo, Set requiredDigets, Duration timeout, + public boolean isDistributionComplete(ReleaseInfo releaseInfo, Set requiredDigests, Duration timeout, Duration pollInterval) { logger.debug("Checking if distribution is complete"); RequestEntity request = getRequest(releaseInfo, 0); @@ -85,7 +85,7 @@ public class BintrayService { waitAtMost(timeout).with().pollDelay(Duration.ZERO).pollInterval(pollInterval).until(() -> { logger.debug("Checking bintray"); PackageFile[] published = this.restTemplate.exchange(request, PackageFile[].class).getBody(); - return hasPublishedAll(published, requiredDigets); + return hasPublishedAll(published, requiredDigests); }); } catch (ConditionTimeoutException ex) { @@ -95,12 +95,12 @@ public class BintrayService { return true; } - private boolean hasPublishedAll(PackageFile[] published, Set requiredDigets) { + private boolean hasPublishedAll(PackageFile[] published, Set requiredDigests) { if (published == null || published.length == 0) { logger.debug("Bintray returned no published files"); return false; } - Set remaining = new HashSet<>(requiredDigets); + Set remaining = new HashSet<>(requiredDigests); for (PackageFile publishedFile : published) { logger.debug( "Found published file " + publishedFile.getName() + " with digest " + publishedFile.getSha256());