Skip to content

Commit

Permalink
Merge pull request #119 from RichLittlejohn/master
Browse files Browse the repository at this point in the history
Fixed bug #114 - Guard against NPE if shutdown port or plain HTTP connector can't be found.
  • Loading branch information
yuezk authored Dec 12, 2023
2 parents 82bfe29 + df82f50 commit e5d911d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,12 @@ private void updateServerConf(Path confPath, TomcatRunConfiguration cfg)
}
}

portShutdown.setAttribute("port", String.valueOf(cfg.getAdminPort()));
portE.setAttribute("port", String.valueOf(cfg.getPort()));
if (portShutdown != null) {
portShutdown.setAttribute("port", String.valueOf(cfg.getAdminPort()));
}
if (portE != null) {
portE.setAttribute("port", String.valueOf(cfg.getPort()));
}
Integer sslPort = cfg.getSslPort();

if (sslPortE != null && sslPort != null) {
Expand Down

0 comments on commit e5d911d

Please sign in to comment.