diff --git a/java-checks/src/main/java/org/sonar/java/filters/BaseTreeVisitorIssueFilter.java b/java-checks/src/main/java/org/sonar/java/filters/BaseTreeVisitorIssueFilter.java index 5fc29bb2e8a..023b4ff8464 100644 --- a/java-checks/src/main/java/org/sonar/java/filters/BaseTreeVisitorIssueFilter.java +++ b/java-checks/src/main/java/org/sonar/java/filters/BaseTreeVisitorIssueFilter.java @@ -90,9 +90,7 @@ final void excludeLines(@Nullable Tree tree, Class rule) { @SafeVarargs final void excludeLines(@Nullable Tree tree, Class... rules) { - for (Class rule : rules) { excludeLinesIfTrue(true, tree, rules); - } } @SafeVarargs diff --git a/java-symbolic-execution/java-symbolic-execution-plugin/src/main/java/org/sonar/java/cfg/package-info.java b/java-symbolic-execution/java-symbolic-execution-plugin/src/main/java/org/sonar/java/cfg/package-info.java new file mode 100644 index 00000000000..405b1dbf178 --- /dev/null +++ b/java-symbolic-execution/java-symbolic-execution-plugin/src/main/java/org/sonar/java/cfg/package-info.java @@ -0,0 +1,24 @@ +/* + * SonarQube Java + * Copyright (C) 2012-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +@ParametersAreNonnullByDefault +package org.sonar.java.cfg; + +import javax.annotation.ParametersAreNonnullByDefault; + diff --git a/java-symbolic-execution/java-symbolic-execution-plugin/src/main/java/org/sonar/java/package-info.java b/java-symbolic-execution/java-symbolic-execution-plugin/src/main/java/org/sonar/java/package-info.java new file mode 100644 index 00000000000..02ef1f2bba9 --- /dev/null +++ b/java-symbolic-execution/java-symbolic-execution-plugin/src/main/java/org/sonar/java/package-info.java @@ -0,0 +1,24 @@ +/* + * SonarQube Java + * Copyright (C) 2012-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +@ParametersAreNonnullByDefault +package org.sonar.java; + +import javax.annotation.ParametersAreNonnullByDefault; + diff --git a/java-symbolic-execution/java-symbolic-execution-plugin/src/main/java/org/sonar/java/se/plugin/package-info.java b/java-symbolic-execution/java-symbolic-execution-plugin/src/main/java/org/sonar/java/se/plugin/package-info.java new file mode 100644 index 00000000000..80599ec0833 --- /dev/null +++ b/java-symbolic-execution/java-symbolic-execution-plugin/src/main/java/org/sonar/java/se/plugin/package-info.java @@ -0,0 +1,24 @@ +/* + * SonarQube Java + * Copyright (C) 2012-2024 SonarSource SA + * mailto:info AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +@ParametersAreNonnullByDefault +package org.sonar.java.se.plugin; + +import javax.annotation.ParametersAreNonnullByDefault; + diff --git a/sonar-java-plugin/src/main/java/org/sonar/plugins/java/JavaSensor.java b/sonar-java-plugin/src/main/java/org/sonar/plugins/java/JavaSensor.java index 9904cb344b9..88b759914c2 100644 --- a/sonar-java-plugin/src/main/java/org/sonar/plugins/java/JavaSensor.java +++ b/sonar-java-plugin/src/main/java/org/sonar/plugins/java/JavaSensor.java @@ -20,7 +20,6 @@ package org.sonar.plugins.java; import java.io.File; -import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashSet; @@ -44,7 +43,6 @@ import org.sonar.java.JavaFrontend; import org.sonar.java.Measurer; import org.sonar.java.SonarComponents; -import org.sonar.java.annotations.VisibleForTesting; import org.sonar.java.filters.PostAnalysisIssueFilter; import org.sonar.java.jsp.Jasper; import org.sonar.java.model.GeneratedFile; @@ -145,7 +143,7 @@ private static PerformanceMeasure.Duration createPerformanceMeasureReport(Sensor .appendMeasurementCost() .start("JavaSensor"); } - + private Collection runJasper(SensorContext context) { if (sonarComponents.isAutoScan()) {