[Roots UI, minor] Use @JvmOverloads instead of secondary constructor

GitOrigin-RevId: e5cc87716a5ad1a6717e308ad32833f5cf72de6b
This commit is contained in:
Ilya Muradyan
2023-08-29 22:26:53 +00:00
committed by intellij-monorepo-bot
parent f095dc7dae
commit 72e08dc18d
@@ -17,14 +17,12 @@ import org.jetbrains.annotations.Nls
import org.jetbrains.annotations.NonNls
import javax.swing.DefaultComboBoxModel
abstract class LanguageLevelCombo(
abstract class LanguageLevelCombo @JvmOverloads constructor(
defaultItem: @Nls String?,
// It could be an open method but since we use it in constructor we have a leaking this problem
levelFilter: (LanguageLevel) -> Boolean
levelFilter: (LanguageLevel) -> Boolean = {true}
) : ComboBox<Any>() {
constructor(defaultItem: @Nls String?): this(defaultItem, {true})
init {
val items = mutableListOf<Any>()
items.add(defaultItem ?: "")