public synchronized void finish(Consumer<? super BuildEvent> messageConsumer) {
    completeParsers(messageConsumer);

    if (!myParsingContext.getSessionEnded()) {
      messageConsumer.accept(new FinishBuildEventImpl(myTaskId, null, System.currentTimeMillis(), "", new MavenTaskFailedResultImpl(null)));
    }
  }
public synchronized void finish(Consumer<? super BuildEvent> messageConsumer)