False-Positive S2259 S2139

INFO: SonarScanner 5.0.1.3006
INFO: Java 17.0.7 Eclipse Adoptium (64-bit)
INFO: Linux 3.10.0-1160.el7.x86_64 amd64
INFO: User cache: /root/.sonar/cache
INFO: Analyzing on SonarQube server 9.9.2.77730
INFO: Default locale: "en_US", source code encoding: "UTF-8"
INFO: Load global settings

1、The info for “The following classes needed for analysis were missing:”
2、when use @Slf4j , java:S2139 will be report。it’s False-Positive。

@Slf4j
public class  a {
public List<String> d() {
       try {
            
        } catch (Exception e) {
         log.info(ExceptionUtils.getStackTrace(e));
     }
    return a;
 }
}

3、S2259 has same False-Positive。

Did the SonarQube rules analyze the “.class”? When i use sonar , i got many False-Positive.

Hello @maming123450,

Sorry for the late reply. Could you, please, clarify a few things here:

  1. How do you execute the analysis? Is it Maven or Gradle scanners?
  2. Have you built the project before the analysis?
  3. Do you see the same errors when building the project?
  4. Do you use Lombok?
  5. Could you please provide your sonar configuration (properties for sonar analysis)?

Best,
Margarita

1、I used Jenkins.
2、yes,its build over.
3、no,when building the project didnt have the same errors.
4、maybe, I am not sure.
5、sonar-scanner.properties
#Configure here general information about the environment, such as SonarQube server connection details for example
#No information about specific project should appear here

#----- Default SonarQube server
#sonar.host.url=http://localhost:9000

#----- Default source code encoding
#sonar.sourceEncoding=UTF-8
sonar.java.source=1.8

Could you please provide the real code, at least the full class/method where the issue is raised?
From your code, I can not see why the S2139 could be raised, as there is no Throw clause in it.