File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
modules/jooby-run/src/main/java/org/jooby/run Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -441,13 +441,15 @@ private void startApp(final List<String> args) {
441441 Field reffld = appref .getDeclaredField ("ref" );
442442 AtomicReference ref = (AtomicReference ) reffld .get (null );
443443 this .app = ref .get ();
444- Method started = app .getClass ().getMethod ("isStarted" );
445- Boolean success = (Boolean ) started .invoke (this .app );
446- if (success ) {
447- debug ("started: %s" , alias );
448- } else {
449- debug ("not started: %s" , alias );
450- System .exit (1 );
444+ if (this .app != null ) {
445+ Method started = app .getClass ().getMethod ("isStarted" );
446+ Boolean success = (Boolean ) started .invoke (this .app );
447+ if (success ) {
448+ debug ("started: %s" , alias );
449+ } else {
450+ debug ("not started: %s" , alias );
451+ System .exit (1 );
452+ }
451453 }
452454 } catch (Throwable ex ) {
453455 Throwable cause = ex ;
You can’t perform that action at this time.
0 commit comments