ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: enhancement for PropertyFile, have a patch
Date Sun, 04 Sep 2005 20:04:48 GMT
Phil Hourihane wrote:
> Dominique,
> 
> I was pretty sure that Sun's stuff, although available
> in source form, wasn't open-source per se, so I
> avoided hacking their code. The class I have is
> subclassed from Properties (to allow for polymorphic
> substitution), and includes its own code for parsing
> the incoming file and handling the escapes. The 'spec'
> for it (ie. the rules for parsing a properties file)
> is taken from the documentation of the Properties
> class, and some experimentation of my own. It was
> originally coded relying on commons-lang for some
> string handling (using a sledgehammer to crack a nut
> there), but I stripped that out to prepare it for Ant,
> so now it had no dependancy outside the standard JDK.
> The parsing, escaping and string handling are coded
> from scratch, and although they don't claim to be the
> smartest in the world, don't step on anyone's
> licensing toes. 
> 
> I'll do a search for the Software Grant form that you
> mention, as the intention is to make it available to
> the ASF.
> 
> PHiL
> 

i guess the big concern would be handling all that escaping stuff - I 
wonder if any of the CLASSPATH/Harmony java tests for property file 
parsing could be used here, and then performance impact. Being less used 
than <property file>; perf would be less of an issue.

oh, one other worry. Does anyone consider it to be a backwards 
compatibility issue if we do now retain comments?

Nb, on the subject of property files, Java1.5 adds a new XML format. See:
http://java.sun.com/dtds/properties.dtd

There are loadXML and saveXML commands. Wierdly the one comment allowed 
per file is different from Xml comments, but otherwise it looks ok. 
Should we retrofit broad ant support for this format too? Or delay till 
the 1.8 timeframe? That is my preference.

-steve

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message