File tree Expand file tree Collapse file tree
its/ruling/src/test/java/org/sonar/java/it Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 */
1717package org .sonar .java .it ;
1818
19- import com .google .common .base .Splitter ;
2019import com .sonar .orchestrator .build .Build ;
2120import com .sonar .orchestrator .build .BuildResult ;
2221import com .sonar .orchestrator .build .MavenBuild ;
@@ -78,11 +77,11 @@ public class JavaRulingTest {
7877 * mvn test -DsonarRules=S100,S101
7978 * }</pre>
8079 */
81- private static final Set <String > SUBSET_OF_ENABLED_RULES = Set . copyOf (
82- Splitter . on ( ',' ). trimResults (). omitEmptyStrings (). splitToList (
83- System . getProperty ( "sonarRules" , "" )
84- )
85- );
80+ private static final Set <String > SUBSET_OF_ENABLED_RULES =
81+ Arrays . stream ( System . getProperty ( "sonarRules" , "" ). split ( "," ))
82+ . map ( String :: trim )
83+ . filter ( s -> ! s . isEmpty () )
84+ . collect ( Collectors . toSet () );
8685
8786 @ ClassRule
8887 public static TemporaryFolder tmpDumpOldFolder = new TemporaryFolder ();
You can’t perform that action at this time.
0 commit comments