[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSONUtil NPE #20

Closed
roundhill opened this issue Jun 14, 2013 · 1 comment
Closed

JSONUtil NPE #20

roundhill opened this issue Jun 14, 2013 · 1 comment
Assignees
Milestone

Comments

@roundhill
Copy link
Contributor

java.lang.NullPointerException
at org.wordpress.android.util.JSONUtil.queryJSON(JSONUtil.java:51)
at org.wordpress.android.models.Note.buildReply(Note.java:132)
at org.wordpress.android.ui.notifications.NoteCommentFragment$3.onReply(NoteCommentFragment.java:249)
at org.wordpress.android.ui.notifications.ReplyField$1.onClick(ReplyField.java:62)
at android.view.View.performClick(View.java:3652)
at android.view.View$PerformClick.run(View.java:14354)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4512)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:561)
at dalvik.system.NativeStart.main(Native Method)

@maxme
Copy link
Contributor
maxme commented Sep 25, 2013

Using version 2.4.1 - this could be artificially reproduced by setting replyAction = null here: https://github.com/wordpress-mobile/WordPress-Android/blob/2.4.1/src/org/wordpress/android/models/Note.java#L131

IRL, this could happen if:

  • REST call doesn't reply with the full Note
  • Invalid JSON data in "body.action"

I'll add a == null test at JSONUtil level to be sure the app doesn't force close.

@ghost ghost assigned maxme Sep 25, 2013
@maxme maxme closed this as completed Oct 11, 2013
mufela added a commit to mufela/WordPress-Android that referenced this issue Dec 5, 2016
jtreanor added a commit that referenced this issue Mar 7, 2019
4c6e8c9234 Merge pull request #21 from wordpress-mobile/circleci-updates
8470873567 CircleCI: Add checkstyle and assembleDebug
0b5781dd43 Merge pull request #20 from wordpress-mobile/circleci
8514b7f1cc Removed Travis CI config
0350b9e876 Add CircleCI config

git-subtree-dir: libs/utils
git-subtree-split: 4c6e8c92344cd799619efab5df7500ec782c0f42
jtreanor added a commit that referenced this issue Mar 7, 2019
4c6e8c9234 Merge pull request #21 from wordpress-mobile/circleci-updates
8470873567 CircleCI: Add checkstyle and assembleDebug
0b5781dd43 Merge pull request #20 from wordpress-mobile/circleci
8514b7f1cc Removed Travis CI config
0350b9e876 Add CircleCI config

git-subtree-dir: libs/utils
git-subtree-split: 4c6e8c92344cd799619efab5df7500ec782c0f42
jtreanor added a commit that referenced this issue Mar 7, 2019
4c6e8c9234 Merge pull request #21 from wordpress-mobile/circleci-updates
8470873567 CircleCI: Add checkstyle and assembleDebug
0b5781dd43 Merge pull request #20 from wordpress-mobile/circleci
8514b7f1cc Removed Travis CI config
0350b9e876 Add CircleCI config

git-subtree-dir: libs/utils
git-subtree-split: 4c6e8c92344cd799619efab5df7500ec782c0f42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants