diff options
Diffstat (limited to 'server/sonar-db-core')
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"); - } -} |