public static NinjaMode determineModeFromSystemPropertiesOrProdIfNotSet ( ) { Optional < NinjaMode > ninjaModeOptional = determineModeFromSystemProperties ( ) ; NinjaMode ninjaMode ; if ( ! ninjaModeOptional . isPresent ( ) ) { ninjaMode = NinjaMode . prod ; } else { ninjaMode = ninjaModeOptional . get ( ) ; } logger . info ( "Ninja is running in mode {}" , ninjaMode . toString ( ) ) ; return ninjaMode ; }
returns NinjaMode . dev if no mode is set . Or the valid mode set via a System Property called ninja . mode .