From 9e39f90f7820383d41b3043a885a8f1a28050282 Mon Sep 17 00:00:00 2001 From: John Niang Date: Wed, 7 Jan 2026 10:54:00 +0800 Subject: [PATCH] Replace Strings with StringUtils for prependIfMissing --- .../java/run/halo/sitemap/DefaultSitemapEntryLister.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/run/halo/sitemap/DefaultSitemapEntryLister.java b/src/main/java/run/halo/sitemap/DefaultSitemapEntryLister.java index ec42bd6..d65a172 100644 --- a/src/main/java/run/halo/sitemap/DefaultSitemapEntryLister.java +++ b/src/main/java/run/halo/sitemap/DefaultSitemapEntryLister.java @@ -8,7 +8,6 @@ import java.util.function.Function; import lombok.AllArgsConstructor; import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.Strings; import org.springframework.stereotype.Component; import reactor.core.publisher.Flux; import run.halo.app.core.extension.content.Category; @@ -99,9 +98,10 @@ private Flux urlsForListPages() { .filter(StringUtils::isNotBlank) .map(json -> JsonUtils.jsonToObject(json, ThemeRouteRules.class)) .orElseGet(ThemeRouteRules::empty); - return List.of(Strings.CS.prependIfMissing(themeRouteRules.getTags(), "/"), - Strings.CS.prependIfMissing(themeRouteRules.getCategories(), "/"), - Strings.CS.prependIfMissing(themeRouteRules.getArchives(), "/") + return List.of( + StringUtils.prependIfMissing(themeRouteRules.getTags(), "/"), + StringUtils.prependIfMissing(themeRouteRules.getCategories(), "/"), + StringUtils.prependIfMissing(themeRouteRules.getArchives(), "/") ); }) .flatMapMany(Flux::fromIterable)