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

Empty Sms Inbox breaks the parser #18

Open
GoogleCodeExporter opened this issue Apr 11, 2015 · 6 comments
Open

Empty Sms Inbox breaks the parser #18

GoogleCodeExporter opened this issue Apr 11, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create a brand new google voice account, and ensure no text messages are 
sent to the account before part 2 and 3.
2. Connect to the account with google-voice-java.
3. Call the getSMSThreads() method in the Voice class.
4. Weep as you get a null pointer exception.

What is the expected output? What do you see instead?

An empty sms thread.  The program crashes instead.


What version of the product are you using? On what operating system?

Changeset 137 on mac os x 10.6 and ubuntu.



Original issue reported on code.google.com by walt.jav...@gmail.com on 4 Mar 2011 at 11:00

@GoogleCodeExporter
Copy link
Author

I have a patch that will fix this issue, once I can commit.

Original comment by walt.jav...@gmail.com on 4 Mar 2011 at 11:14

@GoogleCodeExporter
Copy link
Author

Original comment by walt.jav...@gmail.com on 22 Mar 2011 at 6:12

@GoogleCodeExporter
Copy link
Author

Original comment by walt.jav...@gmail.com on 22 Mar 2011 at 6:13

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Hi there,

I did a simple patch to fix it:

String text = "";
                try {
                    text = element
                            .selectSingleNode(XPathQuery.MESSAGE_SMS_TEXT)
                            .getText().trim();
                } catch (NullPointerException npe) {
                }

Original comment by pjnomo...@gmail.com on 16 Oct 2011 at 7:24

@GoogleCodeExporter
Copy link
Author

Please find attached a one-line fix to the problem against SVN r173

Original comment by bait...@gmail.com on 21 Feb 2012 at 7:04

Attachments:

@GoogleCodeExporter
Copy link
Author

OK so can I close this issue, has the fix gone into the trunk?

Original comment by malone.j...@gmail.com on 14 May 2012 at 3:38

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

1 participant