aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-db-core
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2018-01-09 10:51:32 +0100
committerJulien Lancelot <julien.lancelot@sonarsource.com>2018-01-09 14:25:49 +0100
commita1e5594f2aace43f6c8dba7a0612a4c9e80f460e (patch)
treeb7ee0db7fa965bee98840d18058b4df4a3aea1ac /server/sonar-db-core
parentadbc65a64befed967f581aaed8f5f6f31b5171db (diff)
downloadsonarqube-a1e5594f2aace43f6c8dba7a0612a4c9e80f460e.tar.gz
sonarqube-a1e5594f2aace43f6c8dba7a0612a4c9e80f460e.zip
Drop deprecated class org.sonar.api.utils.Semaphores
Diffstat (limited to 'server/sonar-db-core')
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/semaphore/SemaphoresImpl.java44
-rw-r--r--server/sonar-db-core/src/main/java/org/sonar/db/semaphore/package-info.java24
-rw-r--r--server/sonar-db-core/src/test/java/org/sonar/db/semaphore/SemaphoresImplTest.java40
3 files changed, 0 insertions, 108 deletions
diff --git a/server/sonar-db-core/src/main/java/org/sonar/db/semaphore/SemaphoresImpl.java b/server/sonar-db-core/src/main/java/org/sonar/db/semaphore/SemaphoresImpl.java
deleted file mode 100644
index 12f92e20992..00000000000
--- a/server/sonar-db-core/src/main/java/org/sonar/db/semaphore/SemaphoresImpl.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2018 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.db.semaphore;
-
-import org.sonar.api.utils.Semaphores;
-
-public class SemaphoresImpl implements Semaphores {
-
- @Override
- public Semaphore acquire(String name, int maxAgeInSeconds, int updatePeriodInSeconds) {
- throw fail();
- }
-
- @Override
- public Semaphore acquire(String name) {
- throw fail();
- }
-
- @Override
- public void release(String name) {
- throw fail();
- }
-
- private static RuntimeException fail() {
- throw new UnsupportedOperationException("Semaphores are not supported since 5.2 and the drop of database connection from analyzer");
- }
-}
diff --git a/server/sonar-db-core/src/main/java/org/sonar/db/semaphore/package-info.java b/server/sonar-db-core/src/main/java/org/sonar/db/semaphore/package-info.java
deleted file mode 100644
index 3c8c9bb0bda..00000000000
--- a/server/sonar-db-core/src/main/java/org/sonar/db/semaphore/package-info.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2018 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-@ParametersAreNonnullByDefault
-package org.sonar.db.semaphore;
-
-import javax.annotation.ParametersAreNonnullByDefault;
-
diff --git a/server/sonar-db-core/src/test/java/org/sonar/db/semaphore/SemaphoresImplTest.java b/server/sonar-db-core/src/test/java/org/sonar/db/semaphore/SemaphoresImplTest.java
deleted file mode 100644
index e591e51fdc6..00000000000
--- a/server/sonar-db-core/src/test/java/org/sonar/db/semaphore/SemaphoresImplTest.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * SonarQube
- * Copyright (C) 2009-2018 SonarSource SA
- * mailto:info AT sonarsource DOT com
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-package org.sonar.db.semaphore;
-
-import org.junit.Test;
-
-public class SemaphoresImplTest {
-
- @Test(expected = UnsupportedOperationException.class)
- public void acquire_is_unsupported() {
- new SemaphoresImpl().acquire("foo");
- }
-
- @Test(expected = UnsupportedOperationException.class)
- public void acquire_with_timeout_is_unsupported() {
- new SemaphoresImpl().acquire("foo", 1, 2);
- }
-
- @Test(expected = UnsupportedOperationException.class)
- public void release_is_unsupported() {
- new SemaphoresImpl().release("foo");
- }
-}