Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

NCMBObjectのgetDateでNullPointerException発生 #100

Closed
HiroHosono opened this issue Jan 20, 2017 · 0 comments
Closed

NCMBObjectのgetDateでNullPointerException発生 #100

HiroHosono opened this issue Jan 20, 2017 · 0 comments
Assignees

Comments

@HiroHosono
Copy link

不具合の概要(Description of bug)

iOS SDKを使用したアプリのAndroidへの移植時にNCMBObjectのgetDateでNullPointerException発生。

Dateフィールドに値を設定後、リセットするためにNullを設定後の読み出しで発生する。
*iOS SDKではnilが返却されます。
*Nullを設定する処理は下記の回答に基づき実施
NIFCLOUD-mbaas/UserCommunity#272

-SDKのバージョン(SDK version)
Ver.2.2.4
不具合が発生した環境(Environment requirement)
macOS Sierra
 Android studio2.2
NCMB Android SDK Ver.2.2.4

-不具合を再現させる手順・サンプルコード(Step for Reproduce bug / Sample code)

(1)Dateフィールドに何も書き込んでいない状態 コンソールでは(undefined)に見える
  getDate で Nullが返ってくる
(2)Dateフィールドに日時の値を書き込んだ状態 コンソールでは”2017-01-19T09:00:00.000+09:00”等に見える
  getDate で 設定された値が正しく返ってくる
(3)Dateフィールドに Nullを書き込んだ状態 コンソールでは空白に見える
  getDate で NullPointerException
  *iOS SDKではnilが返却されます

-エラーメッセージ(Error messages)
java.lang.NullPointerException: Attempt to invoke virtual method 'boolean org.json.JSONObject.has(java.lang.String)' on a null object reference
at com.nifty.cloud.mb.core.NCMBBase.getDate(NCMBBase.java:518)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants