Merge "TopicService: Fixed sonar issue"
authorRam Koya <rk541m@att.com>
Fri, 31 Aug 2018 15:27:17 +0000 (15:27 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 31 Aug 2018 15:27:17 +0000 (15:27 +0000)
src/main/java/org/onap/dmaap/dbcapi/service/TopicService.java

index 3943419..26def91 100644 (file)
@@ -197,7 +197,9 @@ public class TopicService extends BaseLoggingClass {
                                return null;
                        }
                }
-               mr_topics.put( ntopic.getFqtn(), ntopic );
+               if(ntopic != null) {
+                       mr_topics.put( ntopic.getFqtn(), ntopic );
+               }
                err.setCode(Status.OK.getStatusCode());
                return ntopic;
        }