remove remaining POMs

This commit is contained in:
Jake Potrebic
2021-06-17 10:11:00 -07:00
parent 36b107516b
commit 6d848fc4bf
26 changed files with 303 additions and 620 deletions

View File

@@ -56,7 +56,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
private final File file;
- private final Map<String, V> map = Maps.newHashMap();
+ // Paper - replace HashMap is ConcurrentHashMap
+ private final Map<String, V> map = Maps.newConcurrentMap(); private final Map<String, V> getBackingMap() { return this.map; } // Paper - OBFHELPER
+ private final Map<String, V> map = Maps.newConcurrentMap();
+ private boolean e = true;
+ private static final ParameterizedType f = new ParameterizedType() {
+ public Type[] getActualTypeArguments() {
@@ -83,7 +83,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start
+ // this.g();
+ // return (V) this.d.get(this.a(k0)); // CraftBukkit - fix decompile error
+ return (V) this.getBackingMap().computeIfPresent(this.getKeyForUser(key), (k, v) -> {
+ return (V) this.map.computeIfPresent(this.getKeyForUser(key), (k, v) -> {
+ return v.hasExpired() ? null : v;
+ });
+ // Paper end
@@ -96,7 +96,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public boolean isEmpty() {
- return this.map.size() < 1;
+ // return this.d.size() < 1; // Paper
+ return this.getBackingMap().isEmpty(); // Paper - readability is the goal. As an aside, isEmpty() uses only sumCount() and a comparison. size() uses sumCount(), casts, and boolean logic
+ return this.map.isEmpty(); // Paper - readability is the goal. As an aside, isEmpty() uses only sumCount() and a comparison. size() uses sumCount(), casts, and boolean logic
}
protected String getKeyForUser(K profile) {
@@ -127,7 +127,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ this.d.remove(this.a(k0));
+ }*/
+ this.getBackingMap().values().removeIf(StoredUserEntry::hasExpired);
+ this.map.values().removeIf(StoredUserEntry::hasExpired);
+ // Paper end
}