diff --git a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/LanguageLevelCombo.kt b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/LanguageLevelCombo.kt index 61992f6194ee..6f6be7196113 100644 --- a/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/LanguageLevelCombo.kt +++ b/java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/LanguageLevelCombo.kt @@ -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() { - constructor(defaultItem: @Nls String?): this(defaultItem, {true}) - init { val items = mutableListOf() items.add(defaultItem ?: "")