public void override ( String key , String value ) { if ( value == null || value . length ( ) == 0 ) { remove ( key ) ; return ; } int idx = key . indexOf ( ' ' ) ; if ( idx > 0 ) { String realKey = key . substring ( 0 , idx ) ; String v = get ( realKey ) ; if ( v == null ) v = value ; else { // we might be handling environment variables for a agent that can have different path separator // than the master, so the following is an attempt to get it right. // it's still more error prone that I'd like. char ch = platform == null ? File . pathSeparatorChar : platform . pathSeparator ; v = value + ch + v ; } put ( realKey , v ) ; return ; } put ( key , value ) ; }
Overrides the current entry by the given entry .