Skip to content

Commit

Permalink
Required bangs
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacSweers committed Nov 16, 2023
1 parent 13dab64 commit f7927f0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/com/slack/auto/value/kotlin/AvkBuilder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ public data class AvkBuilder(
} else {
"addAll"
}
addStatement("%N.$addMethod(%N)", builderPropSpec, propSpec)
addStatement("%N!!.$addMethod(%N)", builderPropSpec, propSpec)
addStatement("%N = null", propSpec)
endControlFlow()
}
}
.endControlFlow()
.addStatement("return·%N", builderPropSpec)
.addStatement("return·%N!!", builderPropSpec)
.build()
builder.addFunction(funSpec)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,11 @@ class AutoValueKotlinExtensionTest {
if (requiredBuildableCollectionBuilder == null) {
requiredBuildableCollectionBuilder = ImmutableList.builder()
if (requiredBuildableCollection != null) {
requiredBuildableCollectionBuilder.addAll(requiredBuildableCollection)
requiredBuildableCollectionBuilder!!.addAll(requiredBuildableCollection)
requiredBuildableCollection = null
}
}
return requiredBuildableCollectionBuilder
return requiredBuildableCollectionBuilder!!
}
internal fun requiredBuildableCollection(`value`: ImmutableList<String>): Builder {
Expand Down

0 comments on commit f7927f0

Please sign in to comment.