summaryrefslogtreecommitdiffstats
path: root/cps-ncmp-rest/src/main
diff options
context:
space:
mode:
authoremaclee <lee.anjella.macabuhay@est.tech>2022-06-07 18:32:29 +0100
committeremaclee <lee.anjella.macabuhay@est.tech>2022-06-09 10:22:06 +0100
commit421f824800e51ddd4f70758f5be386e50bf8ea1e (patch)
treec539abd23d56e06669dc7c879cd312ec14a58119 /cps-ncmp-rest/src/main
parent5e80e3776bb47483ca71bcc3fbe2cd8c2b9389e3 (diff)
Fix sonar code smells
- Remove useless curly braces around statement (https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=onap_cps&open=AYD_5_HLFWip2-KRhcLs) - Define a constant (https://sonarcloud.io/project/issues?resolved=false&types=CODE_SMELL&id=onap_cps&open=AYEj9y6sq272EuFEMiu-) Issue-ID: CPS-475 Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech> Change-Id: Ib430fac481b29dba8725ed0dac4da3daa56a3984
Diffstat (limited to 'cps-ncmp-rest/src/main')
-rw-r--r--cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/executor/CpsNcmpTaskExecutor.java6
1 files changed, 1 insertions, 5 deletions
diff --git a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/executor/CpsNcmpTaskExecutor.java b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/executor/CpsNcmpTaskExecutor.java
index 93aa2858ca..5adbb252a0 100644
--- a/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/executor/CpsNcmpTaskExecutor.java
+++ b/cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/executor/CpsNcmpTaskExecutor.java
@@ -40,11 +40,7 @@ public class CpsNcmpTaskExecutor {
public void executeTask(final Supplier<Object> taskSupplier, final int timeOutInMillis) {
CompletableFuture.supplyAsync(taskSupplier::get)
.orTimeout(timeOutInMillis, MILLISECONDS)
- .whenCompleteAsync(
- (responseAsJson, throwable) -> {
- handleTaskCompletion(throwable);
- }
- );
+ .whenCompleteAsync((responseAsJson, throwable) -> handleTaskCompletion(throwable));
}
private void handleTaskCompletion(final Throwable throwable) {