Browse Source

SONAR-13848 remove deprecated api/favourites/index WS

tags/8.8.0.42792
Michal Duda 3 years ago
parent
commit
1ea94dda89

+ 0
- 1
server/sonar-webserver-webapi/src/main/java/org/sonar/server/favorite/FavoriteModule.java View File

@@ -28,7 +28,6 @@ public class FavoriteModule extends Module {
add(
FavoriteFinder.class,
FavoriteUpdater.class

);
}


+ 0
- 1
server/sonar-webserver-webapi/src/main/java/org/sonar/server/favorite/ws/FavoriteWsModule.java View File

@@ -25,7 +25,6 @@ public class FavoriteWsModule extends Module {
@Override
protected void configureModule() {
add(
FavouritesWs.class,
FavoritesWs.class,
AddAction.class,
RemoveAction.class,

+ 0
- 41
server/sonar-webserver-webapi/src/main/java/org/sonar/server/favorite/ws/FavouritesWs.java View File

@@ -1,41 +0,0 @@
/*
* SonarQube
* Copyright (C) 2009-2021 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.server.favorite.ws;

import org.sonar.api.server.ws.WebService;
import org.sonar.server.ws.RemovedWebServiceHandler;

public class FavouritesWs implements WebService {

@Override
public void define(Context context) {
NewController controller = context.createController("api/favourites")
.setDescription("Removed since 6.3, please use api/favorites instead")
.setSince("2.6");
controller.createAction("index")
.setDescription("The web service is removed and you're invited to use api/favorites instead")
.setSince("2.6")
.setDeprecatedSince("6.3")
.setHandler(RemovedWebServiceHandler.INSTANCE)
.setResponseExample(RemovedWebServiceHandler.INSTANCE.getResponseExample());
controller.done();
}

}

+ 1
- 1
server/sonar-webserver-webapi/src/test/java/org/sonar/server/favorite/ws/FavoriteWsModuleTest.java View File

@@ -30,7 +30,7 @@ public class FavoriteWsModuleTest {
public void verify_count_of_added_components() {
ComponentContainer container = new ComponentContainer();
new FavoriteWsModule().configure(container);
assertThat(container.size()).isEqualTo(COMPONENTS_IN_EMPTY_COMPONENT_CONTAINER + 5);
assertThat(container.size()).isEqualTo(COMPONENTS_IN_EMPTY_COMPONENT_CONTAINER + 4);
}



Loading…
Cancel
Save