From d36958f83debf37f6f9ecb15c91cbf63a5f67af6 Mon Sep 17 00:00:00 2001 From: "flamingo[bot]" <277372822+flamingo[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2026 06:10:42 +0000 Subject: [PATCH] fix(OFJAVA-001): Manual null/blank checks instead of StringUtils.hasText in UserInstalledAgentService --- .../openframe/client/service/UserInstalledAgentService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/openframe-client-core/src/main/java/com/openframe/client/service/UserInstalledAgentService.java b/openframe-client-core/src/main/java/com/openframe/client/service/UserInstalledAgentService.java index c63817e45..243100bf9 100644 --- a/openframe-client-core/src/main/java/com/openframe/client/service/UserInstalledAgentService.java +++ b/openframe-client-core/src/main/java/com/openframe/client/service/UserInstalledAgentService.java @@ -11,6 +11,8 @@ import java.time.Instant; +import static org.springframework.util.StringUtils.hasText; + @Service @RequiredArgsConstructor @Slf4j @@ -72,13 +74,13 @@ private void validateUserExists(String userId) { } private void validateUserId(String userId) { - if (userId == null || userId.trim().isEmpty()) { + if (!hasText(userId)) { throw new IllegalArgumentException("User ID cannot be empty"); } } private void validateAgentType(String agentType) { - if (agentType == null || agentType.trim().isEmpty()) { + if (!hasText(agentType)) { throw new IllegalArgumentException("Agent type cannot be empty"); } }