Switch order of literals to prevent NullPointerException (#2035)

Co-authored-by: pixeebot[bot] <104101892+pixeebot[bot]@users.noreply.github.com>
This commit is contained in:
pixeebot[bot]
2024-10-18 07:15:10 +01:00
committed by GitHub
parent b31564968c
commit 09c9944fc3
3 changed files with 5 additions and 5 deletions

View File

@@ -37,7 +37,7 @@ public class SPdfApplication {
@Value("${server.port:8080}")
public void setServerPortStatic(String port) {
if (port.equalsIgnoreCase("auto")) {
if ("auto".equalsIgnoreCase(port)) {
// Use Spring Boot's automatic port assignment (server.port=0)
SPdfApplication.serverPortStatic =
"0"; // This will let Spring Boot assign an available port