protected Map < String , String > getWithoutLabels ( String labelExpression , TestContext context ) { Map < String , String > labels = new HashMap <> ( ) ; Set < String > values = StringUtils . commaDelimitedListToSet ( labelExpression ) ; for ( String item : values ) { if ( item . contains ( "!=" ) ) { labels . put ( context . replaceDynamicContentInString ( item . substring ( 0 , item . indexOf ( "!=" ) ) ) , context . replaceDynamicContentInString ( item . substring ( item . indexOf ( "!=" ) + 2 ) ) ) ; } else if ( item . startsWith ( "!" ) ) { labels . put ( context . replaceDynamicContentInString ( item . substring ( 1 ) ) , null ) ; } } return labels ; }
Reads without labels from expression string .