No point of being sure here... even if the current code is structured in a way that it shouldn't be null, nothing says it will stay like that in all future code revisions. Ever since i started getting null exceptions from android (not NullPointerException... a Null instead of an exception) i learned it's always a good idea to check for nulls when you're supposed to receive an object.
On Thursday, July 11, 2013 6:01:13 AM UTC+3, Palmer Eldritch wrote: > > I suspect it can't be null *by construction* - I just can't pin it down > in code (or in docs) > > It's nice to be sure > > Can somebody point to the relevant code parts ? > > I mean what paths lead to the onReceive being triggered ? Can we have a > null intent in any of them ? > > On Thursday, July 11, 2013 4:18:09 AM UTC+3, TreKing wrote: >> >> >> On Wed, Jul 10, 2013 at 4:14 PM, Palmer Eldritch <[email protected]>wrote: >> >>> I mean nobody knows ?? >>> >>> Do you ever check the intent for being null and if not why ? >>> >> >> Here's what you do. Assume it will not be null, then use ACRA or some >> other bug-reporting tool to handle uncaught exceptions. If you get a null >> pointer exception from here, you know it can be null. >> >> You're welcome. >> >> >> ------------------------------------------------------------------------------------------------- >> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago >> transit tracking app for Android-powered devices >> > -- -- 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 --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

