summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java b/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java
index 4f126227..38b044db 100644
--- a/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java
+++ b/src/main/java/org/onap/cps/ncmp/dmi/service/DmiServiceImpl.java
@@ -134,7 +134,7 @@ public class DmiServiceImpl implements DmiService {
"Parsing error occurred while converting given cm-handles object list to JSON ");
}
final ResponseEntity<String> responseEntity = ncmpRestClient.registerCmHandlesWithNcmp(cmHandlesJson);
- if ((responseEntity.getStatusCode() != HttpStatus.CREATED)) {
+ if (!responseEntity.getStatusCode().is2xxSuccessful()) {
throw new CmHandleRegistrationException(responseEntity.getBody());
}
}