TopicService: Fixed sonar issue
[dmaap/dbcapi.git] / 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;
        }