diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-06-30 16:52:26 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-06-30 17:14:22 +0200 |
commit | c95a564cd7ee1705f38062efe4f8750dffd6a8fa (patch) | |
tree | e94a9567229aac0ec664254c802365f9deac72c8 /sonar-ws-client | |
parent | d44ef046f3dd7d59397c681cb79ebe3173d915bb (diff) | |
download | sonarqube-c95a564cd7ee1705f38062efe4f8750dffd6a8fa.tar.gz sonarqube-c95a564cd7ee1705f38062efe4f8750dffd6a8fa.zip |
Fix some quality flaws
Diffstat (limited to 'sonar-ws-client')
7 files changed, 1 insertions, 140 deletions
diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/SonarClient.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/SonarClient.java index 0ab9691bb54..0a7275151b2 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/SonarClient.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/SonarClient.java @@ -32,8 +32,6 @@ import org.sonar.wsclient.qprofile.QProfileClient; import org.sonar.wsclient.qprofile.internal.DefaultQProfileClient; import org.sonar.wsclient.qualitygate.QualityGateClient; import org.sonar.wsclient.qualitygate.internal.DefaultQualityGateClient; -import org.sonar.wsclient.rule.RuleClient; -import org.sonar.wsclient.rule.internal.DefaultRuleClient; import org.sonar.wsclient.system.SystemClient; import org.sonar.wsclient.system.internal.DefaultSystemClient; import org.sonar.wsclient.user.UserClient; @@ -110,13 +108,6 @@ public class SonarClient { } /** - * New client to interact with web services related to rules - */ - public RuleClient ruleClient() { - return new DefaultRuleClient(requestFactory); - } - - /** * New client to interact with web services related to quality gates */ public QualityGateClient qualityGateClient() { diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java index ccd18193463..3727840e4d9 100644 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java +++ b/sonar-ws-client/src/main/java/org/sonar/wsclient/issue/Issue.java @@ -38,7 +38,7 @@ public interface Issue { String componentKey(); /** - * Deprecated since 4.4. Use {@link #componentKey()} instead + * @deprecated since 4.4. Use {@link #componentKey()} instead */ @Deprecated Long componentId(); diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/rule/RuleClient.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/rule/RuleClient.java deleted file mode 100644 index c59588f1e73..00000000000 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/rule/RuleClient.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube 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. - * - * SonarQube 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.wsclient.rule; - -/** - * Allows management of rules - * @since 4.2 - */ -public interface RuleClient { - -} diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/rule/internal/DefaultRuleClient.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/rule/internal/DefaultRuleClient.java deleted file mode 100644 index e6d7f98ec0e..00000000000 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/rule/internal/DefaultRuleClient.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube 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. - * - * SonarQube 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.wsclient.rule.internal; - -import org.sonar.wsclient.internal.HttpRequestFactory; -import org.sonar.wsclient.rule.RuleClient; - -/** - * Do not instantiate this class, but use {@link org.sonar.wsclient.SonarClient#ruleClient()}. - */ -public class DefaultRuleClient implements RuleClient { - - private static final String ROOT_URL = "/api/rules"; - - private final HttpRequestFactory requestFactory; - - public DefaultRuleClient(HttpRequestFactory requestFactory) { - this.requestFactory = requestFactory; - } - -} diff --git a/sonar-ws-client/src/main/java/org/sonar/wsclient/rule/internal/package-info.java b/sonar-ws-client/src/main/java/org/sonar/wsclient/rule/internal/package-info.java deleted file mode 100644 index 73869c9ce0e..00000000000 --- a/sonar-ws-client/src/main/java/org/sonar/wsclient/rule/internal/package-info.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube 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. - * - * SonarQube 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.wsclient.rule.internal; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java index 3f3c6e53050..e6e82045b96 100644 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java +++ b/sonar-ws-client/src/test/java/org/sonar/wsclient/SonarClientTest.java @@ -26,7 +26,6 @@ import org.sonar.wsclient.permissions.internal.DefaultPermissionClient; import org.sonar.wsclient.project.internal.DefaultProjectClient; import org.sonar.wsclient.qprofile.internal.DefaultQProfileClient; import org.sonar.wsclient.qualitygate.internal.DefaultQualityGateClient; -import org.sonar.wsclient.rule.internal.DefaultRuleClient; import org.sonar.wsclient.system.internal.DefaultSystemClient; import org.sonar.wsclient.user.internal.DefaultUserClient; @@ -42,7 +41,6 @@ public class SonarClientTest { assertThat(client.userClient()).isNotNull().isInstanceOf(DefaultUserClient.class); assertThat(client.permissionClient()).isNotNull().isInstanceOf(DefaultPermissionClient.class); assertThat(client.projectClient()).isNotNull().isInstanceOf(DefaultProjectClient.class); - assertThat(client.ruleClient()).isNotNull().isInstanceOf(DefaultRuleClient.class); assertThat(client.qualityGateClient()).isNotNull().isInstanceOf(DefaultQualityGateClient.class); assertThat(client.qProfileClient()).isNotNull().isInstanceOf(DefaultQProfileClient.class); assertThat(client.systemClient()).isNotNull().isInstanceOf(DefaultSystemClient.class); diff --git a/sonar-ws-client/src/test/java/org/sonar/wsclient/rule/internal/DefaultRuleClientTest.java b/sonar-ws-client/src/test/java/org/sonar/wsclient/rule/internal/DefaultRuleClientTest.java deleted file mode 100644 index ac27da21700..00000000000 --- a/sonar-ws-client/src/test/java/org/sonar/wsclient/rule/internal/DefaultRuleClientTest.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube 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. - * - * SonarQube 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.wsclient.rule.internal; - -import org.junit.Before; -import org.junit.Rule; -import org.sonar.wsclient.MockHttpServerInterceptor; -import org.sonar.wsclient.internal.HttpRequestFactory; - -public class DefaultRuleClientTest { - - @Rule - public MockHttpServerInterceptor httpServer = new MockHttpServerInterceptor(); - - private DefaultRuleClient client; - - @Before - public void initClient() { - HttpRequestFactory requestFactory = new HttpRequestFactory(httpServer.url()); - this.client = new DefaultRuleClient(requestFactory); - } - -} |