Anyone know a way to make this more clear and conc...
# announcements
d
Anyone know a way to make this more clear and concise?
Copy code
var talentName: String = NameDisplayFormatterFactory.getNameFormatterInstance(SPACE_DELIMITED_FORMATTER, locale)
                      .formatName(talent.firstName, talent.middleName, talent.lastName, talent.nameTitle, talent.nameSuffix)
            talentName = if (order.w2Order.orElse(false)) order.icName.orElse(talentName) else talentName
a
Not necessarily more concise but maybe make extension properties/methods and do something like
val talentName = order.nameOrNull ?: talent.formattedName