private void setOverride ( final String key , final String value ) { final boolean doSecurely = key . startsWith ( "_" ) ; final String fullKey = defaultEnvironment + "." + key ; if ( value != null ) { final String oldValue = _getProperty ( "" , key , null ) ; if ( value . equals ( oldValue ) ) { // Same value, not really an override. if ( doSecurely ) { logger . warning ( "*** IGNORED *** Ignoring redundant override " + fullKey + "=***PROTECTED***" ) ; } else { logger . warning ( "*** IGNORED *** Ignoring redundant override " + fullKey + "='" + value + "'" ) ; } } else { logger . warning ( "*** OVERRIDE *** Setting override " + fullKey ) ; if ( doSecurely ) { logger . warning ( " New value=***PROTECTED***" ) ; logger . warning ( " Old value='" + oldValue + "'" ) ; } else { logger . warning ( " New value='" + value + "'" ) ; logger . warning ( " Old value='" + oldValue + "'" ) ; } allProperties . setProperty ( fullKey , value ) ; } } }
Replaces whatever was in the allProperties object and clears the cache .