Merge "Used isEmpty to check collection is empty or not"
diff --git a/components/datalake-handler/feeder/src/main/java/org/onap/datalake/feeder/service/DesignService.java b/components/datalake-handler/feeder/src/main/java/org/onap/datalake/feeder/service/DesignService.java
index d0940ba..d492497 100755
--- a/components/datalake-handler/feeder/src/main/java/org/onap/datalake/feeder/service/DesignService.java
+++ b/components/datalake-handler/feeder/src/main/java/org/onap/datalake/feeder/service/DesignService.java
@@ -114,7 +114,7 @@
 					dbs.add(db.get());

 				}

 			}

-			if (dbs.size() > 0)

+			if (!dbs.isEmpty())

 				design.setDbs(dbs);

 			else {

 				design.getDbs().clear();

diff --git a/components/datalake-handler/feeder/src/main/java/org/onap/datalake/feeder/service/DesignTypeService.java b/components/datalake-handler/feeder/src/main/java/org/onap/datalake/feeder/service/DesignTypeService.java
index 86baebf..58bc35e 100755
--- a/components/datalake-handler/feeder/src/main/java/org/onap/datalake/feeder/service/DesignTypeService.java
+++ b/components/datalake-handler/feeder/src/main/java/org/onap/datalake/feeder/service/DesignTypeService.java
@@ -49,7 +49,7 @@
 		List<DesignType> designTypeList = null;

 		List<DesignTypeConfig> designTypeConfigList = new ArrayList<>();

 		designTypeList = (List<DesignType>)designTypeRepository.findAll();

-		if (designTypeList != null && designTypeList.size() > 0) {

+		if (designTypeList != null && !designTypeList.isEmpty()) {

 			log.info("DesignTypeList is not null");

 			for(DesignType designType : designTypeList) {

 				designTypeConfigList.add(designType.getDesignTypeConfig());

diff --git a/components/datalake-handler/feeder/src/main/java/org/onap/datalake/feeder/service/TopicService.java b/components/datalake-handler/feeder/src/main/java/org/onap/datalake/feeder/service/TopicService.java
index ed9b5c2..043cc65 100644
--- a/components/datalake-handler/feeder/src/main/java/org/onap/datalake/feeder/service/TopicService.java
+++ b/components/datalake-handler/feeder/src/main/java/org/onap/datalake/feeder/service/TopicService.java
@@ -162,9 +162,9 @@
 					relateDb.add(sinkdb);
 				}
 			}
-			if (relateDb.size() > 0)
+			if (!relateDb.isEmpty())
 				topic.setDbs(relateDb);
-			else if (relateDb.size() == 0) {
+			else {
 				topic.getDbs().clear();
 			}
 		} else {
@@ -179,9 +179,9 @@
 					relateKafka.add(sinkKafka.get());
 				}
 			}
-			if (relateKafka.size() > 0) {
+			if (!relateKafka.isEmpty()) {
 				topic.setKafkas(relateKafka);
-			} else if (relateKafka.size() == 0) {
+			} else {
 				topic.getKafkas().clear();
 			}
 		} else {