[jdom-interest] getText() and getAttributeValue()

Jason Hunter jhunter at acm.org
Tue Feb 19 18:46:45 PST 2002


> Jason Hunter wrote:
> >
> > > Why is getXXX(key, defaultValue) so abhorrent? After seeing Jason Hunter's
> > > ParameterParserClass in Java Servlet Programming, which is chock-full of
> > > methods like this, how can one not appreciate the power and beauty of such a
> > > method?
> > >
> > > Todd Trimmer
> >
> > Todd knows how to help his cause with carefully placed suck ups.  :-)
> >
> > But besides that, since Properties.getProperty(String, String) has set
> > the standard in Java land, I don't think it's unreasonable people will
> > know what getAttributeValue(String, String) does without reading docs.
> 
> +1 for this suggestion. I have tons of parsing code that looks as
> cluttered as Todd's example -- I'd love to be able to replace it with
> the suggested change
> 
> John Webber

I just checked in the change.  Enjoy, John.  :-)

-jh-



More information about the jdom-interest mailing list