优化:RulesList.getJavaChecks()方法,由Collections替换为List.of()

wuhaoyang
Guo XIn 11 months ago
parent e9897ca9cf
commit dfc1d819d1
  1. 5
      sonar-keyware-plugins-java/src/main/java/com/keyware/sonar/java/rules/RulesList.java

@ -10,7 +10,6 @@ import com.keyware.sonar.java.rules.checkers.*;
import org.sonar.plugins.java.api.JavaCheck;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
@ -30,14 +29,14 @@ public final class RulesList {
* These rules are going to target MAIN code only
*/
public static List<Class<? extends JavaCheck>> getJavaChecks() {
return Collections.unmodifiableList(Arrays.asList(
return List.of(
ABCVarNameChecker.class,
AbsolutePathDetectorChecker.class,
PathAndKeywordCheck.class,
DynamicCodeChecker.class,
SystemFunctionChecker.class,
DynamicLibraryLoadChecker.class
));
);
}
/**

Loading…
Cancel
Save