I have been getting ACRA crash reports with the following stacktrace:

java.lang.NullPointerException
at java.util.Calendar.setTime(Calendar.java:1284)
at java.text.SimpleDateFormat.formatImpl(SimpleDateFormat.java:730)
at java.text.SimpleDateFormat.format(SimpleDateFormat.java:1011)
at java.text.DateFormat.format(DateFormat.java:384)
at com.jnc.zmanminder.ZMUpdateService.buildUpdate(ZMUpdateService.java:117)

The code that triggers this crash is as follows:

ZmanimCalendar c = new ZmanimCalendar(l);
Date SunsetTime = c.getSunset();
String SunsetTimeString = 
   DateFormat.getTimeInstance(DateFormat.SHORT).format(SunsetTime);

What could possibly trigger an NPE in this code?  Is there something I
should be checking about SunsetTime before passing it in to be
formatted?

-- 
Jake Colman -- Android Tinkerer

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to