Skip to content

Commit bfe0b30

Browse files
[NO JIRA] Fix quality issues introduced in recent SE engine decoupling effort (#4808)
1 parent 52c9272 commit bfe0b30

5 files changed

Lines changed: 73 additions & 5 deletions

File tree

java-checks/src/main/java/org/sonar/java/filters/BaseTreeVisitorIssueFilter.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@ final void excludeLines(@Nullable Tree tree, Class<? extends JavaCheck> rule) {
9090

9191
@SafeVarargs
9292
final void excludeLines(@Nullable Tree tree, Class<? extends JavaCheck>... rules) {
93-
for (Class<? extends JavaCheck> rule : rules) {
9493
excludeLinesIfTrue(true, tree, rules);
95-
}
9694
}
9795

9896
@SafeVarargs
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* SonarQube Java
3+
* Copyright (C) 2012-2024 SonarSource SA
4+
* mailto:info AT sonarsource DOT com
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 3 of the License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19+
*/
20+
@ParametersAreNonnullByDefault
21+
package org.sonar.java.cfg;
22+
23+
import javax.annotation.ParametersAreNonnullByDefault;
24+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* SonarQube Java
3+
* Copyright (C) 2012-2024 SonarSource SA
4+
* mailto:info AT sonarsource DOT com
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 3 of the License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19+
*/
20+
@ParametersAreNonnullByDefault
21+
package org.sonar.java;
22+
23+
import javax.annotation.ParametersAreNonnullByDefault;
24+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* SonarQube Java
3+
* Copyright (C) 2012-2024 SonarSource SA
4+
* mailto:info AT sonarsource DOT com
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 3 of the License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19+
*/
20+
@ParametersAreNonnullByDefault
21+
package org.sonar.java.se.plugin;
22+
23+
import javax.annotation.ParametersAreNonnullByDefault;
24+

sonar-java-plugin/src/main/java/org/sonar/plugins/java/JavaSensor.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
package org.sonar.plugins.java;
2121

2222
import java.io.File;
23-
import java.util.ArrayList;
2423
import java.util.Collection;
2524
import java.util.Collections;
2625
import java.util.HashSet;
@@ -44,7 +43,6 @@
4443
import org.sonar.java.JavaFrontend;
4544
import org.sonar.java.Measurer;
4645
import org.sonar.java.SonarComponents;
47-
import org.sonar.java.annotations.VisibleForTesting;
4846
import org.sonar.java.filters.PostAnalysisIssueFilter;
4947
import org.sonar.java.jsp.Jasper;
5048
import org.sonar.java.model.GeneratedFile;
@@ -145,7 +143,7 @@ private static PerformanceMeasure.Duration createPerformanceMeasureReport(Sensor
145143
.appendMeasurementCost()
146144
.start("JavaSensor");
147145
}
148-
146+
149147

150148
private Collection<GeneratedFile> runJasper(SensorContext context) {
151149
if (sonarComponents.isAutoScan()) {

0 commit comments

Comments
 (0)