I am working with Apache log4j (http://logging.apache.org/log4j/2.x/) and I realized that in their implementation they always declared their function like this:
static
public
Logger getLogger(Class clazz) {
return LogManager.getLogger(clazz.getName());
}
instead of
static public Logger getLogger(Class clazz) {
return LogManager.getLogger(clazz.getName());
}
Is there any good reason for using this style?
On the FAQ it says:
However, if you check the examples in the Java Coding Conventions, you find that all the modifiers go on a single line before the function:
If I’d have to guess, I’d say it makes the
diffeasier to spot when committing patches and also maybe avoids long lines.