X-Git-Url: https://gerrit.onap.org/r/gitweb?p=dmaap%2Fdbcapi.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Fdmaap%2Fdbcapi%2Fservice%2FDR_SubService.java;h=138ff57317f503298de60138ace7ffb29ccaed85;hp=0fe1d9ebccefbed10e481c69a8a83bf54324208e;hb=8f54f37825746cf82b33a21ff356950eb682d290;hpb=955500a4aa5c86a1ccc8c4bdf81c65daff41070a diff --git a/src/main/java/org/onap/dmaap/dbcapi/service/DR_SubService.java b/src/main/java/org/onap/dmaap/dbcapi/service/DR_SubService.java index 0fe1d9e..138ff57 100644 --- a/src/main/java/org/onap/dmaap/dbcapi/service/DR_SubService.java +++ b/src/main/java/org/onap/dmaap/dbcapi/service/DR_SubService.java @@ -167,14 +167,21 @@ public class DR_SubService extends BaseLoggingClass { public void removeDr_Sub( String key, ApiError apiError ) { logger.debug( "enter removeDR_Subs()"); + DR_Sub sub = dr_subs.get( key ); if ( sub == null ) { apiError.setCode(Status.NOT_FOUND.getStatusCode()); apiError.setFields( "subId"); apiError.setMessage("subId " + key + " not found"); } else { - dr_subs.remove(key); - apiError.setCode(200); + DrProvConnection prov = new DrProvConnection(); + prov.makeSubPutConnection( key ); + String resp = prov.doDeleteDr_Sub( sub, apiError ); + logger.debug( "resp=" + resp ); + + if ( apiError.is2xx() ) { + dr_subs.remove(key); + } } return;