Fixed NPE with Gateway resources
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/79aa4865 Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/79aa4865 Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/79aa4865 Branch: refs/heads/lahiru/AIRAVATA-2057 Commit: 79aa48650ec211b29ba2dcebe429b64a2a6f7eb5 Parents: 01716e5 Author: Shameera Rathnayaka <[email protected]> Authored: Fri Aug 12 10:52:52 2016 -0400 Committer: Shameera Rathnayaka <[email protected]> Committed: Fri Aug 12 10:52:52 2016 -0400 ---------------------------------------------------------------------- .../core/experiment/catalog/utils/ThriftDataModelConversion.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/79aa4865/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java ---------------------------------------------------------------------- diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java index 72897ee..97a83cb 100644 --- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java +++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/experiment/catalog/utils/ThriftDataModelConversion.java @@ -93,7 +93,9 @@ public class ThriftDataModelConversion { gateway.setIdentityServerPasswordToken(resource.getIdentityServerPasswordToken()); gateway.setOauthClientId(resource.getOauthClientId()); gateway.setOauthClientSecret(resource.getOauthClientSecret()); - gateway.setRequestCreationTime(resource.getRequestCreationTime().getTime()); + if (resource.getRequestCreationTime() != null) { + gateway.setRequestCreationTime(resource.getRequestCreationTime().getTime()); + } return gateway; }
