From 6ef8557c34924bed8110e16ba5ac9df29a477288 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Thu, 17 Mar 2022 22:59:45 +0100 Subject: [PATCH] replace an internal class by a record in PlayerFinder --- .../fr/pandacube/lib/core/players/PlayerFinder.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/Core/src/main/java/fr/pandacube/lib/core/players/PlayerFinder.java b/Core/src/main/java/fr/pandacube/lib/core/players/PlayerFinder.java index c17c307..386862a 100644 --- a/Core/src/main/java/fr/pandacube/lib/core/players/PlayerFinder.java +++ b/Core/src/main/java/fr/pandacube/lib/core/players/PlayerFinder.java @@ -37,16 +37,7 @@ public class PlayerFinder { .maximumSize(1000) .build(); - //record PlayerIdCacheKey(String pName, boolean old) { } // Java 16 - static class PlayerIdCacheKey { - private final String pName; - private final boolean old; - public PlayerIdCacheKey(String pName, boolean old) { - this.pName = pName; this.old = old; - } - public String pName() { return pName; } - public boolean old() { return old; } - } + record PlayerIdCacheKey(String pName, boolean old) { } private static Cache playerId = CacheBuilder.newBuilder() .expireAfterWrite(2, TimeUnit.MINUTES) .maximumSize(1000)