Merge pull request #834 from square/jakew/dont-wrap/2019-04-10

Don't wrap between throw and exception type
This commit is contained in:
Jesse Wilson 2019-04-10 08:38:38 -07:00 committed by GitHub
commit 11a547023c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -308,7 +308,7 @@ internal class AdapterGenerator(
.addParameter(valueParam)
result.beginControlFlow("if (%N == null)", valueParam)
result.addStatement("throw %T(%S)", NullPointerException::class,
result.addStatement("throw·%T(%S)", NullPointerException::class,
"${valueParam.name} was null! Wrap in .nullSafe() to write nullable values.")
result.endControlFlow()