ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Jan.Mate...@rzf.fin-nrw.de>
Subject AW: Adding a methof to StringUtils
Date Wed, 19 Apr 2006 10:40:30 GMT
>Please, don't.
>
>Modern compilers already implement string addition using StringBuffer
>(1.4 already have this optimization, I don't remember about 
>earlier versions).
>
>And 1.5 compiler can do it using StringBuilder which is faster.


Mmh .... so we should do the performance tests on a ??? 1.4/1.5 and implement the improvement
in a 1.2-way?




>Essentially we don't want to perform any operations, or 
>produce any temporary values if they aren't going to be used, 
>but I can't see a way of doing this without something like
>
>if (verbosity >= Project.MSG_INFO) {
>  log(msg + e + msg2);
>}
>
>but this is subverting the log method that uses the verbosity 
>internally, and adding conditions to the construction of log 
>messages is not nice.


log(Object[] messageFragments, int loglevel) {
    if (verbosity >= loglevel) { StringBuffer.....


but ..... if I´m right, that the project doesnt know the loglevel?


Jan

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


Mime
View raw message