Skip to content

Commit b9a4797

Browse files
Update some misleading comments left by Claude
1 parent e0f5cbb commit b9a4797

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/main/java/com/scalepoint/oauth_token_client/InMemoryTokenCache.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,12 @@ public String get(String cacheKey, TokenSource underlyingSource) throws IOExcept
5050
// Token is missing or expired - fetch a new one
5151
ExpiringToken token = underlyingSource.get();
5252
if (token.getExpiresInSeconds() <= 0) {
53-
throw new IllegalArgumentException("Authorization server does not provide token expiration information. Consider using NoCache or custom cache implementation to avoid performance penalty caused by locking.");
53+
throw new IllegalArgumentException("Authorization server does not provide token expiration information. Consider using NoCache or custom cache implementation.");
5454
}
55-
56-
// Use compute for thread-safe update, but we already have the token
55+
56+
// Use compute for thread-safe update, even though we already have the token
5757
CachedToken newToken = new CachedToken(token.getToken(), token.getExpiresInSeconds());
5858
cache.compute(cacheKey, (key, existingToken) -> {
59-
// Double-check: another thread might have updated it with a fresh token
6059
if (existingToken != null && !existingToken.isExpired()) {
6160
return existingToken;
6261
}

0 commit comments

Comments
 (0)