Github user garydgregory commented on the issue:
https://github.com/apache/commons-lang/pull/311
I hope we do not advocate running code like the fragment you just quoted.
This is the same kind of issue we finally resolved in Apache Log4 2 where you
no longer need to write code like:
```
if (logger.isDebugEnabled()) {
logger.debug("This is " + foo + " and " +bar);
}
```
Instead you say:
`logger.debug("This is {} and {}", foo, bar);`
You can also delegate evaluation of expensive calls only if the logger is
enabled:
`logger.debug("This is {} and {}", () -> foo(), () -> bar());`
The logger is configured from a file or another code snippet.
IMO, we are already dangerously close to out of bounds of [lang] with the
current code, so I am mentioning this for exploration ATM. That said, I think
it would be good to see in text at least what a fully featured gadget looks
like before we include the current version in [lang]. Once in, it will likely
evolve, and then it might end up being moved to another component if it is no
longer 'lang-y'...
---