From 369c3ad7187ea044389a4b9b1a57071322f2918a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 5 Aug 2026 18:35:18 +0000 Subject: [PATCH 1/2] Initial plan From f413eea6db6a2015e9a89434d66d39cc75acd19a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 5 Aug 2026 18:37:25 +0000 Subject: [PATCH 2/2] Fix predicate-not snippet for Java 11 compatibility Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com> --- content/streams/predicate-not.yaml | 2 +- proof/streams/PredicateNot.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/content/streams/predicate-not.yaml b/content/streams/predicate-not.yaml index f5a0e82..0ff34cf 100644 --- a/content/streams/predicate-not.yaml +++ b/content/streams/predicate-not.yaml @@ -16,7 +16,7 @@ oldCode: |- modernCode: |- List nonEmpty = list.stream() .filter(Predicate.not(String::isBlank)) - .toList(); + .collect(Collectors.toList()); summary: "Use Predicate.not() to negate method references cleanly instead of writing\ \ lambda wrappers." explanation: "Before Java 11, negating a method reference required wrapping it in\ diff --git a/proof/streams/PredicateNot.java b/proof/streams/PredicateNot.java index 3ee7ad6..2725245 100755 --- a/proof/streams/PredicateNot.java +++ b/proof/streams/PredicateNot.java @@ -2,6 +2,7 @@ //JAVA 25+ import java.util.*; import java.util.function.*; +import java.util.stream.*; /// Proof: predicate-not /// Source: content/streams/predicate-not.yaml @@ -9,5 +10,5 @@ void main() { List list = List.of("hello", "", "world", " "); List nonEmpty = list.stream() .filter(Predicate.not(String::isBlank)) - .toList(); + .collect(Collectors.toList()); }