ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
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?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message