Technically, yes, that's a violation of Sun's coding conventions. I tend to doubt it's terribly important in this particular case, as that's always seemed a very poor rule, and I rarely see people follow it in the real world. But if you want to be as safe as possible, you may want to follow the rule exactly. In which case you can't put logging before variable declarations.
Remember, too, you don't necessarily have to put all local variable declarations at the beginning of the
method. The rule is to put them at the beginning of the
block that they're declared in. So you could do something like this:
Here we've got an anonymous block, for no other purpose than to circumvent a really silly rule.