You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Emmanuel Lécharny <el...@gmail.com> on 2014/11/06 17:37:26 UTC
[Fortress] Code smell...
Hi Shawn,
there is one method in CommandLineInterpreter, printPermission, which
contains a line of code that I found fishy :
LOG.info(type + " KEY" + ++ctr + " [" + key + "]");
Note the ++ctr here.
That means if we remove the LOG, the ctr counter will not be incremented.
Do you agree that we should move the ++ctr out of this LOG statement ?
Thanks !
Re: [Fortress] Code smell...
Posted by Shawn McKinney <mc...@att.net>.
That method logs the contents of a permission (within a collection) so disabling the info logger renders all output invisible which makes the counter useless anyway. I am fine with moving it outside of the log statement though.
On 11/06/2014 10:37 AM, Emmanuel Lécharny wrote:
> Hi Shawn,
>
> there is one method in CommandLineInterpreter, printPermission, which
> contains a line of code that I found fishy :
>
>
> LOG.info(type + " KEY" + ++ctr + " [" + key + "]");
>
> Note the ++ctr here.
>
> That means if we remove the LOG, the ctr counter will not be incremented.
>
> Do you agree that we should move the ++ctr out of this LOG statement ?
>
> Thanks !
>
>