Skip to content

Commit

Permalink
prevent collection allocation with stdlib any util
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoferrer committed Jun 18, 2019
1 parent e7ecd02 commit ff8fc0b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ object ProtoBuildersGenerator : Generator {

fileSpecBuilder.addFunctions(buildNestedBuildersForMessage(protoType))

if (protoType.nestedMessageTypes.filterNot { it.isMapEntry }.isNotEmpty()) {
if (protoType.nestedMessageTypes.any { !it.isMapEntry }) {
addType(
TypeSpec.objectBuilder(protoType.name)
.buildFunSpecsForTypes(fileSpecBuilder, protoType.nestedMessageTypes)
Expand Down

0 comments on commit ff8fc0b

Please sign in to comment.