Skip to content

Commit 35daec8

Browse files
committed
Client:解决APIJSONTest工程中RequestActivity#onHttpResponse内封装类型null转基本类型崩溃
1 parent cb37f50 commit 35daec8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

APIJSON-Android/APIJSON-ADT/APIJSONTest/src/apijson/demo/ui/RequestActivity.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
import apijson.demo.HttpManager.OnHttpResponseListener;
4040
import apijson.demo.R;
4141
import apijson.demo.StringUtil;
42+
import apijson.demo.model.BaseModel;
4243
import apijson.demo.model.Moment;
4344
import apijson.demo.model.Wallet;
4445

@@ -233,7 +234,7 @@ public void onHttpResponse(int requestCode, final String resultJson, final Excep
233234

234235
if ("post".equals(method)) {
235236
Moment moment = response.getObject(Moment.class);
236-
id = moment == null ? 0 : moment.getId();
237+
id = moment == null ? 0 : BaseModel.value(moment.getId());
237238
Log.d(TAG, "onHttpResponse post.equals(method) >> id = " + id);
238239

239240
} else if ("put".equals(method)) {

0 commit comments

Comments
 (0)