File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
ng-adaptor-jetty/src/main/java/ng/adaptor/jetty Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -43,11 +43,23 @@ public class NGAdaptorJetty extends NGAdaptor {
4343
4444 private NGApplication _application ;
4545
46+ /**
47+ * Port used if no port number is specified in properties
48+ *
49+ * FIXME: This should be a default for all adaptors // Hugi 2021-12-31
50+ */
51+ private static final int DEFAULT_PORT_NUMBER = 1200 ;
52+
4653 @ Override
4754 public void start ( NGApplication application ) {
4855 _application = application ;
4956
50- final int port = 1200 ;
57+ Integer port = application .properties ().d ().propWOPort (); // FIXME: Ugly way to get the port number
58+
59+ if ( port == null ) {
60+ logger .warn ( "port property is not set, defaulting to port {}" , DEFAULT_PORT_NUMBER );
61+ port = DEFAULT_PORT_NUMBER ;
62+ }
5163
5264 final Server server = new Server ();
5365
You can’t perform that action at this time.
0 commit comments