blob: 55559045a416c3bf3ce4c2e689c0cef658afa133 [file] [log] [blame] [edit]
<html>
<body>
<p>
This inspection reports non-<b>const</b> Kotlin properties used as Java annotation arguments.
It is possible for a property which is annotated with <b>@JvmField</b>,
has an initializer that can be evaluated at compile-time, has a primitive or <b>String</b> type.
Such properties have a <b>ConstantValue</b> attribute in bytecode in Kotlin 1.1-1.2.
This attribute allows javac to fold usages of the corresponding field and use that field in annotations.
This can cause incorrect behavior in case of separate or incremental compilation in mixed Java/Kotlin code.
</p>
<p>
This behavior is subject to change in Kotlin 1.3 (no <b>ConstantValue</b> attribute any more).
Recommended action: replace the <b>@JvmField</b> annotation with a <b>const</b> modifier on a relevant Kotlin property or inline it.
</p>
</body>
</html>