You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ch...@apache.org on 2014/11/06 17:49:28 UTC
git commit: fixing NPE
Repository: airavata
Updated Branches:
refs/heads/gfac_appcatalog_int d8176e813 -> 38bc59292
fixing NPE
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/38bc5929
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/38bc5929
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/38bc5929
Branch: refs/heads/gfac_appcatalog_int
Commit: 38bc592927b2fbee8c36ec9dbed800235fdd0c11
Parents: d8176e8
Author: chathuriw <ka...@gmail.com>
Authored: Thu Nov 6 11:48:36 2014 -0500
Committer: Chathuri Wimalasena <ka...@gmail.com>
Committed: Thu Nov 6 11:48:36 2014 -0500
----------------------------------------------------------------------
.../data/impl/GwyResourceProfileImpl.java | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/airavata/blob/38bc5929/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java
index 101b647..827c560 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/impl/GwyResourceProfileImpl.java
@@ -66,8 +66,14 @@ public class GwyResourceProfileImpl implements GwyResourceProfile {
resource.setComputeHostResource((ComputeResourceResource)computeHostResource.get(preference.getComputeResourceId()));
resource.setGatewayId(profileResource.getGatewayID());
resource.setOverrideByAiravata(preference.isOverridebyAiravata());
- resource.setPreferredJobProtocol(preference.getPreferredJobSubmissionProtocol().toString());
- resource.setPreferedDMProtocol(preference.getPreferredDataMovementProtocol().toString());
+ if (preference.getPreferredJobSubmissionProtocol() != null){
+ resource.setPreferredJobProtocol(preference.getPreferredJobSubmissionProtocol().toString());
+ }
+
+ if (preference.getPreferredDataMovementProtocol() != null){
+ resource.setPreferedDMProtocol(preference.getPreferredDataMovementProtocol().toString());
+ }
+
resource.setBatchQueue(preference.getPreferredBatchQueue());
resource.setProjectNumber(preference.getAllocationProjectNumber());
resource.setScratchLocation(preference.getScratchLocation());
@@ -100,8 +106,13 @@ public class GwyResourceProfileImpl implements GwyResourceProfile {
resource.setComputeHostResource((ComputeResourceResource)computeHostResource.get(preference.getComputeResourceId()));
resource.setGatewayId(gatewayId);
resource.setOverrideByAiravata(preference.isOverridebyAiravata());
- resource.setPreferredJobProtocol(preference.getPreferredJobSubmissionProtocol().toString());
- resource.setPreferedDMProtocol(preference.getPreferredDataMovementProtocol().toString());
+ if (preference.getPreferredJobSubmissionProtocol() != null){
+ resource.setPreferredJobProtocol(preference.getPreferredJobSubmissionProtocol().toString());
+ }
+
+ if (preference.getPreferredDataMovementProtocol() != null){
+ resource.setPreferedDMProtocol(preference.getPreferredDataMovementProtocol().toString());
+ }
resource.setBatchQueue(preference.getPreferredBatchQueue());
resource.setProjectNumber(preference.getAllocationProjectNumber());
resource.setScratchLocation(preference.getScratchLocation());