Skip to content

Commit

Permalink
chore: remove if case
Browse files Browse the repository at this point in the history
  • Loading branch information
guqing committed Sep 22, 2023
1 parent 83aec9e commit ec27d31
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import org.apache.commons.lang3.StringUtils;
import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafProperties;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;
import org.springframework.web.reactive.function.server.ServerRequest;
import reactor.core.publisher.Mono;
import run.halo.app.theme.ThemeResolver;
Expand Down Expand Up @@ -43,9 +44,7 @@ public Mono<String> resolveViewNameOrDefault(ServerRequest request, String name,
}

String computeResourceName(String name) {
if (StringUtils.isBlank(name)) {
return name;
}
Assert.notNull(name, "Name must not be null");
return StringUtils.endsWith(name, thymeleafProperties.getSuffix())
? name : name + thymeleafProperties.getSuffix();
}
Expand Down

0 comments on commit ec27d31

Please sign in to comment.