commit | 31d84786ffc994fa74ca0a61ab1e956727fded6a | [log] [tgz] |
---|---|---|
author | Jon Hall <jhall@ciena.com> | Wed Jan 18 20:15:44 2017 -0800 |
committer | Ray Milkey <ray@onlab.us> | Thu Jan 19 20:24:18 2017 +0000 |
tree | 05576ba475df7ccf16643b26136942f3642ad378 | |
parent | e9ebd573608f28ec044aef39183b4718d05934c0 [diff] [blame] |
Sonar fixes Rule: Use isEmpty() to check whether the collection is empty or not. Change-Id: Ib5ab56b2263623b297db56c5cac2c2ee80e12725
diff --git a/src/main/java/org/onosproject/segmentrouting/config/DeviceConfiguration.java b/src/main/java/org/onosproject/segmentrouting/config/DeviceConfiguration.java index 7eb6894..2bd9932 100644 --- a/src/main/java/org/onosproject/segmentrouting/config/DeviceConfiguration.java +++ b/src/main/java/org/onosproject/segmentrouting/config/DeviceConfiguration.java
@@ -357,7 +357,7 @@ .map(IpPrefix::getIp4Prefix) .collect(Collectors.toSet()); - if (subnets.size() == 0) { + if (subnets.isEmpty()) { log.info(NO_SUBNET, connectPoint); return null; } else if (subnets.size() > 1) {