Skip to content

Commit e5d911d

Browse files
authored
Merge pull request #119 from RichLittlejohn/master
Fixed bug #114 - Guard against NPE if shutdown port or plain HTTP connector can't be found.
2 parents 82bfe29 + df82f50 commit e5d911d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/main/java/com/poratu/idea/plugins/tomcat/conf/TomcatCommandLineState.java

+6-2
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,12 @@ private void updateServerConf(Path confPath, TomcatRunConfiguration cfg)
196196
}
197197
}
198198

199-
portShutdown.setAttribute("port", String.valueOf(cfg.getAdminPort()));
200-
portE.setAttribute("port", String.valueOf(cfg.getPort()));
199+
if (portShutdown != null) {
200+
portShutdown.setAttribute("port", String.valueOf(cfg.getAdminPort()));
201+
}
202+
if (portE != null) {
203+
portE.setAttribute("port", String.valueOf(cfg.getPort()));
204+
}
201205
Integer sslPort = cfg.getSslPort();
202206

203207
if (sslPortE != null && sslPort != null) {

0 commit comments

Comments
 (0)