i'm seeing some behavior with `UnnecessaryApply` t...
# detekt
s
i'm seeing some behavior with
UnnecessaryApply
that i'm not sure about.
Copy code
val view = FrameLayout(context).apply {
    background = ColorDrawable(ContextCompat.getColor(context, R.color.white))
}
This is saying it's unnecessary. But I'm not sure how I'd both set the background and return the
FrameLayout
without an
apply
.
m
Sounds like a false positive. Can you open an issue with the code snippet?
s
sure
rturbosch/detekt/issues/1305
m
Thanks for reporting!