commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Duncan <stephen.dun...@gmail.com>
Subject Re: [Configuration] - List of Size 1
Date Thu, 27 Jan 2005 15:15:46 GMT
In writing my test, it seems my interpretation of the problem is
incorrect.  Sorry.  What actually happens is that my elements are not
counted if they are empty.  Since getList is supposed to be the string
content of the element, this makes sense, I guess.

My configuration xml file is a lot like the log4j xml configuration
file: frequently, all the data is in the attributes of an element, and
there is content to the element.  Is there a way to get the number of
such elements, so that I can then loop and address each by index?

-Stephen Duncan Jr


On Thu, 27 Jan 2005 15:52:18 +0100, Oliver Heger
<hegero@med.uni-marburg.de> wrote:
> Any chance that you provide a test case which demonstrates this
> behavior? Best way is to open an error report in our bug tracking system
> bugzilla (http://issues.apache.org/bugzilla/) and attach your test code.
> This makes it easier for us to reproduce the problem.
> 
> I will have a look at it. Btw, which version of [configuration] do you use?
> 
> Oliver
> 
> Stephen Duncan wrote:
> 
> > I'm using the hierarchicalXml configuration.
> >
> > I have an element that will appear in my congifuration one or more
> > times.  If there are two or more, config.getList() returns the list as
> > I expect.  However, if there's only of these elements, then I get an
> > empty list.
> >
> > Is there a way to fix this/get around this?  If not, what's the best
> > practice to deal with this?  Check for size 0 and do a simple retrieve
> > instead?
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 
> 


-- 
Stephen Duncan Jr
www.stephenduncanjr.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message