aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/sonar-xoo-plugin
diff options
context:
space:
mode:
authorWojtek Wajerowicz <115081248+wojciech-wajerowicz-sonarsource@users.noreply.github.com>2023-06-13 14:11:28 +0200
committersonartech <sonartech@sonarsource.com>2023-06-13 20:03:37 +0000
commit6c88709145ecf40500f5600d420e04c537f4c0a0 (patch)
tree5cca9ab49cb7335eb92ffe82025119b3441ac091 /plugins/sonar-xoo-plugin
parent64ae11abcdc2117c247a5364f2543144789ab175 (diff)
downloadsonarqube-6c88709145ecf40500f5600d420e04c537f4c0a0.tar.gz
sonarqube-6c88709145ecf40500f5600d420e04c537f4c0a0.zip
[NOJIRA] Remove usage of deprecated Loggers. (#8527)
Diffstat (limited to 'plugins/sonar-xoo-plugin')
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/coverage/AbstractCoverageSensor.java6
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/extensions/XooPostJob.java6
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/global/DeprecatedGlobalSensor.java6
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/global/GlobalProjectSensor.java6
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/LineMeasureSensor.java6
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/MeasureSensor.java6
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SignificantCodeSensor.java6
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SymbolReferencesSensor.java6
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SyntaxHighlightingSensor.java6
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/AnalysisErrorSensor.java6
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/scm/XooIgnoreCommand.java6
-rw-r--r--plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/scm/XooScmProvider.java9
12 files changed, 37 insertions, 38 deletions
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/coverage/AbstractCoverageSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/coverage/AbstractCoverageSensor.java
index 9b6c3823073..1aad073ff5f 100644
--- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/coverage/AbstractCoverageSensor.java
+++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/coverage/AbstractCoverageSensor.java
@@ -31,12 +31,12 @@ import org.sonar.api.batch.sensor.Sensor;
import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.batch.sensor.SensorDescriptor;
import org.sonar.api.batch.sensor.coverage.NewCoverage;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.sonar.xoo.Xoo;
public abstract class AbstractCoverageSensor implements Sensor {
- private static final Logger LOG = Loggers.get(AbstractCoverageSensor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(AbstractCoverageSensor.class);
private void processCoverage(InputFile inputFile, SensorContext context) {
File coverageFile = new File(inputFile.file().getParentFile(), inputFile.file().getName() + getCoverageExtension());
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/extensions/XooPostJob.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/extensions/XooPostJob.java
index a18816969a3..49d5f2d15df 100644
--- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/extensions/XooPostJob.java
+++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/extensions/XooPostJob.java
@@ -22,12 +22,12 @@ package org.sonar.xoo.extensions;
import org.sonar.api.batch.postjob.PostJob;
import org.sonar.api.batch.postjob.PostJobContext;
import org.sonar.api.batch.postjob.PostJobDescriptor;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class XooPostJob implements PostJob {
- private static final Logger LOG = Loggers.get(XooPostJob.class);
+ private static final Logger LOG = LoggerFactory.getLogger(XooPostJob.class);
@Override
public void describe(PostJobDescriptor descriptor) {
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/global/DeprecatedGlobalSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/global/DeprecatedGlobalSensor.java
index fd5e82b60c7..1ae3b22b577 100644
--- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/global/DeprecatedGlobalSensor.java
+++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/global/DeprecatedGlobalSensor.java
@@ -22,12 +22,12 @@ package org.sonar.xoo.global;
import org.sonar.api.batch.sensor.Sensor;
import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.batch.sensor.SensorDescriptor;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class DeprecatedGlobalSensor implements Sensor {
- private static final Logger LOG = Loggers.get(DeprecatedGlobalSensor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(DeprecatedGlobalSensor.class);
public static final String ENABLE_PROP = "sonar.scanner.mediumtest.deprecatedGlobalSensor";
@Override
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/global/GlobalProjectSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/global/GlobalProjectSensor.java
index 2414666c193..0984e94b640 100644
--- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/global/GlobalProjectSensor.java
+++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/global/GlobalProjectSensor.java
@@ -22,12 +22,12 @@ package org.sonar.xoo.global;
import org.sonar.api.scanner.sensor.ProjectSensor;
import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.batch.sensor.SensorDescriptor;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
public class GlobalProjectSensor implements ProjectSensor {
- private static final Logger LOG = Loggers.get(GlobalProjectSensor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(GlobalProjectSensor.class);
public static final String ENABLE_PROP = "sonar.scanner.mediumtest.globalSensor";
@Override
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/LineMeasureSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/LineMeasureSensor.java
index 45c1bbeb742..5cb7c2de494 100644
--- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/LineMeasureSensor.java
+++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/LineMeasureSensor.java
@@ -32,8 +32,8 @@ import org.sonar.api.batch.sensor.SensorDescriptor;
import org.sonar.api.measures.FileLinesContext;
import org.sonar.api.measures.FileLinesContextFactory;
import org.sonar.api.utils.KeyValueFormat;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.sonar.xoo.Xoo;
/**
@@ -41,7 +41,7 @@ import org.sonar.xoo.Xoo;
*/
public class LineMeasureSensor implements Sensor {
- private static final Logger LOG = Loggers.get(LineMeasureSensor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(LineMeasureSensor.class);
private static final String MEASURES_EXTENSION = ".linemeasures";
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/MeasureSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/MeasureSensor.java
index 63b75424caa..cd4185b2240 100644
--- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/MeasureSensor.java
+++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/MeasureSensor.java
@@ -33,8 +33,8 @@ import org.sonar.api.batch.sensor.Sensor;
import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.batch.sensor.SensorDescriptor;
import org.sonar.api.batch.sensor.measure.NewMeasure;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.sonar.xoo.Xoo;
import org.sonar.xoo.Xoo2;
@@ -43,7 +43,7 @@ import org.sonar.xoo.Xoo2;
*/
public class MeasureSensor implements Sensor {
- private static final Logger LOG = Loggers.get(MeasureSensor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(MeasureSensor.class);
private static final String MEASURES_EXTENSION = ".measures";
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SignificantCodeSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SignificantCodeSensor.java
index dc7cb46a36c..64166d1a6ab 100644
--- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SignificantCodeSensor.java
+++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SignificantCodeSensor.java
@@ -29,12 +29,12 @@ import org.sonar.api.batch.sensor.Sensor;
import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.batch.sensor.SensorDescriptor;
import org.sonar.api.batch.sensor.code.NewSignificantCode;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.sonar.xoo.Xoo;
public class SignificantCodeSensor implements Sensor {
- private static final Logger LOG = Loggers.get(SignificantCodeSensor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(SignificantCodeSensor.class);
private static final String FILE_EXTENSION = ".significantCode";
@Override
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SymbolReferencesSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SymbolReferencesSensor.java
index 9dd8a659a05..0a5d4a111c9 100644
--- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SymbolReferencesSensor.java
+++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SymbolReferencesSensor.java
@@ -32,8 +32,8 @@ import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.batch.sensor.SensorDescriptor;
import org.sonar.api.batch.sensor.symbol.NewSymbol;
import org.sonar.api.batch.sensor.symbol.NewSymbolTable;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.sonar.xoo.Xoo;
import static java.lang.Integer.parseInt;
@@ -43,7 +43,7 @@ import static java.lang.Integer.parseInt;
*/
public class SymbolReferencesSensor implements Sensor {
- private static final Logger LOG = Loggers.get(SymbolReferencesSensor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(SymbolReferencesSensor.class);
private static final String SYMBOL_EXTENSION = ".symbol";
private void processFileSymbol(InputFile inputFile, SensorContext context) {
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SyntaxHighlightingSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SyntaxHighlightingSensor.java
index 75ee8488b31..6e10373d972 100644
--- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SyntaxHighlightingSensor.java
+++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/SyntaxHighlightingSensor.java
@@ -30,8 +30,8 @@ import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.batch.sensor.SensorDescriptor;
import org.sonar.api.batch.sensor.highlighting.NewHighlighting;
import org.sonar.api.batch.sensor.highlighting.TypeOfText;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.sonar.xoo.Xoo;
import static java.lang.Integer.parseInt;
@@ -41,7 +41,7 @@ import static java.lang.Integer.parseInt;
*/
public class SyntaxHighlightingSensor implements Sensor {
- private static final Logger LOG = Loggers.get(SyntaxHighlightingSensor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(SyntaxHighlightingSensor.class);
private static final String HIGHLIGHTING_EXTENSION = ".highlighting";
private void processFileHighlighting(InputFile inputFile, SensorContext context) {
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/AnalysisErrorSensor.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/AnalysisErrorSensor.java
index 22b17fb6215..2315c593e04 100644
--- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/AnalysisErrorSensor.java
+++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/rule/AnalysisErrorSensor.java
@@ -29,12 +29,12 @@ import org.sonar.api.batch.fs.InputFile;
import org.sonar.api.batch.sensor.Sensor;
import org.sonar.api.batch.sensor.SensorContext;
import org.sonar.api.batch.sensor.SensorDescriptor;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.sonar.xoo.Xoo;
public class AnalysisErrorSensor implements Sensor {
- private static final Logger LOG = Loggers.get(AnalysisErrorSensor.class);
+ private static final Logger LOG = LoggerFactory.getLogger(AnalysisErrorSensor.class);
private static final String ERROR_EXTENSION = ".error";
@Override
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/scm/XooIgnoreCommand.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/scm/XooIgnoreCommand.java
index eab0a0116b9..002e4fc02ce 100644
--- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/scm/XooIgnoreCommand.java
+++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/scm/XooIgnoreCommand.java
@@ -23,8 +23,8 @@ import java.io.File;
import java.nio.file.Path;
import org.apache.commons.io.FilenameUtils;
import org.sonar.api.batch.scm.IgnoreCommand;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* To ignore a file simply add an empty file with the same name as the file to ignore with a .ignore suffix.
@@ -33,7 +33,7 @@ import org.sonar.api.utils.log.Loggers;
public class XooIgnoreCommand implements IgnoreCommand {
static final String IGNORE_FILE_EXTENSION = ".ignore";
- private static final Logger LOG = Loggers.get(XooIgnoreCommand.class);
+ private static final Logger LOG = LoggerFactory.getLogger(XooIgnoreCommand.class);
private boolean isInit;
@Override
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/scm/XooScmProvider.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/scm/XooScmProvider.java
index c70bbc367e1..a98462b21d1 100644
--- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/scm/XooScmProvider.java
+++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/scm/XooScmProvider.java
@@ -19,6 +19,7 @@
*/
package org.sonar.xoo.scm;
+import java.io.File;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.FileVisitResult;
@@ -34,16 +35,14 @@ import java.util.Map;
import java.util.Set;
import javax.annotation.CheckForNull;
import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.sonar.api.batch.scm.BlameCommand;
import org.sonar.api.batch.scm.IgnoreCommand;
import org.sonar.api.batch.scm.ScmProvider;
-import java.io.File;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
-
public class XooScmProvider extends ScmProvider {
- private static final Logger LOG = Loggers.get(XooScmProvider.class);
+ private static final Logger LOG = LoggerFactory.getLogger(XooScmProvider.class);
private static final String SCM_EXTENSION = ".scm";
private final XooBlameCommand blame;