void (int threadId, Map<String, String> parameters, Consumer<? super BuildEvent> messageConsumer) { @NlsSafe String artifactCoord = parameters.get("artifactCoord"); if (artifactCoord == null) { return; } @NlsSafe String error = parameters.get("error"); if (error != null || downloadingMap.contains(artifactCoord)) { MavenParsingContext.MavenExecutionEntry parent = startFakeDownloadNodeIfNotStarted(threadId, parameters, messageConsumer); if (error != null) { if (downloadingMap.remove(artifactCoord)) { messageConsumer .accept(new FinishEventImpl(getDownloadId(artifactCoord), parent.getId(), System.currentTimeMillis(), artifactCoord, new FailureResultImpl(error, null))); } else { Object eventId = new Object(); messageConsumer .accept(new StartEventImpl(eventId, parent.getId(), System.currentTimeMillis(), error)); messageConsumer .accept(new FinishEventImpl(eventId, parent.getId(), System.currentTimeMillis(), error, new FailureResultImpl())); } } else { messageConsumer .accept(new FinishEventImpl(getDownloadId(artifactCoord), parent.getId(), System.currentTimeMillis(), artifactCoord, new SuccessResultImpl(false))); } } }