Unstable type is used in signature
Reports declarations of classes, methods, and fields that reference an unstable API type in the signature, but are not marked with the same unstable annotation.
This inspection ensures that the signatures of a public API do not expose any unstable (internal, experimental) types. For example, if a method returns an experimental class, the method itself is considered experimental because incompatible changes of the type (deletion or move to another package) lead to incompatible method signature changes.
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.
UnstableTypeUsedInSignature- 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.
Use the list below to specify which annotations mark an unstable API.
Inspection options
Here you can find the description of settings available for the Unstable type is used in signature inspection, and the reference of their default values.
- Unstable API annotations
Default value:
[org.jetbrains.annotations.ApiStatus.ScheduledForRemoval, org.jetbrains.annotations.ApiStatus.Experimental, org.jetbrains.annotations.ApiStatus.Internal, com.google.common.annotations.Beta, io.reactivex.annotations.Beta, io.reactivex.annotations.Experimental, rx.annotations.Experimental, rx.annotations.Beta, org.apache.http.annotation.Beta, org.gradle.api.Incubating]
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: |