Re: Calabash: suspect loop?

log becomes null if log.getParent() returns null..... so then
log.getLevel() throws an NPE


On 7 September 2010 13:47, mozer <xmlizer@gmail.com> wrote:
> I can't see what's suspect here
> If log != null
> then log.getParent() is ok and log.getLevel() also
> if log == null
> Then the loop stop
> The same if level== null
> Hope this helps
> Xmlizer
> On Tue, Sep 7, 2010 at 1:34 AM, Florent Georges <fgeorges@fgeorges.org>
> wrote:
>>
>>  Hi,
>>
>>  In Calabash's DeclareStep.java, line 201:
>>
>>    while (log != null && level == null) {
>>        log = log.getParent();
>>        level = log.getLevel();
>>    }
>>
>>  I've got an NPE on log.getLevel().  I've integrated Calabash in
>> a web application and twisted it a bit, so it is difficult to
>> reproduce the problem in a self-contained simple example, but
>> because getParent() can return null, this looks suspect to me.
>>
>>  Hope that helps, regards,
>>
>> --
>> Florent Georges
>> http://fgeorges.org/
>>
>
>



-- 
Andrew Welch
http://andrewjwelch.com

Received on Tuesday, 7 September 2010 12:59:33 UTC