aboutsummaryrefslogtreecommitdiffstats
path: root/adapters
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2018-03-06 12:47:39 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-06 12:47:39 +0000
commit61d12d7316fd6ca53375712e038c599702d102b1 (patch)
treeba22357c34fc1a76dbba421a124b6846111a45f9 /adapters
parent35ef8944ed4b5d00feb2384f6a1e17ce90cb3783 (diff)
parent76455ea6b8dfcae239c2929e02c3eba0cca4cbe9 (diff)
Merge "Simplify if statements where it makes sense"
Diffstat (limited to 'adapters')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java5
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java5
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java6
3 files changed, 3 insertions, 13 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
index 9fe2d4c786..46cfbf1bb8 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java
@@ -1106,11 +1106,8 @@ public class MsoHeatUtils extends MsoCommonUtils {
}
public boolean isExpired () {
- if (expires == null) {
- return true;
- }
+ return expires == null || System.currentTimeMillis() > expires.getTimeInMillis();
- return System.currentTimeMillis() > expires.getTimeInMillis();
}
}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java
index be36d67e0b..714684aba6 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java
@@ -567,11 +567,8 @@ public class MsoKeystoneUtils extends MsoTenantUtils {
}
public boolean isExpired () {
- if (expires == null) {
- return true;
- }
+ return expires == null || System.currentTimeMillis() > expires.getTimeInMillis();
- return System.currentTimeMillis() > expires.getTimeInMillis();
}
}
diff --git a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java
index 50a594663e..c65a715b66 100644
--- a/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java
+++ b/adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java
@@ -559,11 +559,7 @@ public class MsoNeutronUtils extends MsoCommonUtils
}
public boolean isExpired() {
- if (expires == null) {
- return true;
- }
-
- return System.currentTimeMillis() > expires.getTimeInMillis();
+ return expires == null || System.currentTimeMillis() > expires.getTimeInMillis();
}
}