aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils/src/main/java
diff options
context:
space:
mode:
authorMunir Ahmad <munir.ahmad@bell.ca>2018-02-24 12:44:49 -0500
committerMunir Ahmad <munir.ahmad@bell.ca>2018-02-26 19:15:52 -0500
commit76455ea6b8dfcae239c2929e02c3eba0cca4cbe9 (patch)
treedec68785264efce1917bd9c58b0f0d7326348ec7 /adapters/mso-adapter-utils/src/main/java
parente35347d6521133807e92f397820fa18a5412aee7 (diff)
Simplify if statements where it makes sense
Change-Id: Id04ede6b8aa8fa3ca8c02b8c32ad5f4745ef47f4 Issue-ID: SO-437 Signed-off-by: Munir Ahmad <munir.ahmad@bell.ca>
Diffstat (limited to 'adapters/mso-adapter-utils/src/main/java')
-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 20535e93c8..da526ae25b 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();
}
}