src/main/java/com/simpligility/maven/plugins/android/AbstractInstrumentationMojo.java
protected static String buildCommaSeparatedString( List<String> lines )
    {
        if ( lines == null || lines.size() == 0 )
        {
            return null;
        }

        List<String> strings = new ArrayList<String>( lines.size() );
        for ( String str : lines )
        { // filter out blank strings
            if ( StringUtils.isNotBlank( str ) )
            {
                strings.add( StringUtils.trimToEmpty( str ) );
            }
        }

        return StringUtils.join( strings, "," );
    }
protected static String buildCommaSeparatedString( List<String> lines )
    {
        if ( lines == null || lines.size() == 0 )
        {
            return null;
        }

        List<String> strings = new ArrayList<String>( lines.size() );
        for ( String str : lines )
        { // filter out blank strings
            if ( StringUtils.isNotBlank( str ) )
            {
                strings.add( StringUtils.trimToEmpty( str ) );
            }
        }

        return StringUtils.join( strings, "," );
    }
Helper method to build a comma separated string from a list.
Blank strings are filtered out

@param lines A list of strings
@return Comma separated String from given list