From c0921b013bef341546674cd1c69dab2042eea89b Mon Sep 17 00:00:00 2001 From: Simran Panda <119222118+simpanda01@users.noreply.github.com> Date: Tue, 4 Aug 2026 20:17:24 +0530 Subject: [PATCH 1/2] Remove redundant springdoc-openapi-starter-common dependency (#17157) --- spring-boot-modules/spring-boot-springdoc-2/pom.xml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/spring-boot-modules/spring-boot-springdoc-2/pom.xml b/spring-boot-modules/spring-boot-springdoc-2/pom.xml index 335e9b611f1a..29b9b8762258 100644 --- a/spring-boot-modules/spring-boot-springdoc-2/pom.xml +++ b/spring-boot-modules/spring-boot-springdoc-2/pom.xml @@ -58,11 +58,6 @@ org.springdoc springdoc-openapi-starter-webmvc-ui ${springdoc.version} - - - org.springdoc - springdoc-openapi-starter-common - ${springdoc.version} org.springframework.restdocs @@ -142,4 +137,4 @@ com.baeldung.restdocopenapi.Application - + \ No newline at end of file From 73e78a90859941798b254b6f73842475572d1aab Mon Sep 17 00:00:00 2001 From: Simran Panda <119222118+simpanda01@users.noreply.github.com> Date: Wed, 5 Aug 2026 21:09:54 +0530 Subject: [PATCH 2/2] Fix broken sliding window logic and remove unnecessary finisher in SlidingWindowGatherer --- .../gatherer/SlidingWindowGatherer.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/core-java-modules/core-java-streams-7/src/main/java/com/baeldung/streams/gatherer/SlidingWindowGatherer.java b/core-java-modules/core-java-streams-7/src/main/java/com/baeldung/streams/gatherer/SlidingWindowGatherer.java index 713d88e0e2a1..a4e761a99159 100644 --- a/core-java-modules/core-java-streams-7/src/main/java/com/baeldung/streams/gatherer/SlidingWindowGatherer.java +++ b/core-java-modules/core-java-streams-7/src/main/java/com/baeldung/streams/gatherer/SlidingWindowGatherer.java @@ -1,12 +1,13 @@ package com.baeldung.streams.gatherer; import java.util.*; -import java.util.function.BiConsumer; import java.util.function.Supplier; import java.util.stream.Gatherer; public class SlidingWindowGatherer implements Gatherer, List> { + private static final int WINDOW_SIZE = 3; + @Override public Supplier> initializer() { return ArrayDeque::new; @@ -18,15 +19,14 @@ public Integrator, Integer, List> integrator() { @Override public boolean integrate(Deque state, Integer element, Downstream> downstream) { state.addLast(element); - downstream.push(new ArrayList<>(state)); - state.removeFirst(); + if (state.size() > WINDOW_SIZE) { + state.removeFirst(); + } + if (state.size() == WINDOW_SIZE) { + downstream.push(new ArrayList<>(state)); + } return true; } }; } - - @Override - public BiConsumer, Downstream>> finisher() { - return (state, downstream) -> {}; - } -} +} \ No newline at end of file