From 0895791aa10fd816149f4e179c416d7f317bb83c Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 16 Nov 2023 14:52:21 +0000 Subject: [PATCH] Ensure that releases in schedule can be mutated --- src/main/java/io/spring/calendar/release/ReleaseSchedule.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/io/spring/calendar/release/ReleaseSchedule.java b/src/main/java/io/spring/calendar/release/ReleaseSchedule.java index 95dd519..44a35ed 100644 --- a/src/main/java/io/spring/calendar/release/ReleaseSchedule.java +++ b/src/main/java/io/spring/calendar/release/ReleaseSchedule.java @@ -16,6 +16,7 @@ package io.spring.calendar.release; +import java.util.ArrayList; import java.util.List; /** @@ -37,7 +38,7 @@ public final class ReleaseSchedule { */ public ReleaseSchedule(String project, List releases) { this.project = project; - this.releases = releases; + this.releases = new ArrayList<>(releases); } /**