protected boolean shouldDeduceEnvironments() {
        if (deduceEnvironments != null) {
            if (LOG.isDebugEnabled()) {
                LOG.debug("Environment deduction was set explicitly via builder to: " + deduceEnvironments);
            }

            return deduceEnvironments;
        } else {
            String deduceProperty = System.getProperty(Environment.DEDUCE_ENVIRONMENT_PROPERTY);
            String deduceEnv = System.getenv(Environment.DEDUCE_ENVIRONMENT_ENV);

            if (StringUtils.isNotEmpty(deduceEnv)) {
                boolean deduce = Boolean.valueOf(deduceEnv);
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Environment deduction was set via environment variable to: " + deduce);
                }
                return deduce;
            } else if (StringUtils.isNotEmpty(deduceProperty)) {
                boolean deduce = Boolean.valueOf(deduceProperty);
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Environment deduction was set via system property to: " + deduce);
                }
                return deduce;
            } else {
                boolean deduceDefault = DEDUCE_ENVIRONMENT_DEFAULT;
                if (LOG.isDebugEnabled()) {
                    LOG.debug("Environment deduction is using the default of: " + deduceDefault);
                }
                return deduceDefault;
            }
        }
    }
protected boolean shouldDeduceEnvironments ( ) { if ( deduceEnvironments != null ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Environment deduction was set explicitly via builder to: " + deduceEnvironments ) ; } return deduceEnvironments ; } else { String deduceProperty = System . getProperty ( Environment . DEDUCE_ENVIRONMENT_PROPERTY ) ; String deduceEnv = System . getenv ( Environment . DEDUCE_ENVIRONMENT_ENV ) ; if ( StringUtils . isNotEmpty ( deduceEnv ) ) { boolean deduce = Boolean . valueOf ( deduceEnv ) ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Environment deduction was set via environment variable to: " + deduce ) ; } return deduce ; } else if ( StringUtils . isNotEmpty ( deduceProperty ) ) { boolean deduce = Boolean . valueOf ( deduceProperty ) ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Environment deduction was set via system property to: " + deduce ) ; } return deduce ; } else { boolean deduceDefault = DEDUCE_ENVIRONMENT_DEFAULT ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Environment deduction is using the default of: " + deduceDefault ) ; } return deduceDefault ; } } }
@return Whether environment names and packages should be deduced