[Android] Catch null pointer exception

Jean-Baptiste Kempf jb at videolan.org
Fri May 17 01:29:07 CEST 2013


On 16 May, XilasZ wrote :
> please don't do that, send alex's patches on the ML before commit/push, we
> don't fix a simple NullPointerException with a try/catch.

This is my fault, because I couldn't figure out exactly the issue.

> a little quick digging reveals that getFilesDir() is faulty here.
> getFilesDir() try to create folders in the internal memory (such as
> /data/data/<pkg>/files), and return null if it can't (docs are wrong, see
> http://code.google.com/p/android/issues/detail?id=8886).

Ah, I missed that.

With all my excuses.

Best regards,

PS: you should have forced push, IMVHO


-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device


More information about the Android mailing list