aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-webserver-api/src
diff options
context:
space:
mode:
authorPierre <pierre.guillot@sonarsource.com>2022-07-12 17:49:25 +0200
committersonartech <sonartech@sonarsource.com>2022-07-14 20:03:47 +0000
commit2fd25861cb2fc208a7404d1d29e637a984e37569 (patch)
tree84c4dd7a1d19eae590b1942500e8d288caac0de3 /server/sonar-webserver-api/src
parent3a491da6237e599188660550256673112a679eed (diff)
downloadsonarqube-2fd25861cb2fc208a7404d1d29e637a984e37569.tar.gz
sonarqube-2fd25861cb2fc208a7404d1d29e637a984e37569.zip
SONAR-16642 fix race condition on HealthReducer
Diffstat (limited to 'server/sonar-webserver-api/src')
-rw-r--r--server/sonar-webserver-api/src/main/java/org/sonar/server/health/Health.java10
1 files changed, 2 insertions, 8 deletions
diff --git a/server/sonar-webserver-api/src/main/java/org/sonar/server/health/Health.java b/server/sonar-webserver-api/src/main/java/org/sonar/server/health/Health.java
index 881c4ecb860..2d01efe055b 100644
--- a/server/sonar-webserver-api/src/main/java/org/sonar/server/health/Health.java
+++ b/server/sonar-webserver-api/src/main/java/org/sonar/server/health/Health.java
@@ -31,7 +31,7 @@ public class Health {
/**
* The GREEN status without any cause as a constant, for convenience and optimisation.
*/
- public static final Health GREEN = newHealthCheckBuilder()
+ public static final Health GREEN = builder()
.setStatus(Status.GREEN)
.build();
@@ -51,7 +51,7 @@ public class Health {
return causes;
}
- public static Builder newHealthCheckBuilder() {
+ public static Builder builder() {
return new Builder();
}
@@ -91,12 +91,6 @@ public class Health {
// use static factory method
}
- public Builder clear() {
- this.status = null;
- this.causes.clear();
- return this;
- }
-
public Builder setStatus(Status status) {
this.status = checkStatus(status);
return this;