mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 08:57:35 +01:00
Fix Counter#decrement recursive call (#5665)
This commit is contained in:
parent
21ac7dc988
commit
1514576281
@ -2018,7 +2018,7 @@ index 0000000000000000000000000000000000000000..632c4961515f5052551f841cfa840e60
|
||||
+}
|
||||
diff --git a/src/main/java/co/aikar/util/Counter.java b/src/main/java/co/aikar/util/Counter.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..80155072d1004e34e04342d434cf7d75f0b7e29d
|
||||
index 0000000000000000000000000000000000000000..eff63c371c39e21a5a9cb5af8c2dcf78a60dd52b
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/util/Counter.java
|
||||
@@ -0,0 +1,38 @@
|
||||
@ -2041,7 +2041,7 @@ index 0000000000000000000000000000000000000000..80155072d1004e34e04342d434cf7d75
|
||||
+ return increment(key, 1);
|
||||
+ }
|
||||
+ public long decrement(@Nullable T key, long amount) {
|
||||
+ return decrement(key, -amount);
|
||||
+ return increment(key, -amount);
|
||||
+ }
|
||||
+ public long increment(@Nullable T key, long amount) {
|
||||
+ Long count = this.getCount(key);
|
||||
|
Loading…
Reference in New Issue
Block a user