RE: Calabash: suspect loop?

Yes, I had already marked this some weeks ago to be fixed, as PMD is also complaining about the redundant null check. The patch with the FIXME note is still being merged. The patch is a first attempt to make XProc more PMD and FindBugs compliant.


Met vriendelijke groet,

Edwin de Jong


Exxellence Group

Bezoekadres:
Welbergweg 80-84
7556 PE Hengelo (ov.)

Postadres:
Postbus 768
7550 AT Hengelo (ov.)

tel. +31 (74) 25 94 008
fax. +31 (74) 25 66 424
-----Original Message-----
From: xproc-dev-request@w3.org [mailto:xproc-dev-request@w3.org] On Behalf Of Andrew Welch
Sent: Tuesday, September 07, 2010 2:59 PM
To: mozer
Cc: Florent Georges; XProc Dev
Subject: 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 13:46:30 UTC