On Sat, Oct 11, 2008 at 7:00 AM, Tim Perrett <[EMAIL PROTECTED]> wrote:
> > Hey David, > > Thanks for the reply. See the funny thing with this is that it prints > all the items out then raises the NPE. > > I also dont get that if im setting the reader to be val (and therefor > immutable) how can it go from being a reader, to being null? even if > it was var I thought that readLine was a non-destructive operation. readLine is a destructive operation. It's mutating external (I/O) state. > > > If post.getResponseBodyAsStream resulted in null, then id understand > this error. But the fact that it prints the content then fails, is > just bizarre. Its almost like the value of the val is changing? (which > should be impossible right?) The val isn't changing. The failure is in the initialization of the val, which happens before the println's which means you're initializing the object more than once. Also, the getResponseBodyAsStream is also likely to mutate the underlying post object. The code in the repository is different than the code you posted. If you can check in the code and maybe put together a sample app, I'll look into it. Thanks, David > > > Is there anything I can do with wrapping Can/Full around these things > to avoid the error? > > Cheers > > Tim > > > > -- Lift, the simply functional web framework http://liftweb.net Collaborative Task Management http://much4.us Follow me: http://twitter.com/dpp Git some: http://github.com/dpp --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" 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/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
