abhi27601 / google-voice-java

Automatically exported from code.google.com/p/google-voice-java
0 stars 0 forks source link

Empty Sms Inbox breaks the parser #18

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago

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

GoogleCodeExporter commented 8 years ago

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

GoogleCodeExporter commented 8 years ago
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 commented 8 years ago
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 commented 8 years ago
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