From 75ea430101b065deb4624e5e431981d36b50b839 Mon Sep 17 00:00:00 2001 From: Avgustin Marinov Date: Sun, 17 Nov 2024 18:32:01 +0200 Subject: [PATCH] DDI resource - remove dupplicated annotations (MgmtDownloadArtifactRest) (#2064) Signed-off-by: Avgustin Marinov --- .../mgmt/rest/api/MgmtDownloadArtifactRestApi.java | 3 ++- .../mgmt/rest/resource/MgmtDownloadArtifactResource.java | 8 ++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/hawkbit-mgmt/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDownloadArtifactRestApi.java b/hawkbit-mgmt/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDownloadArtifactRestApi.java index c4d06a5b7..5b3151f49 100644 --- a/hawkbit-mgmt/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDownloadArtifactRestApi.java +++ b/hawkbit-mgmt/hawkbit-mgmt-api/src/main/java/org/eclipse/hawkbit/mgmt/rest/api/MgmtDownloadArtifactRestApi.java @@ -34,6 +34,7 @@ public interface MgmtDownloadArtifactRestApi { */ @GetMapping(value = MgmtRestConstants.SOFTWAREMODULE_V1_REQUEST_MAPPING + "/{softwareModuleId}/artifacts/{artifactId}/download") @ResponseBody - ResponseEntity downloadArtifact(@PathVariable("softwareModuleId") Long softwareModuleId, + ResponseEntity downloadArtifact( + @PathVariable("softwareModuleId") Long softwareModuleId, @PathVariable("artifactId") Long artifactId); } \ No newline at end of file diff --git a/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDownloadArtifactResource.java b/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDownloadArtifactResource.java index 07bd02aad..6c957ba4f 100644 --- a/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDownloadArtifactResource.java +++ b/hawkbit-mgmt/hawkbit-mgmt-resource/src/main/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDownloadArtifactResource.java @@ -30,13 +30,9 @@ import org.springframework.context.annotation.Scope; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.context.WebApplicationContext; -/** - * - */ @RestController @Scope(value = WebApplicationContext.SCOPE_REQUEST) public class MgmtDownloadArtifactResource implements MgmtDownloadArtifactRestApi { @@ -55,8 +51,8 @@ public class MgmtDownloadArtifactResource implements MgmtDownloadArtifactRestApi */ @Override public ResponseEntity downloadArtifact( - @PathVariable("softwareModuleId") final Long softwareModuleId, - @PathVariable("artifactId") final Long artifactId) { + final Long softwareModuleId, + final Long artifactId) { final SoftwareModule module = softwareModuleManagement.get(softwareModuleId) .orElseThrow(() -> new EntityNotFoundException(SoftwareModule.class, softwareModuleId)); if (module.isDeleted()) {