[slf4j-user] is*Enabled vs explicit method call performance measure
Thorbjoern Ravn Andersen
ravn at runjva.com
Sun Nov 13 16:03:05 CET 2011
Den 11/11/11 18.52, coldserenity skrev:
> (A small update just in case someone will ever need this)
>
> Recently I had to revisit the the rule “When dereferenced arguments are
> passed”.
> For complex cases like lazy loaded object or when some additional logic
> involved in method indeed we shall require is*Enabled check.
>
For parameterized objects you just need to have the toString() method
delayed. The toString() evaluation happens after the enabled check.
--
Thorbjørn Ravn Andersen "...plus... Tubular Bells!"
More information about the slf4j-user
mailing list