This is an automated email from the ASF dual-hosted git repository. martin_s pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/archiva-redback-core.git
commit bcdc1f24b631c39a06d49fedff8570e343f8d8c5 Author: Martin Stockhammer <[email protected]> AuthorDate: Tue Aug 4 18:06:49 2020 +0200 Changing return to void for delete action --- .../org/apache/archiva/redback/rest/api/services/v2/GroupService.java | 2 +- .../apache/archiva/redback/rest/services/v2/DefaultGroupService.java | 4 ++-- .../archiva/redback/rest/services/v2/NativeGroupServiceTest.java | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/v2/GroupService.java b/redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/v2/GroupService.java index b216498..851f07f 100644 --- a/redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/v2/GroupService.java +++ b/redback-integrations/redback-rest/redback-rest-api/src/main/java/org/apache/archiva/redback/rest/api/services/v2/GroupService.java @@ -117,7 +117,7 @@ public interface GroupService @ApiResponse( responseCode = "404", description = "Group mapping not found" ) } ) - ActionStatus removeGroupMapping( @Parameter( description = "The group name", required = true ) + void removeGroupMapping( @Parameter( description = "The group name", required = true ) @PathParam( "group" ) String group ) throws RedbackServiceException; diff --git a/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/v2/DefaultGroupService.java b/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/v2/DefaultGroupService.java index d5610ac..e4dbf86 100644 --- a/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/v2/DefaultGroupService.java +++ b/redback-integrations/redback-rest/redback-rest-services/src/main/java/org/apache/archiva/redback/rest/services/v2/DefaultGroupService.java @@ -201,7 +201,7 @@ public class DefaultGroupService } @Override - public ActionStatus removeGroupMapping( String group ) + public void removeGroupMapping( String group ) throws RedbackServiceException { try @@ -213,7 +213,7 @@ public class DefaultGroupService log.error( e.getMessage(), e ); throw new RedbackServiceException( ErrorMessage.of( ERR_ROLE_MAPPING, e.getMessage( ) ) ); } - return ActionStatus.SUCCESS; + response.setStatus( 200 ); } @Override diff --git a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeGroupServiceTest.java b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeGroupServiceTest.java index ce2bcb1..4129adb 100644 --- a/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeGroupServiceTest.java +++ b/redback-integrations/redback-rest/redback-rest-services/src/test/java/org/apache/archiva/redback/rest/services/v2/NativeGroupServiceTest.java @@ -454,7 +454,6 @@ public class NativeGroupServiceTest extends AbstractNativeRestServices .delete( "/mappings/archiva-admin" ) .then( ) .statusCode( 200 ).extract( ).response( ); - assertTrue( response.getBody( ).jsonPath( ).getBoolean( "success" ) ); } finally { // Put it back Map<String, Object> jsonAsMap = new HashMap<>( );
