Remove the illegalStateExceptionHandler, as it's already in parent class 36/94836/4
authorThugutla sailakshmi <tsaila10@in.ibm.com>
Tue, 3 Sep 2019 12:49:26 +0000 (18:19 +0530)
committerIttay Stern <ittay.stern@att.com>
Wed, 4 Sep 2019 06:46:24 +0000 (06:46 +0000)
Issue-ID: VID-561
Change-Id: Ie27eea2f8219575bcdcaba6f7796acdd1dd07aa9
Signed-off-by: Thugutla sailakshmi <tsaila10@in.ibm.com>
vid-app-common/src/main/java/org/onap/vid/controller/AsyncInstantiationController.java

index 01b005c..6bd98ff 100644 (file)
 
 package org.onap.vid.controller;
 
+import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
+
+import java.util.List;
+import java.util.UUID;
+import javax.servlet.http.HttpServletRequest;
 import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate;
 import org.onap.vid.exceptions.AccessDeniedException;
-import org.onap.vid.exceptions.OperationNotAllowedException;
-import org.onap.vid.model.ExceptionResponse;
 import org.onap.vid.model.JobAuditStatus;
 import org.onap.vid.model.ServiceInfo;
 import org.onap.vid.model.serviceInstantiation.ServiceInstantiation;
@@ -34,16 +37,14 @@ import org.onap.vid.services.AsyncInstantiationBusinessLogic;
 import org.onap.vid.services.AuditService;
 import org.onap.vid.utils.SystemPropertiesWrapper;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.*;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
 import org.togglz.core.manager.FeatureManager;
 
-import javax.servlet.http.HttpServletRequest;
-import java.util.List;
-import java.util.UUID;
-
-import static org.onap.vid.utils.KotlinUtilsKt.JACKSON_OBJECT_MAPPER;
-import static org.springframework.http.HttpStatus.METHOD_NOT_ALLOWED;
-
 
 @RestController
 @RequestMapping(AsyncInstantiationController.ASYNC_INSTANTIATION)
@@ -69,12 +70,6 @@ public class AsyncInstantiationController extends VidRestrictedBaseController {
         this.systemPropertiesWrapper = systemPropertiesWrapper;
     }
 
-    @ExceptionHandler(OperationNotAllowedException.class)
-    @ResponseStatus(value=METHOD_NOT_ALLOWED)
-    public ExceptionResponse illegalStateExceptionHandler(Exception e) {
-        return ControllersUtils.handleException(e, LOGGER);
-    }
-
     /**
      * Gets the new services status.
      * @param request the request