You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an Android application, I get the following error:
java.lang.NullPointerException
at com.techventus.server.voice.util.SMSParser.parseContact(SMSParser.java:143)
at com.techventus.server.voice.util.SMSParser.getSMSThreads(SMSParser.java:115)
at com.techventus.server.voice.Voice.getSMSThreads(Voice.java:842)
Original issue reported on code.google.com by cs3vi...@gmail.com on 8 Nov 2013 at 2:29
The text was updated successfully, but these errors were encountered:
Here is the fix. You can't call .trim() on a text element until you check if
it's null or not:
/**
* Parses the contact information from the DOM Element.
*
* @param element
* the DOM Element
* @return the Contact
*/
private Contact parseContact(Element element) {
String name = element.selectSingleNode(XPathQuery.MESSAGE_NAME_LINK).getText();
if(name != null){
name = name.trim();
}
Original comment by cs3vi...@gmail.com on 8 Nov 2013 at 2:48
Original issue reported on code.google.com by
cs3vi...@gmail.com
on 8 Nov 2013 at 2:29The text was updated successfully, but these errors were encountered: