diff options
author | ssjenka <ssjenka@ops-slave-fedora25-1.internal.sonarsource.com> | 2017-06-03 11:36:54 +0200 |
---|---|---|
committer | ssjenka <ssjenka@ops-slave-fedora25-1.internal.sonarsource.com> | 2017-06-03 11:36:54 +0200 |
commit | cc9a0dea5581cae9410ed1fab1e220c17bf06884 (patch) | |
tree | 7baa5b5f2537a29ac42d86747aef63ff8c0a84ce | |
parent | 4e36a7c4a58827e8e46053333910cd116e753e64 (diff) | |
parent | 068eac04b68036b50e8a5c2aa4bc85ae9472ae19 (diff) | |
download | sonarqube-cc9a0dea5581cae9410ed1fab1e220c17bf06884.tar.gz sonarqube-cc9a0dea5581cae9410ed1fab1e220c17bf06884.zip |
Automatic merge from branch-6.4
* origin/branch-6.4:
Prepare for next development iteration 6.4-SNAPSHOT
Release 6.4
Fix false-positive in api/ce/is_queue_empty on mysql
update private badge tooltip
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/ce/ws/IsQueueEmptyWs.java | 9 | ||||
-rw-r--r-- | sonar-core/src/main/resources/org/sonar/l10n/core.properties | 4 |
2 files changed, 9 insertions, 4 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/ce/ws/IsQueueEmptyWs.java b/server/sonar-server/src/main/java/org/sonar/server/ce/ws/IsQueueEmptyWs.java index 7ae95f8dd9d..7accd1f4264 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/ce/ws/IsQueueEmptyWs.java +++ b/server/sonar-server/src/main/java/org/sonar/server/ce/ws/IsQueueEmptyWs.java @@ -24,6 +24,7 @@ import org.sonar.api.server.ws.Request; import org.sonar.api.server.ws.RequestHandler; import org.sonar.api.server.ws.Response; import org.sonar.api.server.ws.WebService; +import org.sonar.api.utils.log.Loggers; import org.sonar.db.DbClient; import org.sonar.db.DbSession; @@ -69,10 +70,14 @@ public class IsQueueEmptyWs implements WebService { @Override public void handle(Request request, Response response) throws Exception { + boolean isQueueEmpty = false; try (DbSession dbSession = dbClient.openSession(false)) { - boolean isQueueEmpty = dbClient.ceQueueDao().selectAllInAscOrder(dbSession).isEmpty(); - IOUtils.write(String.valueOf(isQueueEmpty), response.stream().output(), UTF_8); + isQueueEmpty = dbClient.ceQueueDao().selectAllInAscOrder(dbSession).isEmpty(); + } catch (Exception e) { + // ignore this FP : https://gist.github.com/simonbrandhof/3d98f854d427519ef5b858a73b59585b + Loggers.get(getClass()).error("Cannot select rows from ce_queue", e); } + IOUtils.write(String.valueOf(isQueueEmpty), response.stream().output(), UTF_8); } } } diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index f6e665b65ee..f863c18f716 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -497,8 +497,8 @@ visibility.public=Public visibility.public.description=This project is public. Anyone can browse and see the source code. visibility.public.description.short=Anyone can browse and see the source code. visibility.private=Private -visibility.private.description=This project is private. Only authorized members can browse and see the source code. -visibility.private.description.short=Only authorized members can browse and see the source code. +visibility.private.description=This project is private. Only authorized users can browse and see the source code. +visibility.private.description.short=Only authorized users can browse and see the source code. #------------------------------------------------------------------------------ |