The kotlin-reflect library is required for fastjson2-kotlin
Reports usages of fastjson2 or fastjson2-kotlin in Kotlin code when kotlin-reflect is missing from the containing module's classpath.
According to the Fastjson2 documentation, kotlin-reflect is recommended when using Kotlin data classes or constructor-based parameter passing.
Without kotlin-reflect, constructor parameter names may not be resolved in some environments, which may cause deserialization of Kotlin classes to fail or produce incorrect results.
Locating this inspection
- By ID
Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.
Fastjson2MissingKotlinReflect- Via Settings dialog
Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.
Example:
The quick-fix adds a kotlin-reflect dependency to the affected module.
Quick-fix result in build.gradle.kts:
Quick-fix result in pom.xml:
Inspection ID: Fastjson2MissingKotlinReflect
Suppressing Inspection
You can suppress this inspection by placing the following comment marker before the code fragment where you no longer want messages from this inspection to appear:
More detailed instructions as well as other ways and options that you have can be found in the product documentation:
Inspection Details | |
|---|---|
By default bundled with: |