Open damianszczepanik opened 9 years ago
I do not like that option too, but lets wait till refactoring of #596 is done.
fix for #67 was revered as it brake compatibility with maven plugin that we use for reports generation.
Any changes to constructors signature have to be postponed till maven plugin switch to recent versions (right now it stands on last version that use java6).
So this issue is postponed till maven plugin switch to java7 binaries.
just an idea to implement that quicker then maven plugin will use latest version:
All we need is to keep signature of c-tor to be the same, we could review sources of plugin, if he do not use that argument with variable and only with a constant "true" or "false" , we could keep a c-tor signature but internally do what we need.
eclipse-cs uses a custom listener called CheckstyleAuditListener
.
maven plugin uses those constructors with default value of true
.
We will have to keep that signature unless we want to break compatibility with them (like in CS 8).
Marked as checkstyle8
In
Main
classXMLLogger
andDefaultLogger
are created with constructor that takes boolean value to decide whether the output stream shall be closed or not.It's better to control if the stream shall be closed or not from method where the stream was created. In that case we avoid passing boolean value into loggers.
Also consider to create
AbstractLogger
that may keepPrintWritter
attribute and method for closing this stream. Currently code for closing stream is duplicated and I'm not sure if stream is closed when exception is thrown soauditFinished()
may not be invoked.