Open aleksandar-stefanovic opened 2 years ago
The code at question is at TableView.kt, around line ~148:
TableView.kt
fun <T, S> TableColumn<T, S?>.converter(converter: StringConverter<in S>): TableColumn<T, S?> = apply { cellFormat(FX.defaultScope) { text = converter.toString(it) } }
It requires that the S type parameter is null, so the following code doesn't work:
S
column("Column name", MyObject::myNonNullProperty).converter(MyCustomTypeConverter)
The fix would be to remove question marks from the S type parameter, so that it can resolve to both null and non-null types, i.e. it doesn't break the API, just makes it available, in addition, to non-null types.
The code at question is at
TableView.kt
, around line ~148:It requires that the
S
type parameter is null, so the following code doesn't work:The fix would be to remove question marks from the
S
type parameter, so that it can resolve to both null and non-null types, i.e. it doesn't break the API, just makes it available, in addition, to non-null types.