From 2a48d30b9a470a307778c8d576237ed2484785d1 Mon Sep 17 00:00:00 2001 From: liujingxing <327744707@qq.com> Date: Sun, 20 Dec 2020 12:14:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BC=82=E5=B8=B8=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rxhttp/src/main/java/rxhttp/wrapper/param/BodyParam.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rxhttp/src/main/java/rxhttp/wrapper/param/BodyParam.kt b/rxhttp/src/main/java/rxhttp/wrapper/param/BodyParam.kt index 97ab9699..a8ef6793 100644 --- a/rxhttp/src/main/java/rxhttp/wrapper/param/BodyParam.kt +++ b/rxhttp/src/main/java/rxhttp/wrapper/param/BodyParam.kt @@ -77,7 +77,8 @@ class BodyParam( } override fun getRequestBody(): RequestBody { - return requestBody!! + return requestBody + ?: throw NullPointerException("requestBody cannot be null, please call the setBody series methods") } override fun add(key: String, value: Any): BodyParam {