From 2abde62a3fef9a453627f57129a987c2ac385c75 Mon Sep 17 00:00:00 2001 From: Lukasz Rajewski Date: Mon, 27 Sep 2021 14:54:28 +0200 Subject: Fix problem with class loading for aai-delete Issue-ID: SO-3767 Signed-off-by: Lukasz Rajewski Change-Id: I63cc6e07e95edab566ee06eefe63d6c5eeac096d --- .../src/main/java/org/onap/so/adapters/cnf/rest/CnfAdapterRest.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'so-cnf-adapter-application') diff --git a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/rest/CnfAdapterRest.java b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/rest/CnfAdapterRest.java index a68ef67..b870a1d 100644 --- a/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/rest/CnfAdapterRest.java +++ b/so-cnf-adapter-application/src/main/java/org/onap/so/adapters/cnf/rest/CnfAdapterRest.java @@ -62,7 +62,6 @@ import org.onap.so.client.exception.BadResponseException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; @@ -76,7 +75,6 @@ import org.springframework.web.multipart.MultipartFile; import java.io.File; import java.io.IOException; -import java.util.concurrent.ForkJoinPool; @RestController public class CnfAdapterRest { @@ -161,7 +159,7 @@ public class CnfAdapterRest { logger.info("aai-delete called."); DeferredResult response = new DeferredResult<>(); - ForkJoinPool.commonPool().execute(() -> { + new Thread(() -> { logger.info("Processing aai delete"); AaiCallbackResponse callbackResponse = new AaiCallbackResponse(); try { @@ -173,7 +171,7 @@ public class CnfAdapterRest { callbackResponse.setMessage(e.getMessage()); } callbackClient.sendPostCallback(aaiRequest.getCallbackUrl(), callbackResponse); - }); + }).start(); response.setResult(ResponseEntity.accepted().build()); return response; -- cgit 1.2.3-korg