Don't wrap between throw and exception type

This commit is contained in:
Jake Wharton 2019-04-10 10:28:30 -04:00
parent 3994723c3c
commit bcb6fd4a4d

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()