Skip to content

Commit 6ca1a59

Browse files
committed
PR review
1 parent 3e101ea commit 6ca1a59

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/org/sonarsource/sonarqube/mcp/authentication/SessionTokenStore.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,11 @@ public static SessionTokenStore getInstance() {
8080
* For existing sessions, validates that the token matches and refreshes the TTL.
8181
*/
8282
public boolean setTokenIfValid(String sessionId, String token) {
83-
var newEntry = new SessionEntry(token, Instant.now());
8483
var result = new AtomicBoolean(true);
8584
sessionTokens.compute(sessionId, (key, existing) -> {
8685
if (existing == null) {
8786
// New session - store the entry
88-
return newEntry;
87+
return new SessionEntry(token, Instant.now());
8988
}
9089
// Existing session - validate token matches
9190
if (existing.token().equals(token)) {

0 commit comments

Comments
 (0)