W3C home > Mailing lists > Public > xproc-dev@w3.org > September 2010

Re: Calabash: suspect loop?

From: Andrew Welch <andrew.j.welch@gmail.com>
Date: Tue, 7 Sep 2010 13:59:00 +0100
Message-ID: <AANLkTi=A35eVOMzhAsabfKDO96kP1hT06KxH6Oyot5GT@mail.gmail.com>
To: mozer <xmlizer@gmail.com>
Cc: Florent Georges <fgeorges@fgeorges.org>, XProc Dev <xproc-dev@w3.org>
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 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 7 September 2010 12:59:33 GMT