mirror of
https://github.com/fankes/moshi.git
synced 2025-10-18 23:49:21 +08:00
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:
@@ -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()
|
||||
|
||||
|
Reference in New Issue
Block a user