Skip to content

Commit 35c03c1

Browse files
committed
comment
1 parent 7ce3097 commit 35c03c1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

LabApiUtilities/src/main/com/microsoft/identity/labapi/utilities/authentication/LabApiAuthenticationClient.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,19 +88,19 @@ public String getAccessToken() throws LabApiException {
8888
public String getAccessToken(final int retries) throws LabApiException {
8989

9090
// Do this in a loop, if we get an exception or null result, try again
91-
for (int i = 0; i < retries; i++) {
92-
System.out.printf(Locale.ENGLISH, "getAccessToken attempt #%d%n", (i + 1));
91+
for (int i = 1; i <= retries; i++) {
92+
System.out.printf(Locale.ENGLISH, "getAccessToken attempt #%d%n", i);
9393

9494
try {
9595
final String result = getAccessTokenInternal();
9696
if (result != null) {
9797
return result;
9898
}
9999
} catch (final LabApiException labApiException) {
100-
if (i < (retries - 1)) {
100+
if (i < retries) {
101101
System.out.printf(
102102
Locale.ENGLISH,
103-
"getAccessToken attempt #%d%n failed: %s", (i + 1),
103+
"getAccessToken attempt #%d%n failed: %s", i,
104104
labApiException
105105
);
106106

0 commit comments

Comments
 (0)