mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-20 13:31:28 +07:00
[java] report the proper result if JPS build reported errors and was aborted
This restores how it worked before aeb45d9b836 just in case (IJ-CR-123815). GitOrigin-RevId: 667a371e1de002655b148adc387ffed1d13b4362
This commit is contained in:
committed by
intellij-monorepo-bot
parent
46a0fd9ba2
commit
a78bfe9d91
@@ -313,6 +313,17 @@ public final class JpsProjectTaskRunner extends ProjectTaskRunner {
|
||||
}
|
||||
|
||||
private static final class MyNotificationCollector implements AutoCloseable {
|
||||
private static final Result FAILED_AND_ABORTED = new Result() {
|
||||
@Override
|
||||
public boolean isAborted() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasErrors() {
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@NotNull private final ProjectTaskContext myContext;
|
||||
private final AsyncPromise<Result> myPromise;
|
||||
private boolean myCollectingStopped;
|
||||
@@ -336,7 +347,8 @@ public final class JpsProjectTaskRunner extends ProjectTaskRunner {
|
||||
|
||||
private void notifyFinished() {
|
||||
if (myCollectingStopped && myNotifications.isEmpty()) {
|
||||
myPromise.setResult(myAborted ? TaskRunnerResults.ABORTED :
|
||||
myPromise.setResult(myAborted && myErrors > 0 ? FAILED_AND_ABORTED :
|
||||
myAborted ? TaskRunnerResults.ABORTED :
|
||||
myErrors > 0 ? TaskRunnerResults.FAILURE :
|
||||
TaskRunnerResults.SUCCESS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user