Replace deprecated SonarQube logger with SLF4J#374
Merged
Conversation
Fixed issues: - AZggADINxdvKFWvLKVB_ for java:S1874 rule - AZggADINxdvKFWvLKVCA for java:S1874 rule - AZggADG_xdvKFWvLKVB8 for java:S1874 rule - AZggADG_xdvKFWvLKVB9 for java:S1874 rule - AZggADIYxdvKFWvLKVCB for java:S1874 rule Generated by SonarQube Agent (task: 51ba4474-6aeb-4612-810b-885c2c74591b)
vdiez
approved these changes
Jun 9, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




This change replaces deprecated logging API usage across three files in the Flex plugin by importing and using SLF4J Logger and LoggerFactory instead of the obsolete SonarQube logging classes. Modernizing to SLF4J ensures compatibility with current SonarQube versions and eliminates deprecation warnings.
View Project in SonarCloud
Fixed Issues
java:S1874 - Remove this use of "Logger"; it is deprecated. • MINOR • View issue
Location:
sonar-flex-plugin/src/main/java/org/sonar/plugins/flex/FlexSquidSensor.java:65Why is this an issue?
Code is sometimes annotated as deprecated by developers maintaining libraries or APIs to indicate that the method, class, or other programming element is no longer recommended for use. This is typically due to the introduction of a newer or more effective alternative. For example, when a better solution has been identified, or when the existing code presents potential errors or security risks.
What changed
Adds the new non-deprecated imports for
org.slf4j.Loggerandorg.slf4j.LoggerFactory, which replace the deprecatedorg.sonar.api.utils.log.Loggerandorg.sonar.api.utils.log.Loggersclasses. This is necessary to support the replacement of the deprecated logger usage on line 65.java:S1874 - Remove this use of "Loggers"; it is deprecated. • MINOR • View issue
Location:
sonar-flex-plugin/src/main/java/org/sonar/plugins/flex/FlexSquidSensor.java:65Why is this an issue?
Code is sometimes annotated as deprecated by developers maintaining libraries or APIs to indicate that the method, class, or other programming element is no longer recommended for use. This is typically due to the introduction of a newer or more effective alternative. For example, when a better solution has been identified, or when the existing code presents potential errors or security risks.
What changed
Adds the new non-deprecated imports for
org.slf4j.Loggerandorg.slf4j.LoggerFactory, which replace the deprecatedorg.sonar.api.utils.log.Loggerandorg.sonar.api.utils.log.Loggersclasses. This is necessary to support the replacement of the deprecated logger usage on line 65.java:S1874 - Remove this use of "Logger"; it is deprecated. • MINOR • View issue
Location:
sonar-flex-plugin/src/main/java/org/sonar/plugins/flex/cobertura/CoberturaReportParser.java:45Why is this an issue?
Code is sometimes annotated as deprecated by developers maintaining libraries or APIs to indicate that the method, class, or other programming element is no longer recommended for use. This is typically due to the introduction of a newer or more effective alternative. For example, when a better solution has been identified, or when the existing code presents potential errors or security risks.
What changed
Adds the import statements for
org.slf4j.Loggerandorg.slf4j.LoggerFactory, which are the non-deprecated replacements for the deprecatedorg.sonar.api.utils.log.Loggerandorg.sonar.api.utils.log.Loggers. This supports the migration away from the deprecated SonarQube logging API.java:S1874 - Remove this use of "Logger"; it is deprecated. • MINOR • View issue
Location:
sonar-flex-plugin/src/main/java/org/sonar/plugins/flex/cobertura/CoberturaSensor.java:32Why is this an issue?
Code is sometimes annotated as deprecated by developers maintaining libraries or APIs to indicate that the method, class, or other programming element is no longer recommended for use. This is typically due to the introduction of a newer or more effective alternative. For example, when a better solution has been identified, or when the existing code presents potential errors or security risks.
What changed
Adds the new non-deprecated imports for org.slf4j.Logger and org.slf4j.LoggerFactory, which replace the deprecated org.sonar.api.utils.log.Logger and org.sonar.api.utils.log.Loggers. This hunk provides the necessary imports for the replacement logging classes used in Hunk 3.
java:S1874 - Remove this use of "Loggers"; it is deprecated. • MINOR • View issue
Location:
sonar-flex-plugin/src/main/java/org/sonar/plugins/flex/cobertura/CoberturaSensor.java:32Why is this an issue?
Code is sometimes annotated as deprecated by developers maintaining libraries or APIs to indicate that the method, class, or other programming element is no longer recommended for use. This is typically due to the introduction of a newer or more effective alternative. For example, when a better solution has been identified, or when the existing code presents potential errors or security risks.
What changed
Adds the new non-deprecated imports for org.slf4j.Logger and org.slf4j.LoggerFactory, which replace the deprecated org.sonar.api.utils.log.Logger and org.sonar.api.utils.log.Loggers. This hunk provides the necessary imports for the replacement logging classes used in Hunk 3.
SonarQube Remediation Agent uses AI. Check for mistakes.