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:
commit
11a547023c
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue