aboutsummaryrefslogtreecommitdiff
path: root/spark-common/src/main/java
diff options
context:
space:
mode:
authorLuck <git@lucko.me>2020-02-06 14:22:11 +0000
committerLuck <git@lucko.me>2020-02-06 14:22:11 +0000
commitef810759468c84668136932bdddf2c04db09fd08 (patch)
tree923677dbd5a4c26ab7f3a53a33731af4926b87ce /spark-common/src/main/java
parente02d52ce8d45550a4d77f11971e31cf0732e5f0c (diff)
downloadspark-ef810759468c84668136932bdddf2c04db09fd08.tar.gz
spark-ef810759468c84668136932bdddf2c04db09fd08.tar.bz2
spark-ef810759468c84668136932bdddf2c04db09fd08.zip
Ignore expired log entries on load
Diffstat (limited to 'spark-common/src/main/java')
-rw-r--r--spark-common/src/main/java/me/lucko/spark/common/activitylog/ActivityLog.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/spark-common/src/main/java/me/lucko/spark/common/activitylog/ActivityLog.java b/spark-common/src/main/java/me/lucko/spark/common/activitylog/ActivityLog.java
index 894593c..6962400 100644
--- a/spark-common/src/main/java/me/lucko/spark/common/activitylog/ActivityLog.java
+++ b/spark-common/src/main/java/me/lucko/spark/common/activitylog/ActivityLog.java
@@ -114,8 +114,9 @@ public class ActivityLog {
Activity activity = Activity.deserialize(element);
if (activity.shouldExpire()) {
save = true;
+ } else {
+ this.log.add(activity);
}
- this.log.add(activity);
} catch (Exception e) {
e.printStackTrace();
}