From ef810759468c84668136932bdddf2c04db09fd08 Mon Sep 17 00:00:00 2001 From: Luck Date: Thu, 6 Feb 2020 14:22:11 +0000 Subject: Ignore expired log entries on load --- .../src/main/java/me/lucko/spark/common/activitylog/ActivityLog.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'spark-common/src') 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(); } -- cgit