@VisibleForTesting protected Map<String,String> calculateModifiedServerDefaults(Map<String,String> newDefaults,Map<String,String> existingDefaults,Set<String> attrToModify){
  Map<String,String> modifiedValues=new HashMap<String,String>();
  for (  String attrName : attrToModify) {
    String newAttr=newDefaults.get(attrName);
    String existingAttr=existingDefaults.get(attrName);
    if (newAttr != null && existingAttr != null && !newAttr.equals(existingAttr)) {
      modifiedValues.put(attrName,newAttr);
    }
  }
  return modifiedValues;
}

@ VisibleForTesting protected Map < String , String > calculateModifiedServerDefaults ( Map < String , String > newDefaults , Map < String , String > existingDefaults , Set < String > attrToModify ) { Map < String , String > modifiedValues = new HashMap < String , String > ( ) ; for ( String attrName : attrToModify ) { String newAttr = newDefaults . get ( attrName ) ; String existingAttr = existingDefaults . get ( attrName ) ; if ( newAttr != null && existingAttr != null && ! newAttr . equals ( existingAttr ) ) { modifiedValues . put ( attrName , newAttr ) ; } } return modifiedValues ; }
only include in the list of modified attributes those that are listed in the serverupgrade . properites file ; otherwise existing properties that have been locally modified would be over - written .
