summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java3
-rw-r--r--vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/OperationProgressor.java2
2 files changed, 4 insertions, 1 deletions
diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java
index 9f8a456002..357b571a5c 100644
--- a/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java
+++ b/bpmn/so-bpmn-infrastructure-common/src/main/java/org/onap/so/bpmn/infrastructure/pnf/dmaap/PnfEventReadyDmaapClient.java
@@ -135,7 +135,8 @@ public class PnfEventReadyDmaapClient implements DmaapClient {
HttpResponse response = httpClient.execute(getRequest);
List<String> idList = getPnfCorrelationIdListFromResponse(response);
- if (idList != null && idList.size() > 0) {
+ // idList is never null
+ if (!idList.isEmpty()) {
// send only body of response
registerClientResponse(idList.get(0), EntityUtils.toString(response.getEntity(), "UTF-8"));
}
diff --git a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/OperationProgressor.java b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/OperationProgressor.java
index 1e31ab2fdb..218cc2de03 100644
--- a/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/OperationProgressor.java
+++ b/vnfm-simulator/vnfm-service/src/main/java/org/onap/svnfm/simulator/services/OperationProgressor.java
@@ -107,6 +107,8 @@ public abstract class OperationProgressor implements Runnable {
Thread.sleep(milliSeconds);
} catch (final InterruptedException e) {
operation.setOperationState(InlineResponse200.OperationStateEnum.FAILED);
+ // Restore interrupted state
+ Thread.currentThread().interrupt();
}
}