Skip to content

Commit

Permalink
[FIXED JENKINS-18895] Refined fix once again.
Browse files Browse the repository at this point in the history
Originally-Committed-As: ec9b4f11866e80ae4a432b9127e71afddf30de86
  • Loading branch information
jglick committed Jul 30, 2013
1 parent 22a0171 commit a68212f
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/main/java/hudson/maven/MavenModuleSetBuild.java
Expand Up @@ -194,13 +194,17 @@ public EnvVars getEnvironment(TaskListener log) throws IOException, InterruptedE
@Override
public Result getResult() {
if (isBuilding()) {
return super.getResult();
return computeResult();
}
synchronized (notifyModuleBuildLock) {
if (effectiveResult != null) {
return effectiveResult;
if (effectiveResult == null) {
effectiveResult = computeResult();
}
return effectiveResult;
}
}

private Result computeResult() {
Result r = super.getResult();

for (MavenBuild b : getModuleLastBuilds().values()) {
Expand All @@ -215,11 +219,6 @@ public Result getResult() {
r = r.combine(br);
}

synchronized (notifyModuleBuildLock) {
if (effectiveResult == null) {
effectiveResult = r;
}
}
return r;
}

Expand Down

0 comments on commit a68212f

Please sign in to comment.