This speeds up the check for list by first checking if key is not
null and searching for interface afterwards.
Change-Id: Id35da9d5dfc76f243fd7c800115c26a2d181558b
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
28423fa5964abe10e3950dd1e42052aafa9989d0)
«generateCopyAugmentation(implType)»
«ENDIF»
«val allProps = new ArrayList(properties)»
- «val isList = implementsIfc(targetType, BindingTypes.identifiable(targetType))»
- «IF isList && keyType !== null»
+ «IF keyType !== null && implementsIfc(targetType, BindingTypes.identifiable(targetType))»
«val keyProps = new ArrayList((keyType as GeneratedTransferObject).properties)»
«keyProps.sort(KEY_PROPS_COMPARATOR)»
«FOR field : keyProps»