From 6e401ecd0d0cfa00e73de4787d29c97550c63a16 Mon Sep 17 00:00:00 2001 From: Joris Baum Date: Tue, 14 Apr 2026 16:08:39 +0200 Subject: [PATCH] fix: Restore null-recent default to Doppler streaming PR #1348 changed the null-recent behavior from Doppler streaming to Log Cache. This restores the original default so null behaves like false (streaming), matching the prior logs(LogsRequest) contract. --- .../operations/applications/DefaultApplications.java | 2 +- .../operations/applications/DefaultApplicationsTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/DefaultApplications.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/DefaultApplications.java index bb492fffe7..c56ee52554 100644 --- a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/DefaultApplications.java +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/DefaultApplications.java @@ -559,7 +559,7 @@ public Flux logs(LogsRequest request) { @Override public Flux logs(ApplicationLogsRequest request) { - if (request.getRecent() == null || request.getRecent()) { + if (request.getRecent() != null && request.getRecent()) { return Mono.zip(this.cloudFoundryClient, this.spaceId) .flatMap( function( diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/DefaultApplicationsTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/DefaultApplicationsTest.java index 5d21f8e584..93f83236aa 100644 --- a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/DefaultApplicationsTest.java +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/DefaultApplicationsTest.java @@ -1378,7 +1378,7 @@ void logsLogCache() { requestLogsRecentLogCache(this.logCacheClient, "test-metadata-id"); this.applications - .logs(ApplicationLogsRequest.builder().name("test-application-name").build()) + .logs(ApplicationLogsRequest.builder().name("test-application-name").recent(true).build()) .as(StepVerifier::create) .expectNextMatches( log ->