public Map<String,String> merge(Map<String,String> curProps,Map<String,String> newProps) throws IOException {
  Map<String,String> props=new HashMap<>(newProps);
  for (  Map.Entry<String,String> e : curProps.entrySet()) {
    String name=e.getKey();
    String curValue=e.getValue();
    if (props.containsKey(name)) {
      props.put(name,curValue);
    }
  }
  return props;
}

public Map < String , String > merge ( Map < String , String > curProps , Map < String , String > newProps ) throws IOException { Map < String , String > props = new HashMap < > ( newProps ) ; for ( Map . Entry < String , String > e : curProps . entrySet ( ) ) { String name = e . getKey ( ) ; String curValue = e . getValue ( ) ; if ( props . containsKey ( name ) ) { props . put ( name , curValue ) ; } } return props ; }
merges two bunches of the properties from current and new configurations .
