aboutsummaryrefslogtreecommitdiffstats
path: root/adapters/mso-adapter-utils
diff options
context:
space:
mode:
Diffstat (limited to 'adapters/mso-adapter-utils')
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoHeatUtils.java7
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoKeystoneUtils.java6
-rw-r--r--adapters/mso-adapter-utils/src/main/java/org/openecomp/mso/openstack/utils/MsoNeutronUtils.java7
3 files changed, 7 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 8d66505c6a..9309f05c40 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
@@ -1096,12 +1096,7 @@ public class MsoHeatUtils extends MsoCommonUtils {
return true;
}
- Calendar now = Calendar.getInstance ();
- if (now.after (expires)) {
- return true;
- }
-
- return false;
+ 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 82203d044c..8375b973c9 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
@@ -658,7 +658,11 @@ public class MsoKeystoneUtils extends MsoTenantUtils {
}
public boolean isExpired () {
- return Calendar.getInstance ().after (expires);
+ if (expires == null) {
+ return true;
+ }
+
+ 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 7e388a5ef8..f3281e3f1c 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
@@ -585,12 +585,7 @@ public class MsoNeutronUtils extends MsoCommonUtils
return true;
}
- Calendar now = Calendar.getInstance();
- if (now.after(expires)) {
- return true;
- }
-
- return false;
+ return System.currentTimeMillis() > expires.getTimeInMillis();
}
}