mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 11:52:28 +01:00
CID-1254833 refactor condition to include null-case
This commit is contained in:
parent
31876fb588
commit
638da54fce
@ -1317,11 +1317,8 @@ public class NetUtils {
|
||||
BigInteger startInt = convertIPv6AddressToBigInteger(start);
|
||||
BigInteger endInt = convertIPv6AddressToBigInteger(end);
|
||||
if (endInt != null) {
|
||||
if (startInt != null)
|
||||
{
|
||||
if(startInt.compareTo(endInt) > 0) {
|
||||
return null;
|
||||
}
|
||||
if (startInt == null || startInt.compareTo(endInt) > 0) {
|
||||
return null;
|
||||
}
|
||||
return endInt.subtract(startInt).add(BigInteger.ONE);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user