diff options
author | m.miernik <m.miernik@samsung.com> | 2021-06-22 11:37:46 +0200 |
---|---|---|
committer | KAPIL SINGAL <ks220y@att.com> | 2021-06-23 15:48:40 +0000 |
commit | cb7e5aa3c0445882a2bc04222573c1563b98117b (patch) | |
tree | 54a754eb9a85890bddf3d05ae6787a6a6bd8e885 /sdnr/wt/common/src | |
parent | a285920200ba5cdff0d2df4f794518a0db395922 (diff) |
Fix sonar issues
Replaced methods size() to isEmpty() based on Sonar recommendations
Issue-ID: SDNC-1568
Change-Id: I9b2548ba1d42e009a62ddd34f4f43452622c6ff0
Signed-off-by: m.miernik <m.miernik@samsung.com>
Diffstat (limited to 'sdnr/wt/common/src')
2 files changed, 2 insertions, 2 deletions
diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/configuration/subtypes/SectionValue.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/configuration/subtypes/SectionValue.java index f513e011c..6715be1dc 100644 --- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/configuration/subtypes/SectionValue.java +++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/configuration/subtypes/SectionValue.java @@ -79,7 +79,7 @@ class SectionValue { public void removeComment(String comment) { this.comments.remove(comment); - this.isUncommented = this.comments.size()==0; + this.isUncommented = this.comments.isEmpty(); } public List<String> getComments() { diff --git a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/queries/BoolQueryBuilder.java b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/queries/BoolQueryBuilder.java index 359b9d04b..83c08b270 100644 --- a/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/queries/BoolQueryBuilder.java +++ b/sdnr/wt/common/src/main/java/org/onap/ccsdk/features/sdnr/wt/common/database/queries/BoolQueryBuilder.java @@ -40,7 +40,7 @@ public class BoolQueryBuilder extends QueryBuilder { } public static boolean isEmpty(JSONObject o) { - return o.keySet().size() <= 0; + return o.keySet().isEmpty(); } public BoolQueryBuilder must(QueryBuilder query) { |