private static Map<String,String> parseEnvList(List<String> list){
  Map<String,String> map=new HashMap<>();
  if ((list == null) || (list.isEmpty())) {
    return map;
  }
  for (  String val : list) {
    if (debug.messageEnabled()) {
      debug.message("SAML2Utils.parseEnvList : processing " + val);
    }
    if ((val == null) || (val.length() == 0)) {
      continue;
    }
    int pos=val.indexOf("=");
    if (pos == -1) {
      if (debug.warningEnabled()) {
        debug.warning("SAML2Utils.parseEnvList : invalid value : " + val + ". Value must be in key=value format.");
      }
    }
 else {
      map.put(val.substring(0,pos),val.substring(pos + 1));
    }
  }
  return map;
}

private static Map < String , String > parseEnvList ( List < String > list ) { Map < String , String > map = new HashMap < > ( ) ; if ( ( list == null ) || ( list . isEmpty ( ) ) ) { return map ; } for ( String val : list ) { if ( debug . messageEnabled ( ) ) { debug . message ( "SAML2Utils.parseEnvList : processing " + val ) ; } if ( ( val == null ) || ( val . length ( ) == 0 ) ) { continue ; } int pos = val . indexOf ( "=" ) ; if ( pos == - 1 ) { if ( debug . warningEnabled ( ) ) { debug . warning ( "SAML2Utils.parseEnvList : invalid value : " + val + ". Value must be in key=value format." ) ; } } else { map . put ( val . substring ( 0 , pos ) , val . substring ( pos + 1 ) ) ; } } return map ; }
returns map based on a / v pair .
