Skip to content

Commit

Permalink
Core: Handle potential NPE in RESTSessionCatalog#newSessionCache (apa…
Browse files Browse the repository at this point in the history
…che#10607)

Signed-off-by: Tai Le Manh <manhtai.lmt@gmail.com>
  • Loading branch information
tlm365 authored Jul 2, 2024
1 parent d3cb1b6 commit f4ddaea
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,12 @@ private static Cache<String, AuthSession> newSessionCache(Map<String, String> pr
return Caffeine.newBuilder()
.expireAfterAccess(Duration.ofMillis(expirationIntervalMs))
.removalListener(
(RemovalListener<String, AuthSession>) (id, auth, cause) -> auth.stopRefreshing())
(RemovalListener<String, AuthSession>)
(id, auth, cause) -> {
if (auth != null) {
auth.stopRefreshing();
}
})
.build();
}

Expand Down

0 comments on commit f4ddaea

Please sign in to comment.