It couldn't have been working before 1.5. The only way to safely convert an object to a String without a NullPointerException is to use a StringBuilder/StringBuffer or use a String concatenation:
String imageFileName = "" + myFile.imageFileName; Or better yet, explicitly check for null :) On Fri, May 15, 2009 at 10:10 PM, chrispix <[email protected]> wrote: > > if the value of imageFileName is null, why can I not change null into > a string? It was working before 1.5. > String imageFileName = myFile.imageFileName.toString(); > > This gives me the a NullPointerException Error. > > > -- Romain Guy Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

