Skip to content

Commit d4535ba

Browse files
authored
Replace Strings with StringUtils for prependIfMissing (#44)
1 parent 8dee19c commit d4535ba

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/main/java/run/halo/sitemap/DefaultSitemapEntryLister.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import java.util.function.Function;
99
import lombok.AllArgsConstructor;
1010
import org.apache.commons.lang3.StringUtils;
11-
import org.apache.commons.lang3.Strings;
1211
import org.springframework.stereotype.Component;
1312
import reactor.core.publisher.Flux;
1413
import run.halo.app.core.extension.content.Category;
@@ -99,9 +98,10 @@ private Flux<UrlEntryMeta> urlsForListPages() {
9998
.filter(StringUtils::isNotBlank)
10099
.map(json -> JsonUtils.jsonToObject(json, ThemeRouteRules.class))
101100
.orElseGet(ThemeRouteRules::empty);
102-
return List.of(Strings.CS.prependIfMissing(themeRouteRules.getTags(), "/"),
103-
Strings.CS.prependIfMissing(themeRouteRules.getCategories(), "/"),
104-
Strings.CS.prependIfMissing(themeRouteRules.getArchives(), "/")
101+
return List.of(
102+
StringUtils.prependIfMissing(themeRouteRules.getTags(), "/"),
103+
StringUtils.prependIfMissing(themeRouteRules.getCategories(), "/"),
104+
StringUtils.prependIfMissing(themeRouteRules.getArchives(), "/")
105105
);
106106
})
107107
.flatMapMany(Flux::fromIterable)

0 commit comments

Comments
 (0)