forked from phoedos/pmd
Avoid NPE if writer is not set in AbstractRenderer.flush
This commit is contained in:
@ -103,6 +103,11 @@ public abstract class AbstractRenderer extends AbstractPropertySource implements
|
||||
|
||||
@Override
|
||||
public void flush() {
|
||||
if (writer == null) {
|
||||
// might happen, if no writer is set. E.g. in maven-pmd-plugin's PmdCollectingRenderer
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
this.writer.flush();
|
||||
} catch (IOException e) {
|
||||
|
Reference in New Issue
Block a user