Unresolved imports/types have been detected during analysis (no lombok)

SonarQube server 9.3 community

------------------------------------------------------------
Gradle 7.4
------------------------------------------------------------

Build time:   2022-02-08 09:58:38 UTC
Revision:     f0d9291c04b90b59445041eaa75b2ee744162586

Kotlin:       1.5.31
Groovy:       3.0.9
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          17.0.1 (Oracle Corporation 17.0.1+12-LTS-39)
OS:           Windows 10 10.0 amd64
plugins({
    id("com.palantir.git-version").version("0.12.3")
    id("jacoco")
    id("java")
    id("java-gradle-plugin")
    id("idea")
    id("maven-publish")
    id("org.owasp.dependencycheck").version("6.5.3")
    id("org.sonarqube").version("3.3")
})

Steps to reproduce

.\gradlew.bat :sonarqube

Expected result
No warning

Actual result

Some strange warnings are observed.

Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.
Use of preview features have been detected during analysis. Enable DEBUG mode to see them.

With --debug output contains

[WARN] [org.sonarqube.gradle.SonarQubeTask] Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.
[DEBUG] [org.sonarqube.gradle.SonarQubeTask] Unresolved imports/types:
- XMLEvent cannot be resolved to a type
- XMLEventReader cannot be resolved to a type
- XMLInputFactory cannot be resolved to a type
- XMLStreamException cannot be resolved to a type
[WARN] [org.sonarqube.gradle.SonarQubeTask] Use of preview features have been detected during analysis. Enable DEBUG mode to see them.
[DEBUG] [org.sonarqube.gradle.SonarQubeTask] Use of preview features:
- No exception of type Object can be thrown; an exception type must be a subclass of Throwable
- The method getElementText() of type XMLEventReader0 must override or implement a supertype method
- The method getProperty(String) of type XMLEventReader0 must override or implement a supertype method
- The method hasNext() of type XMLEventReader0 must override or implement a supertype method
- The method map2Unchecked(Throwable) in the type Exceptions is not applicable for the arguments (Object)
- The method next() of type XMLEventReader0 must override or implement a supertype method
- The method nextEvent() of type XMLEventReader0 must override or implement a supertype method
- The method nextTag() of type XMLEventReader0 must override or implement a supertype method
- The method peek() of type XMLEventReader0 must override or implement a supertype method
- The package javax.xml is accessible from more than one module: <unnamed>, java.xml
- The package javax.xml.stream is accessible from more than one module: <unnamed>, java.xml
- The package javax.xml.stream.events is accessible from more than one module: <unnamed>, java.xml
- The type org.jetbrains.kotlin.cli.common.arguments.K2JVMCompilerArguments cannot be resolved. It is indirectly referenced from required .class files
- XMLConstants cannot be resolved to a variable
- XMLInputFactory cannot be resolved

All warnings are related to classes javax.xml.stream.*, which are inaccessible somehow during analysis.

Hi,

In general, warnings can be ignored. For the first one, it’s likely that analysis isn’t finding all your libraries.

 
HTH,
Ann

The thing is I use no libraries, other than JDK standard ones.