private static void _initialFillSet ( @ Nonnull final ICommonsOrderedSet < String > aSet , @ Nullable final String sItemList , final boolean bUnify ) { ValueEnforcer . notNull ( aSet , "Set" ) ; if ( ! aSet . isEmpty ( ) ) throw new IllegalArgumentException ( "The provided set must be empty, but it is not: " + aSet ) ; if ( StringHelper . hasText ( sItemList ) ) { // Perform some default replacements to avoid updating all references at // once before splitting final String sRealItemList = StringHelper . replaceAll ( sItemList , EXTENSION_MACRO_WEB_DEFAULT , "js,css,png,jpg,jpeg,gif,eot,svg,ttf,woff,woff2,map" ) ; for ( final String sItem : StringHelper . getExploded ( ' ' , sRealItemList ) ) { String sRealItem = sItem . trim ( ) ; if ( bUnify ) sRealItem = getUnifiedItem ( sRealItem ) ; // Add only non-empty items if ( StringHelper . hasText ( sRealItem ) ) aSet . add ( sRealItem ) ; } } }
Helper function to convert the configuration string to a collection .