From 6481587d9b803bfddbd15c657890585fbac12e02 Mon Sep 17 00:00:00 2001 From: Chris Dennis Date: Wed, 15 Nov 2023 15:27:59 -0500 Subject: [PATCH] When merging older commits in to newer code copyright updates may be 'obsolete' --- src/main/java/org/terracotta/build/plugins/CopyrightPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/terracotta/build/plugins/CopyrightPlugin.java b/src/main/java/org/terracotta/build/plugins/CopyrightPlugin.java index 713d0ec..b9ef448 100644 --- a/src/main/java/org/terracotta/build/plugins/CopyrightPlugin.java +++ b/src/main/java/org/terracotta/build/plugins/CopyrightPlugin.java @@ -235,7 +235,7 @@ private Set checkFiles(Map expectedUpdates) { return expectedUpdates.entrySet().stream().filter(update -> update.getKey().isFile()).map(update -> { try (Stream lines = Files.lines(update.getKey().toPath(), StandardCharsets.UTF_8)) { - if (lines.map(pattern::matcher).filter(Matcher::find).anyMatch(matcher -> update.getValue().equals(endYear.applyAsInt(matcher)))) { + if (lines.map(pattern::matcher).filter(Matcher::find).anyMatch(matcher -> update.getValue() <= endYear.applyAsInt(matcher))) { return null; } else { return update.getKey();