From 2bc90b174608a4063e8dff9019c2e1d8cf3cf253 Mon Sep 17 00:00:00 2001 From: Ravindu Lakshan Date: Tue, 29 Nov 2022 17:27:18 +0530 Subject: [PATCH] fixed the issue with formatting --- .../api/services/ApplicationManagementPublisherAPI.java | 3 --- .../services/impl/ApplicationManagementPublisherAPIImpl.java | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java index b67e3990e2c..93918ae1e92 100644 --- a/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java +++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/ApplicationManagementPublisherAPI.java @@ -747,9 +747,6 @@ public interface ApplicationManagementPublisherAPI { @ApiResponse( code = 409, message = "CONFLICT. \n Application exists"), - @ApiResponse( - code = 411, - message = "LENGTH_REQUIRED. \n Invalid application name length"), @ApiResponse( code = 400, message = "Bad Request. \n Found invalid device type with the request."), diff --git a/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/impl/ApplicationManagementPublisherAPIImpl.java b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/impl/ApplicationManagementPublisherAPIImpl.java index 388b68b97d7..a69aa74a155 100644 --- a/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/impl/ApplicationManagementPublisherAPIImpl.java +++ b/components/application-mgt/io.entgra.application.mgt.publisher.api/src/main/java/io/entgra/application/mgt/publisher/api/services/impl/ApplicationManagementPublisherAPIImpl.java @@ -373,10 +373,10 @@ public class ApplicationManagementPublisherAPIImpl implements ApplicationManagem log.error(msg); return Response.status(Response.Status.BAD_REQUEST).build(); } - if(appName.length()>20){ + if (appName.length()>20) { String msg = "Invalid app name, maximum length of the application name should be 20 characters."; log.error(msg); - return Response.status(Response.Status.LENGTH_REQUIRED).build(); + return Response.status(Response.Status.BAD_REQUEST).build(); } ApplicationManager applicationManager = APIUtil.getApplicationManager(); if (applicationManager.isExistingAppName(appName, deviceType)) {