public static Boolean getEnvironmentBoolean ( String name , Boolean defaultValue ) { if ( envVars == null ) { throw new IllegalStateException ( "The environment vars must be provided before calling getEnvironmentBoolean." ) ; } String value = getEnvironmentString ( name , null ) ; if ( value == null ) { return defaultValue ; } else { return BOOLEAN_PATTERN . matcher ( value ) . matches ( ) ; } }
Retrieve boolean value for the environment variable name