From 7c124804fa5227859838d4466718bd2e74dbabde Mon Sep 17 00:00:00 2001 From: dglFromAtt Date: Tue, 4 Sep 2018 18:29:29 -0400 Subject: Fix delete of feed pubs and subs Change-Id: Ie5105d9d3f12efd23f2e67338c742ffc57e65d94 Signed-off-by: dglFromAtt Issue-ID: DMAAP-656 --- src/main/java/org/onap/dmaap/dbcapi/client/DrProvConnection.java | 3 +-- src/main/java/org/onap/dmaap/dbcapi/resources/DR_PubResource.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/main/java/org/onap/dmaap/dbcapi/client/DrProvConnection.java b/src/main/java/org/onap/dmaap/dbcapi/client/DrProvConnection.java index 8b3a4c4..34d36ba 100644 --- a/src/main/java/org/onap/dmaap/dbcapi/client/DrProvConnection.java +++ b/src/main/java/org/onap/dmaap/dbcapi/client/DrProvConnection.java @@ -831,12 +831,11 @@ public class DrProvConnection extends BaseLoggingClass { } } } + err.setCode(rc); if (rc == 204 ) { responseBody = bodyToString( uc.getInputStream() ); logger.info( "responseBody=" + responseBody ); - } else { - err.setCode(rc); err.setMessage(responsemessage); } diff --git a/src/main/java/org/onap/dmaap/dbcapi/resources/DR_PubResource.java b/src/main/java/org/onap/dmaap/dbcapi/resources/DR_PubResource.java index 06319de..bcdb4b3 100644 --- a/src/main/java/org/onap/dmaap/dbcapi/resources/DR_PubResource.java +++ b/src/main/java/org/onap/dmaap/dbcapi/resources/DR_PubResource.java @@ -196,7 +196,7 @@ public class DR_PubResource extends BaseLoggingClass { for( Iterator i = pubs.iterator(); i.hasNext(); ) { DR_Pub listItem = i.next(); if ( listItem.getPubId().equals(id)) { - pubs.remove( listItem ); + i.remove(); } } fnew.setPubs(pubs); -- cgit 1.2.3-korg