File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
src/main/java/pro/cloudnode/smp/smpcore Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 3636@ SuppressWarnings ("ProfileCache" )
3737public record CachedProfile (@ NotNull UUID uuid , @ NotNull String name , @ NotNull Date fetched ) {
3838 private static final @ NotNull Duration MAX_AGE = Duration .ofDays (7 );
39+
3940 static final @ NotNull Duration STALE_WHILE_REVALIDATE = Duration .ofDays (1 );
4041
4142 private static final @ NotNull HttpClient client = HttpClient .newBuilder ()
@@ -250,7 +251,8 @@ public static void cleanUp() {
250251 );
251252
252253 if (profile .stale ()) {
253- logger .fine ("Profile cache is stale for " + profile .uuid + " (" + Duration .between (profile .fetched .toInstant (), Instant .now ()) + " old). Revalidation scheduled." );
254+ logger .fine ("Profile cache is stale for " + profile .uuid + " ("
255+ + Duration .between (profile .fetched .toInstant (), Instant .now ()) + " old). Revalidation scheduled." );
254256 SMPCore .runAsync (() -> CachedProfile .fetch (profile .uuid ()));
255257
256258 if (profile .staleWhileRevalidate ()) {
Original file line number Diff line number Diff line change @@ -81,7 +81,8 @@ public boolean isAlt() {
8181 while (rs .next ()) alts .add (new Member (rs ));
8282 }
8383 catch (final @ NotNull SQLException e ) {
84- SMPCore .getInstance ().getLogger ().log (Level .SEVERE , "could not get alts for " + CachedProfile .getName (player ()), e );
84+ SMPCore .getInstance ().getLogger ().log (Level .SEVERE , "could not get alts for "
85+ + CachedProfile .getName (player ()), e );
8586 }
8687
8788 return alts ;
You can’t perform that action at this time.
0 commit comments