You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2016/08/09 17:57:38 UTC
airavata git commit: Fixed NPE with reservataion start time and end
time
Repository: airavata
Updated Branches:
refs/heads/hotfix-for-allocation a4716a7b3 -> 876a1405c
Fixed NPE with reservataion start time and end time
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/876a1405
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/876a1405
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/876a1405
Branch: refs/heads/hotfix-for-allocation
Commit: 876a1405c7998cd713c3360283c184640c672404
Parents: a4716a7
Author: Shameera Rathnayaka <sh...@gmail.com>
Authored: Tue Aug 9 13:57:29 2016 -0400
Committer: Shameera Rathnayaka <sh...@gmail.com>
Committed: Tue Aug 9 13:57:29 2016 -0400
----------------------------------------------------------------------
.../core/app/catalog/util/AppCatalogThriftConversion.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/876a1405/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
index 4d73ac6..8b40d62 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/app/catalog/util/AppCatalogThriftConversion.java
@@ -834,8 +834,13 @@ public class AppCatalogThriftConversion {
preference.setUsageReportingGatewayId(resource.getGatewayId());
preference.setQualityOfService(resource.getQualityOfService());
preference.setReservation(resource.getReservation());
- preference.setReservationStartTime(resource.getReservationStartTime().getTime());
- preference.setReservationEndTime(resource.getReservationEndTime().getTime());
+ if (resource.getReservationStartTime() != null) {
+ preference.setReservationStartTime(resource.getReservationStartTime().getTime());
+ }
+
+ if (resource.getReservationEndTime() != null) {
+ preference.setReservationEndTime(resource.getReservationEndTime().getTime());
+ }
return preference;
}