public static List < String > loadListFromConf ( String paramKey , Map stormConf ) { Object obj = stormConf . get ( paramKey ) ; List < String > list = new LinkedList <> ( ) ; if ( obj == null ) return list ; if ( obj instanceof PersistentVector ) { list . addAll ( ( PersistentVector ) obj ) ; } else { // single value? list . add ( obj . toString ( ) ) ; } return list ; }
Return one or more Strings regardless of whether they are represented as a single String or a list in the config or an empty List if no value could be found for that key .