avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <blorit...@citi-us.com>
Subject RE: Bug report comments requested
Date Fri, 10 Jan 2003 16:26:02 GMT
> From: news [mailto:news@main.gmane.org]On Behalf Of Ulrich Mayring
> In our version of Phoenix (pre 4.0) it was not returning null, but the
> empty string.
> As far as I see it, now it is not possible anymore to distinguish
> between "empty element" (returns "") and "element not 
> present" (returns
> null). Many of our applications use these tests.

It is possible if you use "null" as your default value:

String myVal = config.getAttribute("name", null);
if (myVal == null) throw new NullPointerException("@name");

To unsubscribe, e-mail:   <mailto:avalon-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-dev-help@jakarta.apache.org>

View raw message