rewrite-static-analysis
rewrite-static-analysis copied to clipboard
Common static analysis recipe against micronaut-core drops Kotlin `override` and `companion` keywords
What version of OpenRewrite are you using?
I am using
- OpenRewrite v8.1.15+
- Moderne platform
- rewrite-static-analysis v1.0.5+
How are you running OpenRewrite?
Moderne platform; running https://app.moderne.io/recipes/org.openrewrite.staticanalysis.CommonStaticAnalysis against https://app.moderne.io/organizations/micronaut-projects/micronaut-core?branch=4.0.x&origin=github.com to produce https://github.com/micronaut-projects/micronaut-core/compare/4.0.x...timtebeek:micronaut-core:refactor/common-static-analysis-issues
What is the smallest, simplest way to reproduce the problem?
@Internal
@Experimental
class DelegatingContextContinuation(
private val continuation: Continuation<Any?>,
private val coroutineContext: CoroutineContext
) : Continuation<Any?>, CoroutineStackFrame {
- override val callerFrame: CoroutineStackFrame?
+ val callerFrame: CoroutineStackFrame?
get() = continuation as? CoroutineStackFrame
- override fun getStackTraceElement(): StackTraceElement? = null
+ fun getStackTraceElement(): StackTraceElement? = null
- override val context: CoroutineContext
+ val context: CoroutineContext
get() = coroutineContext
- override fun resumeWith(result: Result<Any?>) {
+ fun resumeWith(result: Result<Any?>) {
continuation.resumeWith(result)
}
}
What did you expect to see?
override val, override fun and companion object retained.
https://github.com/moderneinc/moderne-ui/issues/2843 is making it hard to show which recipes are involved exactly, as the full diff is large.